[Design of the JBoss EJB Container] - Multiple store managers
by jesper.pedersen
I'm investigating the migration of one of our applications to the 'cmp2.x jdbc2 pm' configuration.
One issue that I've found is that it isn't possible to use multiple store managers in each archive.
The problem is that the store managers currently makes a specific cast to the implementation f.ex.
| JDBCStoreManager2 manager = (JDBCStoreManager2)managers.get(i);
|
and use the specific methods (see f.ex. JDBCStoreManager2::start) making it impossible to define CMRs between the beans.
F.ex. take the following entities:
A <-> B -> C
If you want to use the 'cmp2.x jdbc2 pm' for the 'A' and 'B' beans and the 'Standard CMP 2.x Entity Bean' configuration for 'C', since 'C' are basically a read-only bean.
Using the 'Standard CMP 2.x Entity Bean' will limit the object creation, reduce memory and garbage collection of the bean if defined with commit option 'A' (as in our case) and should therefore increase performance for that bean.
I see two solutions to this:
1) Define a common interface for the store manager and port the existing ones to that interface.
2) Leave it as it is - document behavior.
I think that 1) will be a task that will involve 'some' work and with focus on EJB3 will require a lot commitment to make it happen.
I personally can live with solution 2), since all our new applications are based on Seam (and therefore EJB3).
Comments, thoughts, ideas ?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4036287#4036287
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4036287
18 years, 12 months
[Design of the JBoss EJB Container] - jdbc2.StoreManager2 and key-generators
by jesper.pedersen
I'm investigating the migration of one of our applications to the 'cmp2.x jdbc2 pm' configuration.
One issue that I've found is that currently all key-generators (jdbc.keygen) doesn't implement the jdbc2.CreateCommand interface and therefore can't be used together with the StoreManager2 implementation.
I see three possible solutions to this:
1) Define a common interface that both StoreManager's can use and port the existing key generators to that interface
2) Create a jdbc2.keygen package that implements key generators for all databases and define them in standardjboss.xml under new names.
3) Let the existing key generators implement CreateCommand and bridge the new methods internally in each class.
Since the interface for jdbc.StoreManager and jdbc2.StoreManager2 are very different I see 2) as best solution currently until a common interface for store managers have been defined. I know it is not a pretty solution, but it will work without messing with existing code.
Comments, thoughts, ideas ?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4036282#4036282
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4036282
18 years, 12 months