Hello Pardeep:

The IMHO the Entity Engine (EE) is one of the greatest kept secrets about OFBiz. I have used it in the past for many applications outside of the OFBiz ERP suite. I have also used it in applications where Hibernate was also being used (but not in the same Servlets.) There are lots of ways to do this - but the easiest and fastest way to get started is to build your application within the OFBiz framework and access the database. All the coding tools (Java, Groovy, Bean Shell, Simple Methods etc. ) are already integrated and use the EE.

You don't need to change anything in your Hibernate configuration. Instead, remove the configuration file(s); don't put any Hibernate jars on your classpath and convert your applications to run within the framework. Of course, if you are already making database calls, you will need to use the EE query language and not SQL. No worries however, the EE query language is much easier to use than embedded SQL.

Regards,
Ruth


[email protected] wrote:
Hi Users,

I have a question regarding the entity engine of OFBiz.
Currently I have an application in which I am using Hibernate as Persistence Manager. For this I am using a configuration file to set the Persistence Manager for my application. Now instead of this I want to use the OFBiz entity engine persistence Manager. So can you tell me what are the things I need to change to use the entity engine persistence manager.

Configuration File I am using to set Hibernate is :

<persistence-unit name="org.my.persistence.jpa">
    <provider>org.hibernate.ejb.HibernatePersistence</provider>
    <jta-data-source>jdbc/processInstanceDS</jta-data-source>
    <class>org.my.persistence.session.SessionInfo</class>
    <class>org.my.persistence.processinstance.ProcessInstanceInfo</class>
<class>org.my.persistence.processinstance.ProcessInstanceEventInfo</class>
    <class>org.my.persistence.processinstance.WorkItemInfo</class>

    <properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect"/>
      <property name="hibernate.max_fetch_depth" value="3"/>
      <property name="hibernate.hbm2ddl.auto" value="update"/>
      <property name="hibernate.show_sql" value="true"/>
      <property name="hibernate.transaction.manager_lookup_class"
 value="org.hibernate.transaction.BTMTransactionManagerLookup"/>
    </properties>
  </persistence-unit>
</persistence>

Is it possible to use OFBiz entity engine outside OFBIz?
Also if I am deploying my application inside OFBiz , so then can I use entity engine ?

Please help to clear my doubt.




Thanks & Regards

Pardeep Ruhil


______________________________________________________________________

Reply via email to