  | Mailing List | | Home | | Forum Home | | JBoss - Java Application Server | | Tomcat - JSP/Servlet container | | Struts - A MVC web framework | | iText - An open source PDF Java Library | | JDOM - JDOM XML Parser | | JSP - A mailing list about Java Server Pages specification and reference | | J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition | | J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog | | Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology | |
Struts & Hibernate
|
|
|
  | | | - Help with Weblogic to JBoss | - Help with Weblogic to JBoss 2007-11-01 - By hanif77
Back 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 __ ____ ____ ____ ____ ____ ____ ____ ____ ____ jboss-user mailing list jboss-user@(protected) https://lists.jboss.org/mailman/listinfo/jboss-user
|
|
 |