Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

local or remote interface -- please help!!!

 
Manny Pacman Pacquiao
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I�ve read this URL http://www.onjava.com/pub/a/onjava/2004/11/03/localremote.html regarding local or remote in EJBs.

In the interview with the CEO remember it says two web servers and one application server. I�m planning to use local interface for the web client.

However in this URL it says:

<START>
Local client view cannot be accessed:
1.) When an EJB or web component is packaged in a different application's EAR packages.
2.) When a web component is deployed in a web container, and EJBs are deployed in an EJB container, and these containers are separated (even if they are running on the same machine).

One more note: when using local interfaces, you have to pay attention to the client's code. Inside of it, you still have to go through JNDI and do lookup (as is the case with remote interfaces), but this time you get a reference to a real Java object on the heap, instead of a stub to a remote object.
<END>

My deployment has two war files deployed in two web servers and is to access via JNDI the session bean (a fa�ade) in another machine.

Does this mean I cannot use local interface?

Regards,

Manny
 
Muhammad Asif
Ranch Hand
Posts: 202
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If your Webcomponents are deployed on web server and ejb components on app server, then local interfaces cannot be used. They have to be on the same machine.

Reason:
When their is communication between two separate physical machines then the whole concept of object marshalling and unmarshalling will take place. In addition to that the objects that you would pass between the two servers should be serializable objects as well.

Let me know if you need any more help.
 
Manny Pacman Pacquiao
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Thanks for the reply.

The reason why I asked this question and why I considered using local interface is because i'm
trying to address this statement coming from the interview with the FBN CIO "We have assumed that most
web users will still be using 28.8 modems, so response time cannot exceed 10 seconds more than 20% of
the time."

Using local interface is I think one way to address this.

So what are my options now if local interface isn't ok with FBN 2 webservers to 1 container setup?
Can I do something here?

I'm thinking of putting the war in same package with the EJB to make local interface work. What will
happen to the two web servers now?


Regards,

Manny
 
Manny Pacman Pacquiao
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please review this URL http://www.sun.com/software/products/web_srvr/use_cases.xml


It would help right?


Thanks!

Manny
 
Muhammad Asif
Ranch Hand
Posts: 202
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well reading some EJB books, they mentioned that when EJBs and web components are deployed within the same server, normally the application server detects the components being used reside within the same JVM and therefore do some sort of short circuting mechanisms.

However, THESE FEATURES ARE APP SERVER PROPERIETERY FEATURES AND NOT PART OF THE J2EE SPEC.

Therefore, it would be fine to make a point by using local interfaces, but most commercial application servers donot have too make too much difference when the remote or local interface is being used. (Within on JVM)
 
Lars Behnke
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Manny,


The reason why I asked this question and why I considered using local interface is because i'm
trying to address this statement coming from the interview with the FBN CIO "We have assumed that most
web users will still be using 28.8 modems, so response time cannot exceed 10 seconds more than 20% of
the time."

Using local interface is I think one way to address this.


You cannot address this requirement by using local interfaces. If customers use slow modems, the size of transferred documents (html, gifs, jpgs) matters.

The decision whether to use local or remote interfaces may be important for inter-tier communication. There have been some discussions recently about collocated and distributed containers. See this thread

Lars
[ February 28, 2007: Message edited by: Lars Behnke ]
 
Manny Pacman Pacquiao
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeah, the local interface wouldn't necessary help customer with slow modems but it would help because the intention of local interface is overall performance right?

Thanks for the "thread". In "off-loading or collocating" jsp/servlet to application server this would leave the 450s to process HTTP/HTTPS/static request only, would definitely address interview regarding customers with slow modem response.

Collocating now allows local interface. Thanks!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic