Hi,
If it is just testing and you need it quick. Then do something like this:
Provide a name and mappedNamed for the Bean as below:
@Stateful(name="itemdetails", mappedName="IteamdetailsBeanJNDI")
public class IteamdetailsBean implements Iteamdetails{
..................}
This' information is used by the descriptor for access for the client.
In the client:
try{
InitialContext ctx=new InitialContext();
Iteamdetails iteamdetails=(Iteamdetails)ctx.lookup("IteamdetailsBeanJNDI");
.................
iteamdetails is the remote interface.
That should work.
eve
> From: abhijit.sarcar_at_gmail.com
> To: Kenneth.Saks_at_Sun.COM
> CC: ejb_at_glassfish.dev.java.net
> Date: Thu, 6 Dec 2007 22:44:00 +0530
> Subject: RE: How to access a secure EJB from stand-alone client
>
> Hi,
>
> Thanks for the reply. I was using an App client but it needed to be built
> and deployed whenever changed. For faster testing, I resorted to a
> standalone client.
>
> I'm currently trying JAAS login using
> com.sun.appserv.security.AppservPasswordLoginModule class.
>
> Getting the error-
> "java.util.MissingResourceException: Can't find resource for bundle
> sun.security.util.Resources, key unable to instantiate LoginModule:"
>
> Pls help.
>
> Regards,
> Abhijit
>
> -----Original Message-----
> From: Kenneth.Saks_at_Sun.COM [mailto:Kenneth.Saks_at_Sun.COM]
> Sent: Thursday, December 06, 2007 8:05 PM
> To: ejb_at_glassfish.dev.java.net; abhijit.sarcar_at_gmail.com
> Subject: Re: How to access a secure EJB from stand-alone client
>
> Abhijit Sarkar wrote:
> >
> > Hi,
> >
> > I'm getting the below exception when trying to access a secure EJB
> > (3.0). I'm using SJSAS 9.1 and EJB 3.0:
> >
> Hi Abhijit,
>
> This means the caller does not have the appropriate permissions to
> invoke the method. This is one of the portability problems with
> stand-alone clients. There is no portable client authentication API in
> Java EE. Your best bet is to write a Java EE Application Client
> component. When you run it, the Application Client Container will
> automatically perform the authentication. See the following entry in our
> EJB FAQ :
>
> https://glassfish.dev.java.net/javaee5/ejb/EJB_FAQ.html#AppClientDef
> >
> > init:
> >
> > deps-jar:
> >
> > compile-single:
> >
> > run-single:
> >
> > javax.naming.NamingException: ejb ref resolution error for remote
> > business interface <package name>.UserServiceRemote [Root exception is
> > java.rmi.AccessException: CORBA NO_PERMISSION 0 No; nested exception is:
> >
> > org.omg.CORBA.NO_PERMISSION: ----------BEGIN server-side stack
> > trace----------
> >
> > org.omg.CORBA.NO_PERMISSION: vmcid: 0x0 minor code: 0 completed: No
> >
> > at
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ejb-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: ejb-help_at_glassfish.dev.java.net
>
_________________________________________________________________
Telly addicts unite!
http://www.searchgamesbox.com/tvtown.shtml