[jboss-user] [JBoss/Spring Integration] - Re: Spring deployer + cluster

alesj do-not-reply at jboss.com
Sat Dec 16 06:25:24 EST 2006


anonymous wrote : Does the applicationcontext get registred under jndi?

Yes.
This is the code that does it (AbstractBeanFactoryLoader class):
NonSerializableFactory is used, since we don't want to impound Serializability to all of our beans.


  | // JNDI stuff
  | 
  |    public static void bind(BeanFactory beanFactory, String name) throws BeansException
  |    {
  |       InitialContext ctx = null;
  |       try
  |       {
  |          ctx = new InitialContext();
  |          NonSerializableFactory.rebind(ctx, name, beanFactory);
  |       }
  |       catch (NamingException e)
  |       {
  |          throw new FatalBeanException("Unable to bind BeanFactory into JNDI", e);
  |       }
  |       finally
  |       {
  |          if (ctx != null)
  |          {
  |             try
  |             {
  |                ctx.close();
  |             }
  |             catch (Throwable ignored)
  |             {
  |             }
  |          }
  |       }
  |    }
  | 

anonymous wrote : Would it mean that using a cluster jndi I would have a single bean shared through the cluster

Hmm ... never tried it. But you can probably try HAJndi.

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

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



More information about the jboss-user mailing list