Hi there,
what u said had solved my obtaining context problem...however, it
still doesn't work. :(
I already have an EJB deployed at mysite, with application name =
'stamp'...however, I have another site, which is where the servlet
resides, say othersite.
If in the servlet, I don't provide a provider.url, how would it know
where is the bean??
Also, if I have a app, with name 'stamp', is the url going to be
ormi://mysite/stamp ??
As I have the servlet and EJB deployed separately, would they be able
to find each other? since the servlet's app name = 'test', and EJB's
name = 'stamp'.
Since apparently, I have this exception...
javax.naming.NamingException: Error instantiating web-app
JNDI-context: No location specified and no suitable instance of the
type 'stamp.ejb.Stamp' found for the ejb-ref ejb/StampHome
I don't understand what this message means, as stamp.ejb.Stamp is my
remote class...
Also, anyone can tell me how to run two orion servers on the same
computer?? I understand that u might have to change the ports, but
how would applcation specify which server is which?
James.
On Fri, 15 Sep 2000 12:40:36 +0100, you wrote:
>> In the init() method of the servlet, I had...
>> env.put("java.naming.factory.initial","com.evermind.server.Applica
>> tionClientInitialContextFactory");
>> env.put("java.naming.provider.url","ormi://mysite/stamp");
>> env.put("java.naming.security.principal","admin");
>> env.put("java.naming.security.credentials","passwd");
>> context = new InitialContext(env);
>
>James,
>
>The factory you've specified as a parameter is
>com.evermind.server.ApplicationClientInitialContextFactory, which is
>designed for application-clients. From within a servlet, a
>com.evermind.server.ApplicationInitialContextFactory should be used instead.
>By default, all the required properties for the InitialContext will be
>already set in the system properties by Orion.
>
>Short answer, use : context = new InitialContext(); // no properties
>
>-Joe Walnes
>
>