[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - BMP and the N+1 Problem

tknerr do-not-reply at jboss.com
Thu Dec 14 04:54:29 EST 2006


Hello,

I have a question for the BMP experts out there:

We want to realize data access to a non-standard database, thus CMP does not work and we have to write our own SQL-like code to access it. It does not support transactions.
Now, the idea was to use BMP Entity beans to realize this scenario, but then I read about the N+1 problem (http://wiki.jboss.org/wiki/Wiki.jsp?page=AvoidBMP), which makes me think that BMP is probably not a good idea and that we better use Stateless Session Beans and ValueObjects instead.
However, someone told me that there are appserver-specific configuration to tune this behaviour, i.e. avoid the N+1 problem with BMP.

So here are my questions:
1) is there a JBoss specific workaround for the N+1 problem with BMP?
- Can you point me to documentation?

2) If I consider to use BMP (even with the N+1 issue), what would be the advantage over Stateless Session Beans + ValueObjects?
- will the container give me some extra functionality which I wouldn't have with SSB + VO?
- will the container give me support for transactions (which we do not have natively) by remembering calls to ejbCreate/Remove etc. and calling them in reverse order with the same PK?

Hope you have some helpful advice for me. I'm especially curios if we could inherit some functionality from the container with the BMP approach.

Thank you and best regards,
Torben

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3993763#3993763

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3993763



More information about the jboss-user mailing list