Article View: ibm.software.websphere.application-server
Article #5Re: Newbie - EJB question
From: zalek
Date: Sun, 02 Nov 2008 01:46
Date: Sun, 02 Nov 2008 01:46
34 lines
2949 bytes
2949 bytes
On Nov 1, 9:22 pm, Mark Space <marksp...@sbcglobal.net> wrote:
> ZalekBl...@hotmail.com wrote:
> > I am just learning EJB. It says EJB has 2 interfaces - home and
> > component interface - but don't see where this interfaces are
> > implemented. A book example (EJB in 21 days) shows a code how a client
> > looks for interface using JNDI - but how this home interface was
> > instantiented?
>
> I never had any luck with the "in 21 days" series. Could be more
> specific about your question? According to Sun's tutorial, it's just a
> regular old Java class.
>
> import javax.ejb.EntityBean;
>
> public class CustomerBean
> implements EntityBean {
> //...
> }
>
> <http://java.sun.com/developer/onlineTraining/EJBIntro/EJBIntro.html>
>
> But with out a little more knowledge about what your doing it's kinda
> hard to fill in details. I assume that the compiled bean class is then
> deployed to the EJB Container somehow.
Well - as I understand EJB is more complicated - a client cannot
access directly EJB - first it used a home interface to create EJB and
then using component interface is using method defined in EJB.
What I don't understand - how those interfaces are instantiatiented.
I wrote a JSP/java web servlet and want to convert it to EJB. The
servlet is very simple - it updates/inserts/shows a database.
Zalek
Technical Details
Message-ID:
<0d8d81d6-06df-41c6-92fa-4403269374a3@i24g2000prf.googlegroups.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!postnews.google.com!i24g2000prf.googlegroups.com!not-for-mailReferences:
<gdvpg4l307lt4ssk5g05vuj02l9opcvass@4ax.com> <geivd1$ede$1@registered.motzarella.org>Show Full Headers
Complete Article Headers
X-Google-Thread: 1090f0,4b27603d32b9799d X-Google-Thread: fcfb6,4b27603d32b9799d X-Google-Thread: f7ed6,4b27603d32b9799d X-Google-Thread: 10a146,4b27603d32b9799d X-Google-Attributes: gid1090f0,gidfcfb6,gidf7ed6,gid10a146,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: arc1-ca.pugleaf.net!g2news1.google.com!postnews.google.com!i24g2000prf.googlegroups.com!not-for-mail From: zalek <zalekbloom@hotmail.com> Newsgroups: ibm.software.websphere.application-server,weblogic.developer.interest.ejb,borland.public.jbuilder.enterprise,comp.lang.java.programmer Subject: Re: Newbie - EJB question Date: Sat, 1 Nov 2008 18:46:37 -0700 (PDT) Organization: http://groups.google.com Lines: 34 Message-ID: <0d8d81d6-06df-41c6-92fa-4403269374a3@i24g2000prf.googlegroups.com> References: <gdvpg4l307lt4ssk5g05vuj02l9opcvass@4ax.com> <geivd1$ede$1@registered.motzarella.org> NNTP-Posting-Host: 64.131.221.61 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1225590397 24063 127.0.0.1 (2 Nov 2008 01:46:37 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sun, 2 Nov 2008 01:46:37 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: i24g2000prf.googlegroups.com; posting-host=64.131.221.61; posting-account=5f_t8QoAAAAHROTCVItSGRlwRwFTIvKy User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3,gzip(gfe),gzip(gfe)