Binding to JNDI

Using Hermes with JBoss

Binding to JNDI

Postby swami » Tue Apr 22, 2008 7:53 pm

I get this error
The binding property to locate the ConnectionFactory in the Context is not set
when I try to add a queue to the context. I got the same error when I tried to browse the queue that I added to my session.
So I tried binding to jndi. The bind tool pops up. When I click on bind I gee this error.
Also what value should go on the binding column.

2008-04-22 15:40:42,843 [AWT-EventQueue-0] DEBUG hermes.browser.components.BrowserTree - java.awt.datatransfer.DataFlavor[mimetype=application/x-java-serialized-object;representationclass=hermes.browser.transferable.HermesAdministeredObjectTransferable]
2008-04-22 15:40:42,843 [AWT-EventQueue-0] DEBUG hermes.impl.SimpleClassLoaderManager - getting existing classLoader for Jboss 4.0.1
2008-04-22 15:40:42,843 [AWT-EventQueue-0] DEBUG hermes.impl.LoaderSupport - set hermes.JNDIContextFactory providerURL=jnp://localhost:1099
2008-04-22 15:40:42,843 [AWT-EventQueue-0] DEBUG hermes.impl.LoaderSupport - set hermes.JNDIContextFactory initialContextFactory=org.jnp.interfaces.NamingContextFactory
2008-04-22 15:40:42,843 [AWT-EventQueue-0] DEBUG hermes.impl.LoaderSupport - set hermes.JNDIContextFactory urlPkgPrefixes=org.jnp.interfaces:org.jboss.naming
2008-04-22 15:40:42,843 [AWT-EventQueue-0] DEBUG hermes.impl.LoaderSupport - set hermes.JNDIContextFactory securityCredentials=admin
2008-04-22 15:40:42,843 [AWT-EventQueue-0] DEBUG hermes.impl.LoaderSupport - set hermes.JNDIContextFactory securityPrincipal=admin
2008-04-22 15:40:50,249 [Hermes ThreadPool-1] DEBUG hermes.browser.tasks.ThreadPool - task hermes.browser.dialog.BindToolDialog$2@1b306eb starting
2008-04-22 15:40:50,249 [Hermes ThreadPool-1] DEBUG hermes.impl.jms.ConnectionSharedManager - creating connection from factory: connectionFactory class=hermes.JNDITopicConnectionFactory, properties={userPropertiesURL=null, dnsUrl=null, providerURL=null, class=class hermes.JNDITopicConnectionFactory, securityProtocol=null, language=null, port=null, objectFactories=null, referral=null, securityAuthentication=null, initialContextFactory=null, urlPkgPrefixes=null, host=null, stateFactories=null, securityCredentials=null, securityPrincipal=null, batchSize=null, binding=null, authoritative=null, rmiAdaptorBinding=null, userPropertiesFile=null}
2008-04-22 15:40:50,249 [Hermes ThreadPool-1] ERROR hermes.browser.dialog.BindToolDialog - The binding property to locate the ConnectionFactory in the Context is not set
hermes.HermesException: The binding property to locate the ConnectionFactory in the Context is not set
at hermes.JNDIConnectionFactory.checkBinding(JNDIConnectionFactory.java:63)
at hermes.JNDIConnectionFactory.createConnection(JNDIConnectionFactory.java:74)
at hermes.impl.jms.ConnectionManagerSupport.createConnection(ConnectionManagerSupport.java:122)
at hermes.impl.jms.ConnectionManagerSupport.createConnection(ConnectionManagerSupport.java:92)
at hermes.impl.jms.ConnectionSharedManager.reconnect(ConnectionSharedManager.java:81)
at hermes.impl.jms.ConnectionSharedManager.connect(ConnectionSharedManager.java:91)
at hermes.impl.jms.ConnectionSharedManager.getConnection(ConnectionSharedManager.java:104)
at hermes.impl.jms.ConnectionSharedManager.getObject(ConnectionSharedManager.java:142)
at hermes.impl.jms.ThreadLocalSessionManager.connect(ThreadLocalSessionManager.java:190)
at hermes.impl.jms.ThreadLocalSessionManager.getSession(ThreadLocalSessionManager.java:570)
at hermes.impl.jms.AbstractSessionManager.getDestination(AbstractSessionManager.java:465)
at hermes.impl.DefaultHermesImpl.getDestination(DefaultHermesImpl.java:367)
at hermes.browser.dialog.BindToolDialog$3.onDestination(BindToolDialog.java:141)
at hermes.browser.model.BindToolTableModel.visit(BindToolTableModel.java:97)
at hermes.browser.dialog.BindToolDialog.doBindAsync(BindToolDialog.java:113)
at hermes.browser.dialog.BindToolDialog.access$100(BindToolDialog.java:58)
at hermes.browser.dialog.BindToolDialog$2.run(BindToolDialog.java:97)
at hermes.browser.tasks.ThreadPool.run(ThreadPool.java:170)
at java.lang.Thread.run(Thread.java:595)
2008-04-22 15:41:02,827 [Hermes ThreadPool-1] DEBUG hermes.browser.tasks.ThreadPool - task hermes.browser.dialog.BindToolDialog$2@1b306eb stopped

Thanks,
Swami.
swami
 
Posts: 1
Joined: Tue Apr 22, 2008 7:46 pm

Re: Binding to JNDI

Postby Colin » Thu May 08, 2008 11:48 am

The JNDIConnectionFactory needs a "binding" property to be set to where in JNDI (i.e. the parameter to the lookup() call) to find the real connection factory.

If you created the session from a JNDI browse then it will be set already, if not you must set it yourself.

Regards,

Colin.
Colin
Site Admin
 
Posts: 913
Joined: Sun Sep 19, 2004 4:49 pm
Location: London, UK


Return to JBoss

Who is online

Users browsing this forum: No registered users and 1 guest

cron