[jboss-user] [JBoss Getting Started Documentation] - Help with Weblogic to JBoss migration
hanif77
do-not-reply at jboss.com
Thu Nov 1 13:41:07 EDT 2007
I have a problem with JNDI when moving from Weblogic 6 to JBoss 4.2.0.GA.
I have a class which is bound to a JNDI name (Global), but when I do a lookup I always seem to get a copy rather than a reference. This code had previously worked ok on Weblogic.
public class RuleCacheHolder implements Serializable // implements T3StartupDef, IRuleCacheHolder
{
/**
*
*/
private static final long serialVersionUID = 2938516269249036614L;
private String _className = this.getClass().getName();
protected boolean noConnection = false;
private String _cacheName;
private String _cacheType;
private String _types[];
private Hashtable cache = new Hashtable();
private static final String jndiName = "CACHE_HOLDER_";
public RuleCacheHolder(String cacheName, String cacheType, String types[]) {
setCacheName(cacheName);
setCacheType(cacheType);
setTypes(types);
try {
new InitialContext().bind(jndiName + cacheName, this);
// initialiseCache();
// WebLogger.trace(_className+" CACHE_HOLDER_"+getCacheName()+"
// CREATED...");
} catch (NamingException ne) {
ne.printStackTrace();
}
}
After creation I populate the cache hashtable from a different class, however when a subsequent lookup is done the cache hashtable is empty. I am using a jndi prop file and have tried changing the CallByValue setting in jboss-service.xml. There are no errors or exceptions in the lookup.
I have scoured the various sites to no avail so any help would be greatly appreciated.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4101016#4101016
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4101016
More information about the jboss-user
mailing list