javax.ejb.Handle implementations can't find a target object
-----------------------------------------------------------

         Key: JBREM-52
         URL: http://jira.jboss.com/jira/browse/JBREM-52
     Project: JBoss Remoting
        Type: Bug
 Environment: JBoss 4.0.1RC2
    Reporter: Maxim Karavaev
 Assigned to: Tom  Elrod 
    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



-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
JBoss-Development mailing list
JBoss-Development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to