Two Laptop Bag*
The moose likes JBoss/WildFly and the fly likes ejb 2.0 entity beans enhancements in jboss 4.0 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "ejb 2.0 entity beans enhancements in jboss 4.0" Watch "ejb 2.0 entity beans enhancements in jboss 4.0" New topic
Author

ejb 2.0 entity beans enhancements in jboss 4.0

Karthik Guru
Ranch Hand

Joined: Mar 06, 2001
Posts: 1209
Given that one cannot get entity beans to scale without using container specific features, I would like to know what all/significant features does JBoss provide in addition to those mandated by the ejb spec?.

As a starter,

JBoss ejb-ql enhancements?, can i have a 'in' clause?
How easy it is to sniff the sql fired by jboss for a given ejb-ql
How up-to-date is XDoclet (1.x and 2.0) support for JBoss4.0?
Some idea of entity bean caching layer if any
Ability to use jdbc to update the database and by pass cache. But at the same time being able to invalidate the cache at the level of a entity bean type and entity bean type for a given primary key.

Please expand on this..

thanks.
norman richards
Author
Ranch Hand

Joined: Jul 21, 2003
Posts: 367
I don't think I have time to give an in depth answer here. I could spend hours, when really the best answer is to read the JBoss documentation. JBoss QL is fully documented, along with other query specification options. There's a lot. Generated SQL is logged - just set the log level for the right component. (again, see the docs. we talk about this in the book too) I think XDoclet 1.2.3 supports JBoss 4.0 fairly well. Again, see the JBoss docs for caching options.

What I find more interesting in this question is the premise. "Given that one cannot get entity beans to scale without using container specific features ...". This implies two things that I think are incorrect. It suggests that entity beans were somehow meant "to scale" in a container independent way and it suggests that entity beans are somehow different from session beans or or MDBs in this regard. J2EE does not fully declare how ANY type of bean is to be deployed.

All types of beans require app server specific tuning to operate optimally. Pool sizes, caches, replication of stateful session bean state, etc... There is a lot of stuff that is completely up to the app server to define. For better or worse, that's the way J2EE was created. JBoss CMP is actually pretty powerful. You can configure things like optimistic locking, eager/lazy loading, read-only objects, caching with various invalidation policies, etc... You do need this things to make entity beans work well, so I'm not disagreeing. I'm just finding the way you worded it very interesting.
Karthik Guru
Ranch Hand

Joined: Mar 06, 2001
Posts: 1209
May be I c'd be more specific..
I'm looking for the following features for my 2.0 entity beans-

optimistic locking

Ability to cache entity beans (between transactions), Ability to specify the cache size based on memory at my disposal.

Would like to know the ejb-ql enhancements in Jboss, for eg can i specify a 'in' clause that would take a list of inputs?

Ability to declare ejb-ql outside the descriptor in the code itself.

A simple way to sniff the SQLs fired by JBoss for a given ejb-ql

Ability to use jdbc to update the database and thereby bypassing the cache. But at the same time being able to invalidate the cache at the level of a entity bean type and entity bean type for a given primary key.

ability to execute batch updates ofcourse with support from the database driver

Ability to use a stored procedure and entity beans within the same transaction. The updates made by the sp s'd be available to the beans and vice versa (s'd be able to switch this on / off at the descriptor level).

Ability to lazy load relationships at the granularity of a query.

How intrusive could it get if I were to use some of the jboss specific features. Are we expected to implement any JBoss specific interfaces/classes etc? OR JBoss can handle that through some kind of proxying etc?

How up-to-date is XDoclet (1.x and 2.0) support for JBoss4.0?

cascade-delete support at the db level. I might have a huge tree structure with a parent and tons of children that in turn have children and so on, but when the parent is deleted, I want to cascade the delete at the db level. I dont want the beans to be first loaded in the cache , thereby polluting my cache. Ofcourse if the beans that need to get deleted as a result of cascade, exists in the cache as a result of some previous load, i want them to flushed from the cache.

In essence , given that its close to impossible to get ejb 2.0 to scale w/o using container specific features, what all does JBoss provide to get entity beans to work in production.
Karthik Guru
Ranch Hand

Joined: Mar 06, 2001
Posts: 1209
Oops ! thanks Norman . I didnt get to see your response before i posted!
norman richards
Author
Ranch Hand

Joined: Jul 21, 2003
Posts: 367
If you have really advanced persistence requirements, you should look into hibernate. Hibernate is fully supported in JBoss and is the basis for our EJB3 persistence implementation. If you Hibernate 3, you will not only get great persistence options, but your migration to EJB3 is straightforward. JBoss CMP really works pretty well. I've have used it successfully in many many projects. But, Hibernate does offer even more flexibility with less hassle.
 
wood burning stoves
 
subject: ejb 2.0 entity beans enhancements in jboss 4.0
 
Similar Threads
Doubts on EJB-QL
EJBQL
ejb
EJB-QL / findForUpdate methods
EJB-QL