Hi Gert,

thank you for using JOnAS and for sending a so precise problem description ! I had a 
look at all this stuff and I
think I have found something that may be the reason of your problem.

I noticed that your jndi.properties files on both hosts are identical with the 
java.naming.provider.url being
jrmi://localhost:12340. So I imagine that you launch the registry on both hosts (as it 
is necessary with rmi),
however with jeremie, you may only launch the registry on one host (say host0), and 
set the
java.naming.provider.url property to jrmi://host0:12340 in both jndi.properties files. 
Thus on both hosts, lookup
operations using the InitialContext in your EJB servers will access the same registry. 
Currently I suppose that
your JMS destinations (queues) are registered in the registry running on host0, and 
that on host1 you access the
registry running locally (jrmi://localhost:12340) through the InitialContext and do 
not find the destinations (and
thus create new ones, according to your traces, but by the way which does not 
correspond to the provided
host1-jonas.properties ...). Thus I suggest you to modify your jndi.properties files 
by setting the
java.naming.provider.url property to jrmi://host0:12340, and to just launch the 
registry on host0.
Note that with rmi (and not jeremie) you would need one registry per host, and 
therefore could not use the
InitialContext in one server for accessing objects (JMS destinations but also EJBs) 
registered by the server
located on another host, which is not very clean ...

I also noticed in your jonas.properties file that you give to your destinations JNDI 
names like
"java:comp/env/jms/tstQueue". I hope you did not miss the standard way to refer JMS 
destination objects within EJBs
(see the http://www.objectweb.org/jonas/jonas_root/doc/EjbJmsUserGuide.html) ... i.e. 
in the jonas.properties file
you only provide the actual jndi name (say "foo"), while in the EJB components you 
will use resource environment
references, i.e. in your deployment descriptor you declare a resource env ref as 
follows
<resource-env-ref>
<resource-env-ref-name>jms/tstQueue</resource-env-ref-name>
<resource-env-ref-type>javax.jms.Queue<resource-env-ref-type>
</resource-env-ref>
in the jonas specific deployment descriptor you declare the mapping with the actual 
JNDI name, say "foo",
<jonas-resource-env>
<resource-env-ref-name>jms/tstQueue</resource-env-ref-name>
<jndi-name>foo<jndi-name>
</jonas-resource-env>
and then in your EJB component you may perform lookups like
Queue queue = (Queue) ctx.lookup("java:comp/env/jms/tstQueue");
which is independent of the actual jndi name, i.e. you can change your JMS 
configuration without impacting your
bean code (only the deployment descriptor).

I hope this will help you solving your problem. We are very interested by your 
feedback of using the JOnAS JMS
capabilities which are quite new (and it seems that you are experimenting some quite 
interesting non trivial
configurations, and in a clever way ).

Best regards,

Fran�ois

==================================================================
Fran�ois EXERTIER         Evidian (Groupe Bull)
     1, rue de Provence,  BP 208,  38432 Echirolles cedex, FRANCE
     mailto:[EMAIL PROTECTED]
     http://www.evidian.com/jonas   http://www.objectweb.org/jonas
     Tel: +33 (0)4 76 29 71 51  -  Fax:   +33 (0)4 76 29 77 30
==================================================================

----
To unsubscribe, send email to [EMAIL PROTECTED] and
include in the body of the message "unsubscribe jonas-users".
For general help, send email to [EMAIL PROTECTED] and
include in the body of the message "help".

Reply via email to