[jboss-dev-forums] [JBoss Cache Development] - Re: NotSerializableException while trying to bind Cache Obje

schamarthi do-not-reply at jboss.com
Mon Oct 5 10:15:44 EDT 2009


Hmm that didn't help me. Not sure if I am doing it right. 

I am using Spring JndiTemplate to bind to jndi tree. Here is the code snippet.

May be some one point me if something is wrong in doing this way ?


    JndiTemplate jndiTemplate = getJndiTemplate();
  |     jndiTemplate.rebind("java:/jbossCache, this);
  | 
  |   private JndiTemplate getJndiTemplate() {
  |     Properties prop = new Properties();
  |     
  |     prop.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
  |     prop.put("java.naming.provider.url", "localhost:1099");
  |     prop.put("java.naming.factory.url.pkgs", "org.jboss.naming");
  |     
  |     return new JndiTemplate(prop);
  |   }
  | 
  | 
  | 

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4258680#4258680

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4258680



More information about the jboss-dev-forums mailing list