[OFBiz] Dev - Different Datasource NON-JDBC Best Practice
mpf at zentric.com
mpf at zentric.com
Mon Aug 2 04:54:48 EDT 2004
Trying to ask the question in a different way
Does it make sence to implement a new GenericHelper to conect to a legacy
system such as SAP?
Did I get that right from the documentation that the GenericHelp is used to
get the data and it is configured this way
in entityengine.xml
added new group-map
add new datasource
add new fieldmap
in the components\product\entitydef\entitymodel.xml
map the entity to the new group
By the way: Is it possible to configure which delegator is used?
in entityengine.xml
<delegator name="default" entity-model-reader="main" entity-group-reader=
"main" entity-eca-reader="main" distributed-cache-clear-enabled="false">
<!-- <group-map group-name="org.ofbiz" datasource-name="localhsql"/>
-->
<group-map group-name="org.ofbiz" datasource-name="localpostgres"
/>
<group-map group-name="org.ofbiz.ProductPrice" datasource-name=
"sap"/>
</delegator>
<datasource name="sap"
helper-class="org.ofbiz.entity.datasource.GenericHelperSAP"
field-type-name="sap"
check-on-start="false"
add-missing-on-start="false"
check-indices-on-start="false"
use-foreign-keys="false"
use-foreign-key-indices="false"
use-fk-initially-deferred="false"
join-style="ansi-no-parenthesis"
alias-view-columns="false">
<read-data reader-name="main"/>
</datasource>
in components\product\entitydef\entitymodel.xml
<!-- ========================================================= -->
<!-- org.ofbiz.product.price -->
<!-- ========================================================= -->
<!-- <entity-group group="org.ofbiz.ProductPrice" entity="ProductPrice"
/> -->
<entity-group group="org.ofbiz" entity="ProductPrice" />
> Hi
> im looking for some implementation hints on this
>
> We need to get price information from an SAP R/3 System.
> This is due to a complex customer specific pricfinding mechanism
> that we can not maintain in OFBIZ.
>
> So far we implemented the connectionpool as a component. So we are
> able to invoke SAP functioncalls from anywhere inside ofbiz effectivly.
>
> We will go this way from now on:
>
> Modify the the class in
> components\product\src\org\ofbiz\product\price to
> use the sap-connectionpool to get the information we need
> Write everythink back to the map for display
>
> We are thinking of a alternativ
> Implement a new GenericHelper like
> org.ofbiz.entity.datasource.GenericHelperSAP
> It would have the advantage that no code in OFBIZ will be touched
toimplement
>
> Has anybody expierienc in implementing new GenereicHelpers
> Does this make sense anyway?
>
> Any sugestions or hints on any of those approaches are very welcome
>
> it would be linked through the entityengine.xml like this?!
> <delegator name="default" entity-model-reader="main" entity-group-
> reader="main" entity-eca-reader="main" distributed-cache-clear-
> enabled="false">
> <!-- <group-map group-name="org.ofbiz" datasource-
> name="localhsql"/> -->
> <group-map group-name="org.ofbiz" datasource-name="localpostgres"/>
> <group-map group-name="org.ofbiz.ProductPrice"
datasource-name="sap"/>
> </delegator>
>
> <datasource name="sap"
> helper-class="org.ofbiz.entity.datasource.GenericHelperSAP"
> field-type-name="sap"
> check-on-start="false"
> add-missing-on-start="false"
> check-indices-on-start="false"
> use-foreign-keys="false"
> use-foreign-key-indices="false"
> use-fk-initially-deferred="false"
> join-style="ansi-no-parenthesis"
> alias-view-columns="false">
> <read-data reader-name="main"/>
> <!-- <inline-jdbc
> jdbc-driver="org.hsqldb.jdbcDriver"
> jdbc-uri="jdbc:hsqldb:data/ofbiz"
> jdbc-username="sa"
> jdbc-password=""
> isolation-level="ReadUncommitted"
> pool-minsize="2"
> pool-maxsize="20"/>
> -->
>
> mit freundlichen Grüssen/ Kind regards / muchos saludos
> --
> Dipl. Wirt.-Ing. (FH) Michael Pfurtscheller, Geschäftsführer
> zentric GmbH & Co. KG
> mobil: +49-172-5457143
> fon: +49-6101-556060
> fax: +49-6101-556065
> icq# 8724822
> mailto:michael.pfurtscheller at zentric.com
> http://www.zentric.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ofbiz.org/pipermail/dev/attachments/20040802/300e25cb/attachment.htm
More information about the Dev
mailing list