On Fri, 24 Sep 1999 18:15:49 -0400, Tom Valesky <[EMAIL PROTECTED]>
wrote:

>I didn't explain it in my book because I was trying not to write a
>Weblogic-specific book. There were a few areas where I couldn't avoid it,
>of course, but I put a lot of effort into writing code that would work in
>_any_ server (even ones that have yet to be written).

I didn't mean for my question to be Weblogic-specific. What I was
trying to figure out, simply, was how does a client app determine the
hostname and port number of the ejb server so it can locate it on the
network.  I would assume that is on-topic for this list, but since I
used your example with Weblogic to illustrate the question, a list cop
decided to take issue with my post. (I put your name in the subject
line because I assumed you read this list and I thought it might catch
your eye and prompt a response from you. :)

Someone else sent me (off-list) a pointer to the sample code you
reference below, and I was able to use that to rewrite your example so
the hostname and port number are passed in as command line parameters.

Overall, I still think your book is one of the better EJB books on the
market at the moment. I spent about 45 minutes at Borders flipping
through about a half-dozen before I selected yours.


>
>
>I'm guessing that the trouble you're having is because the InitialContext
>needs to be fiddled with in order to work against a remote machine. Here's
>a method from one of the Weblogic sample classes that should do the trick.
>
>  static public Context getInitialContext() throws Exception {
>Hashtable h = new Hashtable();    h.put(Context.INITIAL_CONTEXT_FACTORY,
>"weblogic.jndi.WLInitialContextFactory");    h.put(Context.PROVIDER_URL,
>url);    if (user != null) {      System.out.println ("user: " + user);
>h.put(Context.SECURITY_PRINCIPAL, user);      if (password == null)
>password = "";      h.put(Context.SECURITY_CREDENTIALS, password);    }
>return new InitialContext(h);  }
>
>
>You'll probably also be missing some stub classes. The easiest way to make
>sure you've got everything you need is to use automated tools.
>Here's a document on how to prepare a client-side .zip file for
>distribution with applications.
>http://www.weblogic.com/docs/techdeploy/verbosetozip.html
>and here's one for applets
>http://www.weblogic.com/docs/techdeploy/appletarch.html
>
>
>
>> is how to have the client run on a separate
>> machine from the server. Somehow, the "HelloBean" name gets bound to
>> localhost:7001, and I'll be damned if I can find where this happens.
>> None of the Weblogic or Sun docs I've searched have been any help
>> either. The only thing I've found is vague statements like "JNDI
>> interfaces with other naming services..." Can someone point me in the
>> right direction? I would appreciate it very much.
>>
>> ===========================================================================
>> 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".
>>
>
>============================================================================
>Tom Valesky -- [EMAIL PROTECTED] -- http://www.patriot.net/users/tvalesky
>
>===========================================================================
>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".

Reply via email to