
Information on the Add-on
The Faktor-IPS runtime add-ons allow the implementation of a separated deployment of product data.
A product data service with current product date is deployed as a separate application and accessed via an EJB client.
Service:
<dependency> <groupId>org.faktorips</groupId> <artifactId>faktorips-runtime-productdataservice</artifactId> <version><!-- fips version --></version> </dependency>
Client:
<dependency> <groupId>org.faktorips</groupId> <artifactId>faktorips-runtime-productdataprovider-ejbclient<</artifactId> <version><!-- fips version --></version> </dependency>
Usage
The product server is defined configuratively:
<ejb-jar>
<enterprise-beans>
<session>
<ejb-name>org.faktorips.productdataservice.ProductDataService</ejb-name>
<business-remote>org.faktorips.productdataservice.IProductDataService</business-remote>
<ejb-class>org.faktorips.productdataservice.ProductDataService</ejb-class>
<session-type>Stateless</session-type>
<env-entry>
<env-entry-name>tocFileName</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value><!-- ToC path --></env-entry-value>
<injection-target>
<injection-target-class>
org.faktorips.productdataservice.ProductDataService
</injection-target-class>
<injection-target-name>tocFileName</injection-target-name>
</injection-target>
</env-entry>
</session>
</enterprise-beans>
</ejb-jar>
A detached content repository must then be created in the application:
factory = new EjbProductDataProviderFactory("org.faktorips.productdataservice.ProductDataServiceRemote", initalContext);
runtimeRepository = new DetachedContentRuntimeRepositoryManager.Builder(factory)
.setFormulaEvaluatorFactory(new GroovyFormulaEvaluatorFactory())
.build()
.getCurrentRuntimeRepository();