Hi Stefan,
Definatly u will get exceptions related to security.
Beacause applet will be needed the code to use that is
on ur machine (i.e code for jndi implemetation etc).
So either try with trusted applet.
Secondly u have not written how are u passing the
properties to ur InicialContext object that contains
the name of the class to be used for entry point to
jndi implementation provided by ur app server vendor.
That u generally provide by command line in case of
application (As for running application using the
WebLogic app server
java -Djava.naming.factory.initial
=weblogic.jndi.WLInitialContextFactory Client
)
If u are not providing this property value required by
InitialContext use InitialContext(java.util.Properties
pr) constructor. And in pr set the Property
naming.factory.initial  = name of initial context
factory class provided with app. server u are using.

-Manish
--- Erik Ertzeid <[EMAIL PROTECTED]> wrote:
> It is not possible - major bug in the RI consept (my
> opinion) - will
> hopefully be fixed SOON.
>
> Erik Ertzeid
>
> "Prange, Stefan" wrote:
> >
> > Hi everybody,
> >
> > does anybody know a working way to get a reference
> to an EJB-home from
> > inside an applet?
> >
> > I'm using Suns j2sdkee1.2 reference implementation
> and try to run my applet
> > within the Java-Plugin.
> >
> > I got many security-exception and for most of them
> i could give the
> > requested permission in my java.policy file.
> > That worked until the Applet requested the
> java.lang.FilePermission (read)
> > for a file that doesn't exist:
> > C:\Programme\JavaSoft\JRE\1.2\nativelib
> >
> > In my applets init()-method I try to create an
> InitialContext in this way:
> >
> >         InitialContext ctx = new InitialContext();
> >         Object objrefContact =
> ctx.lookup("contact");
> >         homeContact = (ContactHome)
> > PortableRemoteObject.narrow(objrefContact,
> ContactHome.class);
> >
> > Unfortunately, one of these lines throws the
> follwing Exception:
> > Cannot instantiate class:
> com.sun.enterprise.naming.EJBInitialContextFactory
> >
> > Can anybody tell me, how to get a remote reference
> to an EJB-Home from
> > inside an applet?
> >
> > Thanks in advance,
> > Stefan
> >
> > >
>
------------------------------------------------------------------------
> > > Stefan Prange
> > >
> > > Volkswagen AG
> > > Brieffach 1819
> mailto:[EMAIL PROTECTED]
> > > D-38436 Wolfsburg
> > > Germany
> > Tel.: +49-5361-9-77728
> > Fax.: +49-5361-9-71223
> >
> >
>
===========================================================================
> > To unsubscribe, send email to
> [EMAIL PROTECTED] and include in the body
> > of the message "signoff EJB-INTEREST".  For
> general help, send email to
> > [EMAIL PROTECTED] and include in the body of
> the message "help".
>
>
===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED]
> and include in the body
> of the message "signoff EJB-INTEREST".  For general
> help, send email to
> [EMAIL PROTECTED] and include in the body of the
> message "help".
>
>
__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to