-
1. Re: HA JNDI for MBeans
feldgen Sep 30, 2002 5:01 AM (in response to feldgen)Hi again,
does this not-answering to my question mean that my fault is too obvious to tell or does it mean that someone is working on that question and yet had no time to answer?
Thnx in advance,
lfeldgen -
2. Re: HA JNDI for MBeans
slaboure Sep 30, 2002 11:47 AM (in response to feldgen)As you are in-VM, I am not sure if you will actually use the HA-JNDI server by using:
p.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
p.put(Context.URL_PKG_PREFIXES,"jboss.naming:org.jnp.interfaces");
p.put(Context.PROVIDER_URL,""); //for auto-discovery
Instead, in Context.PROVIDER_URL, set the actual value (such as localhost:1100) and this should work. I suspect that you current code will only work with the local jNDI tree, not the HA.
Cheers,
sacha -
3. Re: HA JNDI for MBeans
feldgen Oct 7, 2002 4:19 AM (in response to feldgen)I tried this already but I can imagine that HA-JNDI is not deployed at the time my MBean is deployed...
I'll try that!
Thnx,
lfeldgen -
4. Re: HA JNDI for MBeans
slaboure Oct 7, 2002 6:04 AM (in response to feldgen)then set a dependency tag between your mbean and HA-JNDI
-
5. Re: HA JNDI for MBeans
feldgen Oct 8, 2002 10:53 AM (in response to feldgen)Ok, I'll try this, but Bill Burke told me that the non-serializability is a problem too....
-
-
7. Re: HA JNDI for MBeans
feldgen Oct 10, 2002 6:48 AM (in response to feldgen)I think he means this part:
NonSerializableFactory.bind("java:/ExitService", this);
StringRefAddr addr = new StringRefAddr("nns", "java:/ExitService");
Reference ref = new Reference(this.getClass().getName(), addr, NonSerializableFactory.class.getName(), null);
ic.bind("java:/ExitService", ref);
Ok, I managed it to find my ExitService across the cluster, but my new EntranceServiceEJB wich works as wrapperBean behind my Entrance MBean does not really find the Bean-Instances on the other nodes...i can see the HA.-JNDI-lookup on the other node but work is all done lokally...
I think i have to check what causes this... -
8. Re: HA JNDI for MBeans
feldgen Oct 10, 2002 8:10 AM (in response to feldgen)Funny, the forum asks me to login while im logged in. so i dont know if my last post is already saved, it is not displayed...
plz accept my apologies if these posts are displayed multiple times:
I posted a reply one hour ago but i can't see it...so i try again:
I think Bill Burke meant the call to the nonserializablefactory...
Nevertheless after changing the JNDI-Names in deployment-descriptor my exit MBean is found from my new wrapperBean ExitSessionEJB...across nodes!
So one half of the problem is solved ;)
The other half:
I have a MBean which gets an amount of requests. every request will be passed (with the homeInterface of my Entrance running on all nodes) to a thread which calls a new EntranceSessionEJB to delegate these requests to the entrance...
I think this should work, but if there is a design error plz tell me ;)
This entry-point handling works well with one node. the problem with many nodes is that i can see "HA-JNDI lookupLocal" on other nodes but the work is done on the node with this entrance.
Is anything in my design with the threads which prevents load-balancing? I read loads in the forum but i couldn't figure out if maybe the round-robin is the cause or if this "load-balancing is made per client" is the part that i misunderstood...
Thnx for any help,
lfeldgen -
9. Re: HA JNDI for MBeans
feldgen Oct 10, 2002 1:02 PM (in response to feldgen)I found a workaround for my last problem, but maybe this could be solved better:
The fact that my HA-JNDI-lookup from the MBean outside my application finds the desired beans already in local JNDI prevents it from using the beans on other nodes.
My workaround is not to deploy my application on the node where the mbean is running, so that a real HA-JNDI-lookup is performed and load-balancing is used.
This splitting of entrance and application is not what i really want, so if anyone has some better ideas, they are really welcome ;)