Embedded server URL

View: New views
5 Messages — Rating Filter:   Alert me  

Embedded server URL

by a k'wala :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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


Re: Embedded server URL

by a k'wala :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I need to use the embedded scheme, because I'm implementing (automated) unit tests for JMS listeners & producers. Here's what's happening:

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

Re: Embedded server URL

by Tim Anderson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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



    

  


-------------------------------------------------------------------------
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/
_______________________________________________
openjms-user mailing list
openjms-user@...
https://lists.sourceforge.net/lists/listinfo/openjms-user

Re: Embedded server URL

by a k'wala :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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]

Re: Embedded server URL

by Tim Anderson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Yep. Just hasn't been updated to the latest API.

aslam wrote:
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]


    

  


-------------------------------------------------------------------------
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/
_______________________________________________
openjms-user mailing list
openjms-user@...
https://lists.sourceforge.net/lists/listinfo/openjms-user