Rickard,
sorry for not responding with my gratitude sooner. I created an MBean by
using the org.jboss.util.Info (MBean) as an example and registered my RMI
object with the jboss JNDI tree in preRegister() and also stored a reference
to the RMI object in a data member to prevent GC. I looked in the
jboss/conf/jboss.conf file to get an MLET tag example and created the
appropriate MLET tag for my MBean. I cranked up jboss and everything worked
as you said it would. The MBean preRegister() method was called and my RMI
object was registered with the JNDI tree.

Thanks again!

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Rickard �berg
Sent: Friday, October 27, 2000 7:11 AM
To: jBoss
Subject: Re: [jBoss-User] java.rmi.ConnectionException connection
refused


Hi!

Robert Taylor wrote:
> I think I get the picture now.
> Test app lives in one VM, JBoss lives in another VM.
> Test app creates RMI object (allocates memory address etc...) and binds to
> JNDI.
> Test app exits. Memory address to RMI object has no meaning.
> Test app starts again, finds the RMI stub in JNDI but crashes because stub
> does not reference old RMI object address space.

Exactly.

> I'm not quite clear on what exactly an MBean is except that it refers to
JMX
> some how.

You guessed right.

> I'm guessing that it can be used as a sort of start up class that can be
> called when JBoss starts up. This way the RMI object would live in the
JBoss
> VM and a call to it would access a valid object reference.

Yup, that is the idea. You can copy an existing MBean in jBoss and go
from there. You can, for example, copy the org.jboss.util.Info(MBean)
classes and modify so that it creates your RMI object instead. Then add
it to jboss.conf (see how Info is added for example) and off you go :-)

/Rickard

--
Rickard �berg

Email: [EMAIL PROTECTED]
http://www.telkel.com
http://www.jboss.org
http://www.dreambean.com



--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]




--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to