BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Not working when compiled in JB7 Enterprise

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> JBuilder Compiler
View previous topic :: View next topic  
Author Message
Peter Ondrus
Guest





PostPosted: Fri Jul 18, 2003 8:09 am    Post subject: Not working when compiled in JB7 Enterprise Reply with quote



Hi all,
following class is used on both sides(EJB and client) of my project. If I
compile it with JB7Ent, then class is not constructed during runtime. (I had
some System.out.println("blabla") at the very first line of constructor, but
the message never comes out) If I complie it with javac or now JB9Ent Trial,
it works. Is there some bug in JB7 compiler? Is it possible to compile with
javac from JB7 or is there some patch for JB7 compiler?
Thanks in advance.

Peter

/*
* HandleQuality.java
*
* Created on Utorok, 2002, apríl 16, 10:41
*/

package sk.humantec.hcs.common.quality;

import sk.humantec.ejb.ParamNotExistException;

/**
*
* @author milos
*/
public class HandleQuality implements java.io.Serializable,
java.lang.Cloneable {
public static final int QUALITY_A =0;
public static final int QUALITY_B =1;
public static final int QUALITY_C =2;
public static final int QUALITY_D =3;
//public static final int QUALITY_E =4;
//public static final int QUALITY_F =5;

public static final int COUNT_QUALITIES =4;
public static final String [] quality = { "A", "B", "C", "D"};//, "E",
"F"};
private boolean usedQuality [];

private String originalQualities;
/** Creates a new instance of HandleQuality */
public HandleQuality(String qualities) {
System.out.println("som v HandleQuality");
parseQualities( qualities);
}

public void parseQualities( String qualities) {
System.out.println("som v parse Qualities");
originalQualities = qualities;
usedQuality = new boolean [COUNT_QUALITIES];
for( int i=0; i< quality.length; i++) {
System.out.println("i = " + i + " quality[ i] = " + quality[ i]);
if( originalQualities.indexOf( quality[ i]) >= 0) {
usedQuality[i] = true;
} else {
usedQuality[i] = false;
}
}
}

public boolean hasQuality( int quality) throws ParamNotExistException {
try{
return usedQuality[ quality];
} catch( IndexOutOfBoundsException e) {
throw new ParamNotExistException( "unknown quality "+quality);
}
}

public void addQuality( int quality) throws ParamNotExistException {
setQuality( quality, true);
}

public void removeQuality( int quality) throws ParamNotExistException {
setQuality( quality, false);
}

public void setQuality( int quality, boolean flag) throws
ParamNotExistException {
try{
usedQuality[ quality] = flag;
} catch( IndexOutOfBoundsException e) {
throw new ParamNotExistException( "unknown quality "+quality);
}
}

public String getQualities() {
String newQualities="";
for( int i=0; i< usedQuality.length; i++) {
if( usedQuality[i]) {
newQualities = newQualities+quality[i];
}
}
return newQualities;
}

public String getOriginalQualities() {
return originalQualities;
}

public boolean equals( Object object) {
HandleQuality obj = ( HandleQuality) object;
if( this.getQualities().equals( obj.getQualities())) {
return true;
}
return false;
}

public Object clone() throws CloneNotSupportedException {
HandleQuality nq = (HandleQuality)super.clone();
nq.usedQuality = (boolean [])this.usedQuality.clone();
nq.originalQualities = new String( this.originalQualities);
return nq;
}
}


Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> JBuilder Compiler All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.