tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Blevins <david.blev...@visi.com>
Subject Re: A confused scenario : a non-existent EJB node also can run?
Date Fri, 04 Sep 2009 20:17:40 GMT
Hi Siqi,

I saw your other note on this being something that affects a Geronimo  
console bug you're attempting to fix.  Going to move it over to the  
Geronimo dev list as we might be able to take a different route to get  
the info we want.

-David

On Sep 1, 2009, at 2:02 AM, Siqi Du wrote:

> Hello,
> Thanks for your review. Here I need to monitor the ejb nodes, so I  
> try this
> code:
>
>            Properties props = new Properties();
>            props.setProperty(Context.INITIAL_CONTEXT_FACTORY,
>
> "org.apache.openejb.client.RemoteInitialContextFactory");
>            props.setProperty(Context.PROVIDER_URL, "ejbd://" + ip +  
> ":"
> + port);
>            props.setProperty(Context.SECURITY_PRINCIPAL, userName);
>            props.setProperty(Context.SECURITY_CREDENTIALS, password);
>            ...
>            Context ctx = new InitialContext(props);
>
> Firstly, I tried a wrong ip. Yes, I got the expected exception.
> Secondly, I tried a right ip. It's OK, still right.
> Thirdly, I tried the wrong ip again, it also ran well. Here I was  
> confused
> and looked into the code of  openejb and found something in
> package org.apache.openejb.client.
>
> In method Client.processRequest() the code always consider we are in a
> clustering environment and put the only server in a ClusterMetaData.
> But in the default connection strategy StickyConnectionStrategy,  
> this part
> of code will never run.
>
>       if (locations.length == 0){
>            return connect(server.getLocation());
>        }
>
> I guess this code wants to deal with the non-clustering environment,  
> is that
> a conflict with Client.processRequest()?
>
> Can we provide an api to connect to a non-clustering environment?
> Or may there is a way already, please tell me. ^_^
>
> Thanks!
>
> -Siqi


Mime
View raw message