Re: Embedded server URL
aslam <[email protected]> Wed, 19 Mar 2008 17:39:08 -0700 (PDT)
| Newsgroups | gmane.comp.java.openjms.user |
|---|---|
| Message-ID | <[email protected]> |
Thanks, Tim. EmbeddedServerAdapter uses EmbeddedJmsServer, which is deprecated, according to the JavaDoc, and it says that JmsServer is to be used instead. Does what you said also apply to JmsServer? --aslam Tim Anderson wrote: > > You need to configure the server with as per: > http://openjms.sourceforge.net/config/embedded.html > > You also need to start the server in the same JVM as your client. > As the server takes time to start, initial attempts to connect may > fail. > You may need to retry several times before the connection succeeds. > > If you want an example of how to do this, have a look at the > EmbeddedServerAdapter and > RemoteServerAdapter classes at: > http://jmscts.cvs.sourceforge.net/jmscts/jmscts/src/providers/openjms/org/exolab/jmscts/openjms/ > > -Tim > > > aslam wrote: > > I need to use the embedded scheme, because I'm implementing (automated) > unit > tests for JMS listeners & producers. Here's what's happening: > > http://www.nabble.com/file/p16131044/openjms.xml openjms.xml > > Statement: Context context = new InitialContext(props) ...where props are: > java.naming.factory.initial=org.exolab.jms.jndi.InitialContextFactory > java.naming.provider.url=embedded:// > java.naming.security.principal=admin > java.naming.security.credentials=openjms > > Provider URL "embedded://" > ...causes the following exception: > javax.naming.CommunicationException: Failed to get registry service for > URL: > embedded:// [Root exception is java.rmi.ConnectIOException: Failed to > create > connection; nested exception is: > org.exolab.jms.net.connector.ConnectException: Connection refused, > URI=vm://openjms/] > > The same exception is thrown if I use "vm://openjms/" as the provider URL. > > With provider URL "vm:openjms", the above statement results in the > following > exception: > > javax.naming.CommunicationException: Failed to lookup JNDI provider for > URL: > vm:openjms [Root exception is java.rmi.RemoteException: -1; nested > exception > is: > java.lang.ArrayIndexOutOfBoundsException: -1] > > Anyone know what might be wrong? > > --aslam > > > a k'wala wrote: > > > Looks like the URL for an embedded server is "vm:openjms", based on > org.exolab.jms.jndi.InitialContextFactory.getProviderURI(String) > > The doc at http://openjms.sourceforge.net/usersguide/embedded.html says > it > is "embedded://". > > Can someone confirm this? > > Thanks. > > --aslam > > [truncated] > > -- View this message in context: http://www.nabble.com/Embedded-server-URL-tp15995008p16168678.html Sent from the OpenJMS - User mailing list archive at Nabble.com. ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/