Re: Embedded server URL

Tim Anderson <[email protected]> Thu, 20 Mar 2008 09:46:40 +1100
Newsgroups gmane.comp.java.openjms.user
Message-ID <[email protected]>
--===============1290675522==
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
You need to configure the server with as per:<br>
&nbsp;&nbsp;&nbsp; <a class="moz-txt-link-freetext"
 href="http://openjms.sourceforge.net/config/embedded.html">http://openjms.sourceforge.net/config/embedded.html</a><br>
<br>
You also need to start the server in the same JVM as your client. <br>
As the server takes time to start, initial attempts to connect may
fail. <br>
You may need to retry several times before the connection succeeds.<br>
<br>
If you want an example of how to do this, have a look at the
EmbeddedServerAdapter and <br>
RemoteServerAdapter classes at:<br>
<a class="moz-txt-link-freetext" href="http://jmscts.cvs.sourceforge.net/jmscts/jmscts/src/providers/openjms/org/exolab/jmscts/openjms/">http://jmscts.cvs.sourceforge.net/jmscts/jmscts/src/providers/openjms/org/exolab/jmscts/openjms/</a><br>
<br>
-Tim<br>
<br>
<br>
aslam wrote:
<blockquote cite="mid:[email protected]" type="cite">
  <pre wrap="">I need to use the embedded scheme, because I'm implementing (automated) unit
tests for JMS listeners &amp; producers. Here's what's happening:

<a class="moz-txt-link-freetext"
 href="http://www.nabble.com/file/p16131044/openjms.xml">http://www.nabble.com/file/p16131044/openjms.xml</a> 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:
  </pre>
  <blockquote type="cite">
    <pre wrap="">Looks like the URL for an embedded server is "vm:openjms", based on
org.exolab.jms.jndi.InitialContextFactory.getProviderURI(String)

The doc at <a class="moz-txt-link-freetext"
 href="http://openjms.sourceforge.net/usersguide/embedded.html">http://openjms.sourceforge.net/usersguide/embedded.html</a> says it
is "embedded://".

Can someone confirm this?

Thanks.

--aslam



    </pre>
  </blockquote>
  <pre wrap=""><!---->
  </pre>
</blockquote>
<br>
</body>
</html>


--===============1290675522==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

-------------------------------------------------------------------------
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/
--===============1290675522==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
openjms-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openjms-user

--===============1290675522==--