Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Newbie - EJB question

4 views
Skip to first unread message

Zalek...@hotmail.com

unread,
Nov 1, 2008, 9:10:22 PM11/1/08
to
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

Mark Space

unread,
Nov 1, 2008, 9:22:27 PM11/1/08
to

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.

zalek

unread,
Nov 1, 2008, 9:46:37 PM11/1/08
to
On Nov 1, 9:22 pm, Mark Space <marksp...@sbcglobal.net> wrote:

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

0 new messages