cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco Embedded Integration with EJB-Hibernate Application

pramodkhare
Champ in-the-making
Champ in-the-making
Hi,
Currently we have an application which is built in EJB 2.0 and Hibernate 3.1.
And we want to integrate alfresco (which is build using Spring-Hibernate) into this application,
but after looking at both architectures we are in dilemma whether we can achieve it,

can we merge both (i.e. our application's and alfresco's) hibernate configs in some way, so that they will have separate hibernate sessionFactory and loading configs for them, and they will connect to their dbs separately.
(I personally don't think its a good approach)

OR

can we have two separate hibernate inits in same JVM, (i don't know anything about this),
I mean, my application will connect to its db-schema  with its own hibernate,
and alfresco will connect to the same db-schema OR its own schema with its hibernate (both behaving separately),
(This thought just came to my mind, I have basic competency in hibernate)

So can we achieve it? Any thoughts are welcome.
1 REPLY 1

mrogers
Star Contributor
Star Contributor
Thoughts:
a) Your EJB-Hibernate app can call any of the remote alfresco APIs anyway.  
b) the remaining hibernate stuff in alfresco is residual or for dependent components like JBPM,  alfresco no longer uses hibernate for the important database access.
c) If you are using EJBs then you should probably be sharing alfresco at a service level rather than a database level.
d) you can probably expose the parts of the alfresco public api as a EJB interfaces,  I know people did this with EJB 1.0 on the older versions of alfresco.  Distributed rollback may be a problem if you do manage to expose alfresco APIs as EJBs.