I'm pretty new to the EJB arena, too, but I'll try to throw out a couple of responses 
to your questions.

1) Is EJB right for you?  Who knows.  A lot of people have accused EJB of being 
"overkill" for most applications.  That may be so, but a good development tool (such 
as XDoclet) can go a long way to removing the development-time complexities of EJB 
while a good application server can achieve excellent performance with EJB's, so I 
really don't see this as a problem.  Besides, applications grow over time.  What is 
overkill when you first launch an application may be exactly what you need further 
down the road.  Right now, in the applications that I've been developing, I have not 
been using many of the features of EJB (declarative security and transactions, remote 
access).  But, the applications I'm developing are still in their infancy, and will 
probably need those eventually.
If you decide not to use EJB's, you can still use JBoss.

2) Can you use stateless / session beans with JDO or Hibernate?  Just to clarify, 
here's an explanation of the difference between session beans and entity beans from 
Monson-Haefel's "Enterprise JavaBeans" (A great book from O'Reilly that I've found 
very useful in learning EJB.): "an entity bean has persistent state; session and 
message-driven beans ... do not have persistent state".  So, regardless of the 
persistence mechanism you use, you should make your persistent beans entity beans.  
I've found the CMP mechanisms adequate for my needs so far, except for the limitations 
of EJB-QL, which I've been able to circumvent using a resource reference to my 
database and a few quick JDBC calls.  If you want more control over the persistence, 
create a bean-managed persistence entity bean.  (I haven't looked into JDO or 
Hibernate, but I assume that you could use either of them as the bean-managed 
persistence mechanism without a problem.)  The great thing is that, since entity beans 
are nicely encapsulated objects, you can always start with one approach and change it 
later as needed, and your client application will never care.  

<a 
href="http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3827887#3827887";>View 
the original post</a>

<a 
href="http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3827887>Reply 
to the post</a>


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to