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,
As you are in-VM, I am not sure if you will actually use the HA-JNDI server by using:
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.
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!
then set a dependency tag between your mbean and HA-JNDI
Ok, I'll try this, but Bill Burke told me that the non-serializability is a problem too....
What do you mean?
I think he means this part:
StringRefAddr addr = new StringRefAddr("nns", "java:/ExitService");
Reference ref = new Reference(this.getClass().getName(), addr, NonSerializableFactory.class.getName(), null);
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...
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,
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 ;)