users@glassfish.java.net

JMS and Access Manage Server

From: <glassfish_at_javadesktop.org>
Date: Mon, 02 Apr 2007 08:18:22 PDT

I got a Client Authentication Error when I tried to call an Stateless Session Bean from a MessageBean. The code is:

initial = new InitialContext();
objref = initial.lookup(JNDI_ORDER_MANAGER);
OrderManagerHome home =
(OrderManagerHome)PortableRemoteObject.narrow(objref, OrderManagerHome.class);
OrderManager OrderMgr = home.create();

The home.create failed and got an Corba Permission Error. The EJB is protected by a fxes_trader role using AccessManager 7.0 and J2EE Policy Agent 2.2. The Message Bean and SessionBean is in the same jar file and The MessageBean has a run-as fxes_trader in ejb-jar.xml. I am wondering how the appserver controller authentication when calling a session bean from the MessageBean in the same container? Our Application Server is SunOne 8.2.

We figured out how to call Sun AppSever 8.2 EJB from a Swing Client using Access Manager and policy agent but we are not able to resolve how to call the protected EJB from an MessageBean in the same container.

Any help ?

Thanks.

Jason
[Message sent by forum member 'jasonxboston' (jasonxboston)]

http://forums.java.net/jive/thread.jspa?messageID=210877