🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: ibm.software.websphere.application-server
3 messages
3 total messages Started by ZalekBloom Sun, 02 Nov 2008 01:10
Newbie - EJB question
#3
Author: ZalekBloom
Date: Sun, 02 Nov 2008 01:10
9 lines
1805 bytes
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?

Thanks

Zalek
Re: Newbie - EJB question
#4
Author: Mark Space
Date: Sun, 02 Nov 2008 01:22
23 lines
2443 bytes
ZalekBloom@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.
Re: Newbie - EJB question
#5
Author: zalek
Date: Sun, 02 Nov 2008 01:46
34 lines
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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads