Passing a JavaBean Object to a EJB

Hi techies:

I am facing a problem as how to send a JavaBean object to a EJB.

Help me with some example code to rectify a error >>

Error: Stateless Session Bean can have only 1 ejbCreate method with no parameters.

This is the error when compiling and would request all to help me solve my problem of passing a JavaBean object to a Stateless Session Bean.

Looking to hear from you.

Sincere Regards

Ritesh

riteshr@suvistas.com

[491 byte] By [rraman78] at [2007-9-26 20:21:09]
# 1

If I understand it correctly, calling "create()" gives you a handle to the session bean. THEN you call a business method on that bean to do some work for you. Seems your solution is to pass the JavaBean object to the session bean as a parm in your BUSINESS METHOD call.

theBean = context.create();

answer = theBean.getAnAnswer(parm 1, parm2);

davewiltz at 2007-7-3 18:33:22 > top of Java-index,Other Topics,Patterns & OO Design...