Thank you very much, Nicholas for the response. My last question would be,
am I forced to use the mysql types defined in the fieldtypemysql.xml. If I
have to change these then keeping the schema, with existing data is a bit
of a lost cause.

- John

On Sat, Jul 11, 2015 at 1:46 PM, Nicolas Malin <[email protected]>
wrote:

> Hello John
>
> When you define your database connection with data model not present on
> OFBiz it's important to define a component with your an entitymodel that
> corresponding.
> 1. Define a new entitygroup : see example
> framework/entity/entitydef/entitygroup.xml
> 2. Associate each entity on this new group
> 3. You can force on your entity the table and column name  (see
> entity.table-name and field.col-name)
> 4. Associate on the entityengine your new group to a new datasource (it's
> important to understand all datasource.parameters) and the jdbc connection
> corresponding to your database
>
> Now all entity would be available from your delegator
>
> Nicolas
>
>
>
> Le 09/07/2015 04:34, John Resler a écrit :
>
>> Hello,
>>      I am starting off with OFBiz and am integrating some preexisting
>> databases to applications migrated to OFBiz. The OFBiz entity engine is
>> proving difficult to work around for existing entities. I've read quite a
>> bit and understand the method behind the madness however I cannot change
>> the schemas of the existing databases. I do have OFBiz connecting to the
>> separate databases but obtaining connections within the Java code is
>> proving somewhat daunting.
>>
>> I cringe that for the interim I have had to create direct JDBC connections
>> to the external databases. I would prefer to use the provided access but
>> cannot determine how to do this. It seems the objects related to
>> performing
>> these connections are package private or have some other mechanism
>> designed
>> to deter efforts in this direction. Nonetheless I need to do this.
>>
>> I'm looking to perform what would be standard in an enterprise java
>> container such as get the context, lookup the JNDI environment for the
>> database connections and go from there. The entityengine.xml file seems to
>> indicate that JNDI settings can be used for datasource elements but it
>> does
>> not then allow the connection information. It is either inline jdbc or a
>> JNDI reference to seemingly nowhere. I'd go on but you get the point.
>>
>> I've searched high and low on Google and have not found answers to what I
>> need. Any help would be greatly appreciated
>>
>> - JR
>>
>>
>


-- 
 "That was ungenerous! I'll take your guns for that!"
 - General Philip Sheridan after being fired upon by Confederacy troops for
toasting them in a somewhat insulting manner


John M. Resler
Captain USAF (Retired)
3255 South Dorsey Lane, #1069
Tempe, Arizona 85282

Reply via email to