This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes EJB: remote calling mechanism question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "EJB: remote calling mechanism question" Watch "EJB: remote calling mechanism question" New topic
Author

EJB: remote calling mechanism question

Mike Sever
Ranch Hand

Joined: Jul 24, 2006
Posts: 56
I'd like to make clear about it. For example, one ejb jar file deployed on app server on machine1, and another (same content) on machine2. Is it possible that one client connects to machine1, but ejb container on it considers too many beans in pool and then put the request to the other container on machine2? When does it happen? How? What is its flow?
Moreover,where is the naming server? Does it exist on app server when running(on both machines?)? What is the content of JNDI name after registering ejb? Is there any info about machine/port(one machine, or two)?
I'm new to its internal flow, eager to wait for any explanation? Thanks a lot!


<i>Mike</i>
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4968
    
    1

http://www.technicalfacilitation.com/get.php?link=naming

I think your first question is really asking is it possible to workload manage EJBs. Certainly it is. A properly developed application will spray EJB requrest to less busy servers. I think the actual implementation of this functionality has alot to do with the actual vendor, but I'm not totally sure.

As far as JNDI goes, I believe that's fairly vendor specific too. I know IBM had one sort of JNDI implementation with WAS 3.x and 4.x, but changed to a federated namespace with 5. Essentially, with a JNDI lookup, you can do a bad lookup, and end up looking up an EJB on just one machine all the time. On the otherhand, you can do a lookup to the federated namespace, and this becomes less dependent on any one machine. With WAS, each JVM maintains its own JNDI namespace, with becomes part of a federated namespace.

For a mind numbing amount of info on JNDI, check out my JndiBindiBoBindi link on pulpjava.com

http://www.technicalfacilitation.com/get.php?link=naming
Mike Sever
Ranch Hand

Joined: Jul 24, 2006
Posts: 56
Thanks, it is really very helpful.

Further, (1) how to see the setting of �topology dependent JNDI name� in was console?
(2) how to test the effect of such setting?
(3) is it the reason why the war module can not access (lookup) ejb when war module deployed in ear1 and ejb module in ear2 on the same server? (if deploy the war and ejb module into one ear, it is ok)
(4) is there any detailed information of implementation of �topology dependent JNDI name�, at least how one machine knows the information of another machine, is there any specific flag?
(5) where is naming server? located in admin server instance?
(6) how about the implementation of that in weblogic?

I'm obscure about it for a long time, wish to become clear to some extent, thanks for reply! ->
Mike Sever
Ranch Hand

Joined: Jul 24, 2006
Posts: 56
Any update from any kindly senior person? Thanks in advance!
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

You may find more information when searching for "clustering" - I'm not sure if this is the kind of thing you're looking for - this isn't necessarily done at the EJB level, but is more directed at duplicating entire application server instances. However, it's much more common to do this, because if you're interested in load balancing/failover on one tier, you're probably interested in the others. (You *can* however, specify only specific tiers/services/EJBs to be duplicated in the cluster if you so wish.) Here is a starting document about clustering in Weblogic.


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4968
    
    1

I asked my boss for a raise, but she said "just use vectors instead."

Heh...Get it? A raise == arrays...I kill me.

The big this about arrays is you can group similar objects or primitive types together. You can have an array of int, doubles, Objects or Strings, it doesn't matter.

Arrays are great. Just don't ask your boss for one.

-Cameron McKenzie
Mike Sever
Ranch Hand

Joined: Jul 24, 2006
Posts: 56
Thanks, Nathan!
Then, how about EJB remote call, how to test calling to ejb container in different application server (maybe in different machines)?
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

It would probably be easier to test the failover capability of clustering rather than the load-balancing - just shut down one of the members of the cluster and see that the other gets the call.

To test load-balancing, you'd probably want to make use of a specific tool or framework to do so. There are some links to tools in this article from Sun. An open-source tool for this is The Grinder.
Mike Sever
Ranch Hand

Joined: Jul 24, 2006
Posts: 56
Thanks for considerable reply, I'll try to test as per it.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: EJB: remote calling mechanism question