[ http://jira.jboss.com/jira/browse/JBAS-1620?page=history ]
Scott M Stark closed JBAS-1620:
-------------------------------
Resolution: Rejected
If you want the handle to remember the JNDI environment tha was in effect when
it was created, use the org.jboss.naming.NamingContextFactory version of the
InitialContextFactory. The org.jnp.interfaces.NamingContextFactory allows one
to override the JNDI environment using a local jndi.properties.
> javax.ejb.Handle implementations can't find a target object
> -----------------------------------------------------------
>
> Key: JBAS-1620
> URL: http://jira.jboss.com/jira/browse/JBAS-1620
> Project: JBoss Application Server
> Type: Bug
> Versions: JBossAS-4.0.2RC1
> Environment: JBoss 4.0.1RC2
> Reporter: Maxim Karavaev
> Assignee: Scott M Stark
> Priority: Critical
>
>
> Handle implementations keeps an empty environment Hashtable for
> InitialContext.
> The test is very simple: on my client I put into system properties a wrong
> URL for server (simulates a situation, when we transfer a bean Handle to some
> computer, that is not knows, where the real server is).
> Just try my source:
> Hashtable env = new Hashtable();
> env.putAll( System.getProperties() );
> env.put( "java.naming.provider.url",
> System.getProperty( "realServerURL" ) );
> InitialContext ic = new InitialContext( env );
> Object ref = ic.lookup( "SomeBean" );
> SomeBeanHome home =
> ( SomeBeanHome )PortableRemoteObject.narrow( ref, SomeBeanHome.class );
> SomeBean beanA = home.create();
> Handle bh = beanA.getHandle();
> /*
> * here you will get a javax.naming.CommunicationException:
> * Receive timed out
> */
> EJBObject beanB = bh.getEJBObject();
> System.out.println( beanB.isIdentical( beanA ) );
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
JBoss-Development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-development