[EMAIL PROTECTED]
On Wednesday, August 01, 2001 2:38 PM, Andres Manggini
[SMTP:[EMAIL PROTECTED]] wrote:
>
>
> Thanks, that's close to what I thought.
>
> I believe this is off topic, do you know of any list for this kind of
> questions (not specifically for JRun)?, I have a few more :).
>
>
>
> -----Original Message-----
> From: Mark Phelps [mailto:[EMAIL PROTECTED]]
> Sent: Miercoles, 01 de Agosto de 2001 01:47 p.m.
> To: JRun-Talk
> Subject: RE: newbie question
>
> The <usebean> tag only works with regular javabeans, (i.e. regular
> classes
> with get and set methods). It has nothing to do with Enterprise Java
> Beans.
> EJBs are loaded in the way that you mentioned, although the sample you
> show
> isn't quite the way I have done it with JRun in the past. For example,
> I
> have never needed the PortableRemoteObject.narrow() call in my code.
>
> Most designers frown on putting a lot of code in JSPs, so a common way
> of
> dealing with EJBs is to have a regular JavaBean that is loaded by the
> JSP
> using the <usebean> tag. The JavaBean then has methods with logic like
> you
> showed to retrieve the interfaces for EJBs.
>
> In my current project I have a JavaBean class called "BeanBag" that I
> use to
> retrieve the EJBs I am using.
>
> -----Original Message-----
> From: Andres Manggini [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, August 01, 2001 7:17 AM
> To: JRun-Talk
> Subject: newbie question
>
>
> Hi,
>
> I'm just starting with J2EE (I come from Microsoft DNA arquitecture).
>
> The question is, what's the difference between using <useBean> (in my
> JSP) to instantiate a Java Bean, and something like this to instantiate
> anEnterprise Java Bean:
>
> /**** snip *****/
> Context context = new InitialContext();
> LinkManagerHome home = (LinkManagerHome)
> PortableRemoteObject.narrow(context.lookup("LinkManager"),
> LinkManagerHome.class);
>
> LinkManagerRemote bean = home.create();
> /**************/
>
> I haven't seen a single sample calling a EJB, all the samples use
> <useBean>. If I want to use EJB (not just a java class, but anEnterprise
> component, with transactions, security, etc..) shouldn't I instantiate
> it like that ?.
>
>
> Thanks,
> Andres.
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists