Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Doubt in EJB declaritive security errors

0 views
Skip to first unread message

Krithika Venugopal

unread,
Jul 24, 2001, 10:14:26 AM7/24/01
to
Hi,
I have deployed declarative security for a simple stateless session
EJB named MyWorld. I have secured all the methods of the EJB. See the
deployment descriptor below..
<method>
<ejb-name>MyWorld</ejb-name>
<method-name>*</method-name>
</method>

The EJB has a 'wishWorld()' method apart from the usual methods like
ejbcreate(), ejbRemove() etc.

My client program is like the following:

try
{
world = home.create();
}
catch(Exception e)
{
System.out.println( "Create failed" + e.getMessage() +
e.fillInStackTrace() + e.toString());
return;
}
try{
myStr = world.wishWorld();
}
catch(Exception e)
{
System.out.println( "World call failed" );
return;
}

When I run the program, I get an error in the wishWorld method
invocation and not in the create method invocation. When I have
secured all the methods of the EJB, why is the create method
invocation not throwing any error.
The error I get is the following :

Remote exception in calling the World bean: Security violation:
insufficient permission to access method
java.rmi.RemoteException: Security violation: insufficient permission
to access method
at weblogic.rmi.extensions.AbstractRequest.sendReceive(AbstractRequest.java:76)
at test.MyWorldBeanEOImpl_WLStub.wishWorld(MyWorldBeanEOImpl_WLStub.java:212)
at test.MyWorldBeanEOImpl_ServiceStub.wishWorld(MyWorldBeanEOImpl_ServiceStub.java:141)
at World.main(World.java:90)

Thanks,
Krithika

0 new messages