Michael Lepine wrote:

>
> Okay, but in order to keep the code portable from any EJB server to any
> other EJB server, is there an independent solution. I was thinking of just
> creating an RMI object which I would then use JNDI to locate. Sound crazy?
> :)

Doesn't sound crazy, but how do you put the rmi object into the JNDI
where the ejb's can find it, namely, the JNDI set up by the app server?
I suppose the beans themself could have code that attempts to fetch it
via  'new initialContext()' which should be the app server's, and then if
they don't find it create it and put it in JNDI. In this way it's created
on demand and thereafter other ejbs find it.

Not sure if this is cool wrt the spec or otherwise. I guess one consideration
is that in creating an rmi  RemoteUnicast object, you are creating a thread
and if it is an ejb doing the creation, what is the parent thread and thread
group?
I think the problem is that first of all it's against the spec to create a
thread
in an ejb, and secondly, the thread would become a child thread of the
container.

I think to do this we'd need to make sure that the rmi object is in a thread
outside of the container. Then your right back in the situation of how do you
portably launch an object that can be found in the app server's JNDI and
shared by ejbs?

I suppose you'd have to start the app server, and from an app get the
initialContext()
create the rmi object, put it in JNDI. Then there are failover issues and on
and on.
HOw do you release the resources of the rmi object? It sounds like you'd need
a control program that watches over these non-container based resources.

I'm groping for a portable solution. Not one that has to take advantage of
a value-added feature of a particular app server.

>
>
> > --
> > Rickard �berg
> >
> > @home: +46 13 177937
> > 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]



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

Reply via email to