WebSphere Application Server - How to acces specific resource in a server in clustering

This is Interesting: Free IT Magazines  
Home > Archive > WebSphere Application Server > August 2007 > How to acces specific resource in a server in clustering





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author How to acces specific resource in a server in clustering

2007-08-09, 7:24 am

Hi all,
I have this environment:
-WebSphere 5.1
-1.4.2 IBM jvm

We have 2 server in clustering with 2 nodes with load balancing, so -->

cell/nodes/myNode1/servers/myWSServer1
cell/nodes/myNode2/servers/myWSServer2

I need to lookup a resource from both servers, so I tried to lookup the JNDI name using the "full path" -->

context.lookup("cell/nodes/myNode1/servers/myWSServer1/ejb/myEjb");
context.lookup("cell/nodes/myNode2/servers/myWSServer2/ejb/myEjb");

but what I get is not what I expected, because the resource that is given to me is independet from the "path" I use, and it comes from one server or the other, dependig on the load balancing...

I also tried to use Persistent Namespace Binding -->
I set two different Persistent binding for two EJBs (the "same" EJB in two servers), but when I make the lookups I get the EJBs in the same server...

There's a way to do what I'm trying to do?


Thanks in advance


nihilim
Ben_

2007-08-09, 1:23 pm

If they are clustered, they are supposed to be identical.

Why are you interested in speaking to a particular instance ?

2007-08-13, 7:24 am

We have to call a static method of an object loaded in memory...

So I thought that it could be done via EJB, but we have the problem of the 2 environment...


nihilim
Paul Ilechko

2007-08-13, 7:24 am

master76@libero.it wrote:
> We have to call a static method of an object loaded in memory...
>
> So I thought that it could be done via EJB, but we have the problem of the 2 environment...
>


You'd likely have a problem even in one environment, with classloader
issues. You should never expect to have a true singleton in a J2EE
application, and should design accordingly. The developer does not
control deployment, and should not architect a system that has
deployment specific dependencies.

2007-08-17, 7:27 am


> You'd likely have a problem even in one environment,
> with classloader
> issues. You should never expect to have a true
> singleton in a J2EE
> application, and should design accordingly. The
> developer does not
> control deployment, and should not architect a system
> that has
> deployment specific dependencies.


I know it, but I was asked to look for a possible solution...

I think we'll leave this problem... it was a sort of study case...

Thank you


nihilim


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com