JBoss SwiftMQAdapter problem
2 posts in topic
Flat View  Flat View

Posted By:   Jason_Dillon
Posted On:   Friday, June 14, 2002 02:55 PM

Hi, looks like the SwiftMQAdapter in 3.1 does not return a new InitialContext for each call to getInitialContext(). This means that code that normally closes it's InitialContext handles will fail after the first close.

I know that the JMSProviderAdapter interface does show that getInitialContext() returns a Context, but as the method name indicates it should be have like it is an InitialContext (even if it isn't one).

Eventually the adapter will be replaced by a non-JNDI specific interface, but until then it would help if you would return a new IC for each call.


Re: JBoss SwiftMQAdapter problem

Posted By:   Andreas_Mueller  
Posted On:   Monday, June 24, 2002 08:47 AM

The getInitialContext() is now changed to:

public Context getInitialContext() throws NamingException
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY, "com.swiftmq.jndi.InitialContextFactoryImpl");
env.put(Context.PROVIDER_URL, providerURL);
return new InitialContext(env);

The finalize() closes the JMS connection (already implemented in 3.2.0). The change will appear in our next release.

Re: JBoss SwiftMQAdapter problem

Posted By:   Andreas_Mueller  
Posted On:   Saturday, June 15, 2002 02:40 AM

We will definitely not return a new InitialContext on each call! Our InitialContext is heavy weight, backed by a JMS connection.

You can also use JNDI replication. The new 3.2.0 JNDI objects implement Referenceable and we provide a JNDI object factory too. That works fine with Jonas and many other app servers.
About | Sitemap | Contact