Yes, sure, as a ressource.

But the problem I was mentionning is regarding RMI dynamic classloading and
the way the URLClassLoader is set in the JBoss code: it points to the local
filesystem and not to the http:// integrated web server.

Cheers,



                                Sacha



P.S.: see the bug report on sourceforge for more info

> -----Message d'origine-----
> De : [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]De la part de Nicholas
> Envoye : vendredi, 1 juin 2001 13:59
> A : [EMAIL PROTECTED]
> Objet : RE: [JBoss-user] Access to EJB from APPLET
>
>
> Sacha;
>
> I am not that familiar with the client side, but in
> the JBoss server code, the jndi.properties file is
> loaded as a class resource, implying that it must
> simply exist somewhere in the classpath. If this is
> the case in the client, surely the file could simply
> reside in a downloaded jar file, no ?
>
> //Nicholas
>
> --- Sacha Labourey <[EMAIL PROTECTED]>
> wrote:
> > Hello,
> >
> > Nevertheless, after you you'll have solved all you
> > problems, you'll not be
> > able to make applet access EJB in the current code
> > status. Due to a bug, the
> > dynamic classloading does not work (if apps are not
> > on the same host than
> > the server). The RMI subsystem, when unmarshalling
> > your stub, will get a
> > file URL codebase (file://c:/jboss/...) relative to
> > your JBoss server. Any
> > app will try to download class from it, fail (if
> > distant) and try the local.
> > Applets will try and raise a security exception.
> >
> > Vladimir Blagojevic and I have been discussed this
> > issue and haven't found a
> > true clean solution. We have tried to get some
> > support/hints from Rickard
> > but he seems to have left the JBoss planet for some
> > time. ;)
> >
> > You may also try to simply sign your applet (what I
> > did).
> >
> > Cheers,
> >
> >
> >
> >                                     Sacha
> >
> >
> >
> > > -----Message d'origine-----
> > > De : [EMAIL PROTECTED]
> > > [mailto:[EMAIL PROTECTED]]De
> > la part de Alexander
> > > Kogan
> > > Envoyi : vendredi, 1 juin 2001 02:39
> > > @ : [EMAIL PROTECTED]
> > > Objet : Re: [JBoss-user] Access to EJB from APPLET
> > >
> > >
> > > Do you have j2ee.jar somewhere in the classpath?
> > > for your browser, for instance?
> > >
> > >
> > > "Rafael S. V. Guimarces" wrote:
> > > >
> > > > I did your sugestion, but the error continues.
> > Thanks anyway.
> > > > I have tried passing parameters to applet, but
> > the error continues. like
> > > > this:
> > > >
> > > > HTML
> > > >
> >
> =======================================================================
> > > > <APPLET CODE="TestClientApplet.class"
> > archive="teste.jar" NAME="Hello"
> > > > WIDTH=0 HEIGHT=0>
> > > > <param name="java.naming.factory.initial"
> > > > value="org.jnp.interfaces.NamingContextFactory">
> > > > <param name="java.naming.provider.url"
> > value="150.162.51.45:1099">
> > > > </APPLET>
> > > > ====================================
> > > > TestClientApplet.java
> > > > ====================================
> > > > ...
> > > > Hashtable env = new Hashtable();
> > > > env.put(Context.APPLET, this);
> > > > Context ctx = new InitialContext(env);
> > > > ...
> > > >
> > > > If  i'm passing parameters, why does "new
> > InitialContext(env)"
> > > is looking
> > > > for "C:\WINNT\Java\lib\jndi.properties" ???
> > > >
> > > > > I am not sure about any specific JBoss issues
> > here,
> > > > > but your applet (by default) will be
> > prohibited from
> > > > > reading any local OS files such as
> > > > > C:\WINNT\Java\lib\jndi.properties as a result
> > of the
> > > > > Applet security model.
> > > > >
> > > > > I am not sure why your InitialContext request
> > should
> > > > > need to lookup that file, since you have
> > supplied all
> > > > > the properties needed in your code, but a
> > solution
> > > > > would be to insert the jndi.properties file
> > into your
> > > > > Applet JAR file.
> > > > >
> > > > > //Nicholas
> > > > >
> > > > >
> > > > > --- "Rafael_S._V._Guimarces"
> > <[EMAIL PROTECTED]>
> > > > > wrote:
> > > > > > I'm trying to access may EJB from an applet,
> > but my
> > > > > > browser give me this error:
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> com.ms.security.SecurityExceptionEx[finCalc/stateless/TestClientAp
> > > plet.teste
> > > > 2]:
> > > > > > cannot access file
> > C:\WINNT\Java\lib\jndi.properties
> > > > > >  at
> > > > > >
> > com/ms/security/permissions/FileIOPermission.check
> > > > > >  at com/ms/security/PolicyEngine.deepCheck
> > > > > >  at
> > com/ms/security/PolicyEngine.checkPermission
> > > > > >  at
> > com/ms/security/StandardSecurityManager.chk
> > > > > >  at
> > > > > >
> > com/ms/security/StandardSecurityManager.checkRead
> > > > > >  at java/io/FileInputStream.<init>
> > > > > >  at
> > > > > >
> > > > >
> >
> com/sun/naming/internal/VersionHelper11.getJavaHomeLibStream
> > > > > >  at
> > > > > >
> > > > >
> >
> com/sun/naming/internal/ResourceManager.getApplicationResources
> > > > > >  at
> > > > > >
> > > > >
> >
> com/sun/naming/internal/ResourceManager.getInitialEnvironment
> > > > > >  at javax/naming/InitialContext.init
> > > > > >  at javax/naming/InitialContext.<init>
> > > > > >  at
> > finCalc/stateless/TestClientApplet.teste2
> > > > > >
> > > > > > I already checked
> > C:\WINNT\Java\lib\jndi.properties,
> > > > > > and its ok; i tried passing parameters to
> > applet,
> > > > > > but the problem persists.
> > > > > >
> > > > > > Here is my code:
> > > > > >
> > > > > > Properties prop = new Properties();
> > > > > > prop.put(Context.INITIAL_CONTEXT_FACTORY,
> > > > > > "org.jnp.interfaces.NamingContextFactory");
> > > > > > prop.put(Context.PROVIDER_URL,
> > > > > > "150.162.51.45:1099");
> > > > > > Context ctx = new InitialContext(prop);
> > > > > > Object objref = ctx.lookup("MyEJB");
> > > > > > MyEJBHome home =
> > > > > >           (MyEJBHome )
> > > > > >
> > javax.rmi.PortableRemoteObject.narrow(objref,
> > > > > > MyEJBHome .class);
> > > > > >
> > > > > >
> > > > > >
> > > > > > Any help?
> > > > > >
> > > > > >
> > > > >
> > >
> >
> --------------------------------------------------------------------------
> > > > -------
> > > > > > Rafael Simues Vieira Guimarces
> > > > > > Grupo Stela
> > > > > > Programa de Pss-Graduagco em Engenharia de
> > Produgco
> > > > > > - PPGEP
> > > > > > Universidade Federal de Santa Catarina -
> > UFSC
> > > > > >
> > > > >
> > >
> >
> --------------------------------------------------------------------------
> > > > -------
> > > > > > E-mail : [EMAIL PROTECTED]
> > > > > > Home-page : http://www.stela.ufsc.br
> > > > > > Fone/fax : +55 48 331-7016
> > > > > > Enderego : Rua Lauro Linhares, 2123 - Edif.
> > Trindade
> > > > > > Center - Bloco B, 2o. andar
> > > > > > CEP 88036-000 - Florianspolis - SC - Brasil
> > > > > >
> > > > >
> > >
> >
> --------------------------------------------------------------------------
> >
> === message truncated ===
>
>
> =====
> Nicholas Whitehead
> Home: (973) 377 9335
> Cell: (973) 615 9646
> [EMAIL PROTECTED]
>
> Laugh your pants off with Lionel at eYada.com.
>
> __________________________________________________
> Do You Yahoo!?
> Get personalized email addresses from Yahoo! Mail - only $35
> a year!  http://personal.mail.yahoo.com/
>
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
>


_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to