Ray, the problem is quite simple. I have two Orion servers. One server is
running an EJB application model, the other server is running JSP client
application. From the JSP server, I try to access the EJB server, by
creating an InitialContext with the same parameters that I would if I was
trying to connect to the EJB application using a standalone client
(appplication-client.xml and ApplicationClientInitialContextFactory). At
this point, I get a NullPointerException on the Client (JSP Server) side
telling me that the "domain was null".
The exact same code, works correctly when running as a standalone
application, however, when put into the JSP Server, produces this exception.
Some people suggested using ApplictionInitialContextFactory, however, since
ApplicationInitialContextFactory reads application.xml, I have no place to
put my <ejb-ref> tags to reference the objects in the EJB application.
Other people suggested playing around with rmi.xml. This, however, hardly
seems standard. I am trying to write code that is J2EE compliant without
having to use any of the Orion specific features.
So I am at a standstill. It's hard to believe that no one ran into this
problem. In many cases it does not make sense to deploy the client and
server on the same physical machine. Our JSP clients are running on the
public internet while our EJB models are running on the private internet not
accessible from the outside. Also, since we have many clients, we
anticipate having a "farm" of EJB servers running the model, and a "farm" of
JSP servers accessing this model. I am amazed that no one has stumbled onto
this problem.
If you have two Orion servers running, put the following code on one of the
servers:
Properties p = new Properties();
p.setProperty(Context.PROVIDER_URL,
"ormi://<target-host>/<application-name>");
p.setProperty(Context.INITIAL_CONTEXT_FACTORY,
"com.evermind.server.ApplicationClientInitialContextFactory");
p.setProperty(Context.SECURITY_PRINCIPAL, "<user>");
p.setProperty(Context.SECURITY_CREDENTIALS, "<password>");
InitialContext ctx = new InitialContext(p);
You will need to replace <target-host>, <application-name>, <user> and
<password> with values for your system. You will need to put the
application-client.xml in to the proper directory. For a web application,
this file should go into WEB-INF/classes/META-INF/application-client.xml.
-AP_
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Ray Harrison
Sent: Monday, April 02, 2001 8:16 PM
To: Orion-Interest
Subject: Re: Help me please "domain was nul" message is killing me
here...
Alex -
Is there any chance you could zip up a small amount of code that recreates
your problem? You had
better include examples of your orion config files too. Or at least if you
could provide lots of
information code snippets and the like - that would be great! Give us what
you can and we may be
able to help...
Cheers
Ray
--- Alex Paransky <[EMAIL PROTECTED]> wrote:
> Does anyone know what the "domain was null" message means? How do I get
rid
> of it. Where do I specify a domain? HEEEEEELP, someone please. I have
> been posting this question for the last 3 weeks, and still I have no
> answers.
>
> Please, please please, help.
>
> -AP_
>
> PS: Is this what it takes to get a question answered? Is there a
different
> forum for paying customers? If I pay $1500, will I get my questions
> answered faster?
>
>
__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/?.refer=text