Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

EJB Method Parameters

Status
Not open for further replies.

endrasenn100

Programmer
Mar 3, 2005
1
0
0
ZA
Hi,

I would like to know if it is possible to a pass plain java object ( POJO ) to an EJB method eg. a create method or business method on a session bean. I am using Local Interfaces on my EJB, but receive a linkage errors when I try to do this ( java.lang.LinkageError: loader constraints violated when linking ). I am using Sun ONE Studio 5 with Sun Application Server 7.

Thanks
 
Well, one of the J2EE Patterns (TransferObject) requires that an EJB (in this case a Facade Stateless Session Bean) take in a POJO object in its parameters, so it should work for you.

The LinkageError indicates that some class that your POJO uses has incompatibly changed since the POJO was last compiled. Suggest you recompile the entire server app and redeploy.

Tim
 
Thank you for the reply Tim.

The POJO that I was trying to pass to the EJB method was defined within a web module. This caused the Linkage error.

Endrasen
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top