This is by no means "stylistic": it is required by the EJB spec. Get it from
java.sun.com and read it!

Only local beans can participate in container managed relationships

Bernhard


-----Ursprüngliche Nachricht-----
Von: Nathaniel Rahav [mailto:[EMAIL PROTECTED]]
Gesendet: Dienstag, 21. Januar 2003 06:47
An: [EMAIL PROTECTED]
Betreff: [JBoss-user] CMR with Remote Objects



Dear JBoss Users, 

Is the following pseudocode permissible in a separate JVM from the JBoss 
server: 

Object1Home firstHome = lookupHome ( "object1" )

Object1 firstRemoteObject = firstHome.create (...)

Object2Home secondHome = lookupHome ("object2")

Object2 secondRemoteObject = secondHome.create (...) 

** this is the operation in question ***

secondRemoteObject.setObject1 ( firstRemoteObject )

** where "setObject1" is a CMR method **


The reason I ask if this is possible is that, in all the code 
samples i have come across, the CMR methods accept and return EJBLocal 
refs. I am wondering if this is a stylistic choice or if there is a 
functional reason for it. though I understand the 
design flaws in EntityBeans exposing themselves to direct calls from the 
client, I am just trying to unit test my beans using JUnit, and want to 
test CMR by passing objects over the wire. 

Currently, I am executing code similar to above, and I'm receiving a 
"ClassCastException" from the server. 


Any ideas ? please CC me directly on your responses . 

thanks in advance

Nathaniel






-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

This e-mail and any attachment is for authorised use by the intended recipient(s) 
only.  It may contain proprietary material, confidential information and/or be subject 
to legal privilege.  It should not be copied, disclosed to, retained or used by, any 
other party.  If you are not an intended recipient then please promptly delete this 
e-mail and any attachment and all copies and inform the sender.  Thank you.


-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to