Consider adding "OT": or using an EJB mail list.
.V

Alok Tijoriwala wrote:
Hi Viral,

As per my understanding containers are smart enough to
treat the invocation as remote or local. I know that
for IBM Websphere 5.0.

Typically the web layer and buisness layers are
separately deployed and so a very rare chance of
having a local interface for your EJB. And if the
communication is inevitable than its preferred using
normal Java Beans.

EJB-EJB communication may involve local interfaces for
certain highly couled EJB designs.

Regards
Alok

--- Shashank Dixit <[EMAIL PROTECTED]>
wrote:

you mean you can mention these in ejb-jar.xml?
How?

Shashank S. Dixit
Software Analyst.
Datamatics Ltd.
Contact: 28291253 ext 146
Mobile: 9820930075

Be brave against all odds. Never give up.


-----Original Message----- From: Viral_Thakkar [mailto:[EMAIL PROTECTED] Sent: Thursday, August 21, 2003 3:35 PM To: [EMAIL PROTECTED]; Struts Users Mailing List Subject: RE : Remote and local EJB


This seems to be good idea.


I think EJB configuration files may also help us to
achieve the same.



-----Original Message-----
From: Shashank Dixit
[mailto:[EMAIL PROTECTED]
Sent: Thursday, August 21, 2003 2:29 PM
To: Viral_Thakkar; Struts Users Mailing List
Subject: RE: RE : Remote and local EJB

You can have properties file where you can define
which interface should you
consider for calling EJBs. SO that you dont have to
change your code to
serve your purpose.
Let me know what do you think

Shashank S. Dixit
Software Analyst.
Datamatics Ltd.
Contact: 28291253 ext 146
Mobile: 9820930075

Be brave against all odds. Never give up.


-----Original Message----- From: Viral_Thakkar [mailto:[EMAIL PROTECTED] Sent: Thursday, August 21, 2003 11:30 AM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: RE: RE : Remote and local EJB


If we know that EJBs and struts classes will reside in same JVM then why we should also invoke the stateless session bean remotely? We can invoke that session bean using the local interface... rite .?

Although I agree that in furure, we may deploy web
and app classes on
different machines, so that's why I am looking for a
solution where we can
take advantage of both local and remote interface of
EJB.

I would say we should prefer the local EJB call
instead of remote EJB call
as far as possible.

Viral







-----Original Message-----
From: Shashank Dixit
[mailto:[EMAIL PROTECTED]
Sent: Thursday, August 21, 2003 10:29 AM
To: Struts Users Mailing List; Viral_Thakkar;
[EMAIL PROTECTED]
Subject: RE: RE : Remote and local EJB

Hi Viral

Ideally there should be one stateless session bean
within action class and
business component EJBs so that you have only one
remote call and all other
EJB calls are local. You should always program
considering different tiers
on different machines, although you are using the
web and app tier on same
machine now. Let me know what do you think on this.

Shashank S. Dixit
Software Analyst.
Datamatics Ltd.
Contact: 28291253 ext 146
Mobile: 9820930075

Be brave against all odds. Never give up.


-----Original Message----- From: Viral_Thakkar [mailto:[EMAIL PROTECTED] Sent: Thursday, August 21, 2003 9:40 AM To: Struts Users Mailing List; Piper, James D CECOM SEC EPS Subject: RE : Remote and local EJB


Thanks Jim.


I am using the oracle 9iAS. I also developed the EJB
which supports both
remote and local access. I am also able to invoke
this EJB from my action
class. I accessed this EJB using the remote and also
using local interface
separately.

The reason why I want this EJB to be deployed both
as local and remote is
that at present EJB will be accessed by the struts
action class, both are in
same JVM so I can access the EJB using the local
interface.

In future when we do clustering then at that time,
EJB bean may be at
different server, in different JVM, at that time
struts action class should
dynamically find the remote EJB.

One way I think, we can handle such situation in the
catch block of the
NamingException() while accessing the local bean, we
need to lookup the
remote EJB. But it seems that this is not the good
programming practice.

So I am looking for some design pattern or
framework, which supports the
solution to this problem.

Thanks,
Viral


-----Original Message----- From: Piper, James D CECOM SEC EPS [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 20, 2003 7:49 PM To: Viral_Thakkar Subject: RE: RE : Remote and local EJB

So let me see if I understand what it is you are
wanting to accomplish.  It
sounds like you have a bunch of EJBs, a Struts
application and several
servers.  You would like http requests coming in to
be 'evaluated' by your
application and then based on some information
within that request (i.e.
users name, users ip address, users browsers type,
users preference
selection, or possibly even the current servers
load) invoke either a local
or a remote EJB.  For example maybe you have an EJB
that does some realy
heavy calculatations like a ray-tracer and for some
important users you want
the results to come back faster than for other less
important users.  So you
make your ray tracing EJB and deploy it on both the
local server (i.e. the
same one running your Struts app) and on some other
EJB server far far away.
Then register them both in your ejb-jar.xml with
different names ie.
RayTraceLocal and RayTraceRemote.  So now to access
either the remote or the
local EJB depending on the request you write your
Struts action class to
first evaluate the HTTP request to figure out if
this request is coming from
the important user or not and then as appropriate
either do your jndi lookup
for the RayTraceLocal or the RayTraceRemote.


=== message truncated ===



__________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to