Thanks for your help. Even though I followed you instructions this error
ocurred.

java.lang.SecurityException: Not allowed to look up java:comp/env/ej
b/CalendarReminderHome, check the namespace-access tag setting in
orion-applicat
ion.xml for details

I thought that you didn't need any settings in the XML files when you used
this syntax?

Properties prop = new Properties();
prop.setProperty("java.naming.factory.initial","com.evermind.server.rmi.RMII
nitialContextFactory");
prop.setProperty("java.naming.provider.url","ormi://foo.com/appName");
prop.setProperty("java.naming.security.principal","admin");
prop.setProperty("java.naming.security.credentials","123");
Context con = new InitialContext(prop);

Any ideas?

/M Andersson

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of David Ekholm
Sent: 21 December 2000 17:21
To: Orion-Interest
Subject: RE: Access EJB's from a standalone client.


In order to connect a stand-alone client to my EJBs I place a
jndi.properties file next to the .class files of the client like this
------------------------------
java.naming.factory.initial=com.evermind.server.rmi.RMIInitialContextFactory
java.naming.provider.url=ormi://hostNameOfOrionServer/yourAppName
java.naming.security.principal=admin
java.naming.security.credentials=passwordOfAdmin
----------------------------------------------

By using the RMIInitialContextFactory I don't have to deal with creating an
extra META-INF directory + XML file for the client. If I want to leave the
jndi.properties file out completely, I can put the content inside a
Properties object and pass it as parameter to new InitialContext().

Then I copy these jar files from the orion directory to the client computer:
ejb.jar, jndi.jar, mail.jar, orion.jar, xerces.jar (2.86 MB in total)

I finally run the client and pass the path of the following jar files as
classpath:
orion.jar, ejb.jar, jndi.jar
I also add the path to the ejb.jar file containing the home- and remote
interfaces of my EJB application.
Orion will automatically and instantly create stub code from the interfaces
when I run the application.

/David


Reply via email to