The problem is a lack of information, the handle and the proxy object
has. If you look into
org/jboss/ejb/plugins/jrmp/interfaces/EntityHandleImp.java, you can see
it. The implementation of 'getEJBObject()' simply calls 'new
InitialContext()' and gets the root context of JBoss2 on host2. To
reobtain the entity one needs the root context of JBoss1 on host1, where
the home interface of the baen is bound to 'name'.
The handle does not have the information, where to find its own home
interface. As far as I can see, not even the proxy object itself has
this information.
To fix this, all proxy objects need to know the host, they are
originating from. So the can say something like
Hashtable env = new Hashtable();
env.put("java.naming.factory.initial",
"org.jnp.interfaces.NamingContextFactory");
env.put("java.naming.provider.url", host);
new InitialContext(env).lookup(name);
-alf
Scott M Stark wrote:
> I have not tried this case so I'm not sure that its the same problem. The
> problem seen by Anatoly has been fixed in the main branch so you could
> try your test case against the latest cvs code if you want.
>
> ----- Original Message -----
> From: "Francisco Reverbel" <[EMAIL PROTECTED]>
> To: "JBoss-Dev" <[EMAIL PROTECTED]>
> Sent: Thursday, April 26, 2001 3:39 AM
> Subject: Re: [JBoss-dev] Bug in jnp (handling references to remote JNDI servers)
>
>
>
>> I run into a similar problem with EJB handles:
>>
>> BeanA is on host1, JBoss1
>> BeanB is on host2, JBoss2
>>
>> BeanA creates an EJB handle to one of its entity beans and saves it in a
>> file or database. BeanB somehow gets the serialized handle, deserializes
>> it, and attempts to use it. This does not work: JBoss2 does not attempt
>> to contact the remote server on host1.
>>
>> Francisco
>> --
>> Francisco Reverbel, Assistant Professor
>> Department of Computer Science [EMAIL PROTECTED]
>> University of Sao Paulo, Brazil http://www.ime.usp.br/~reverbel/
>>
>
>
>
>
> _______________________________________________
> Jboss-development mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-development
--
Alf Werder | System Engineering | TOMORROW Technologies GmbH
Oberstra�e 14b | D-20144 Hamburg
Mail: [EMAIL PROTECTED]
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development