Pellerano Sandro wrote:
> 
> Hi,
> 
> J have problem calling an Entity bean from a Session bean using Jonas 20
> running on RMI.
> Can you give me a code example or some suggestion.
> 
> Her add an example and the XML descriptor
> 
>         javax.naming.Context ctx = new InitialContext();
>         Object obj = ctx.lookup("java:comp/env/ejb/orderHome");
>         orderHome home =
> (orderHome)PortableRemoteObject.narrow(obj,orderHome.class);
>         order sd = home.create(orderid,userid,cardid,amount);
> 
> Thank you
> 
Hi,
The current version of JOnAS doesn't treat the <ejb-ref> element in
deployment
descriptor.
So, if you want to call an entity bean in your Session bean
you must do a lookup with the <jndi-name> of your entity bean
I think that your example with
        javax.naming.Context ctx = new InitialContext();
        Object obj = ctx.lookup("ORDERSJNDI");
        orderHome home
=(orderHome)PortableRemoteObject.narrow(obj,orderHome.class);
        order sd = home.create(orderid,userid,cardid,amount);
must run.
Best regards,
-- 
        Philippe

Philippe Coq  Evidian   Phone: (33) 04 76 29 78 49
Bull S.A  - 1 rue de Provence - 38432 Echirolles Cedex France
Download our EJBServer at http://www.objectweb.org
----
To unsubscribe, send email to [EMAIL PROTECTED] and
include in the body of the message "unsubscribe jonas-users".
For general help, send email to [EMAIL PROTECTED] and
include in the body of the message "help".

Reply via email to