15:59:47,313 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC00001: Failed to start service jboss.deployment.unit."flypp-estore-restservices-1.0.war".INSTAL
tException in service jboss.deployment.unit."flypp-estore-restservices-1.0.war".INSTALL: Failed to process phase INSTALL of deployment "flypp-estore-restservices-1.0.war"....
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011446: Failed to add persistence unit service for blSecurePU...........
Caused by: org.jboss.msc.service.DuplicateServiceException: Service jboss.persistenceunit."flypp-estore-restservices-1.0.war#blSecurePU" is already registered....
.
Steps followed for integration:
1. added Broadleaf Beta 3 dependencies in to my project POM.xml.
2. created datasources in jobss configuration file (i.e. standalone.xml)
<datasource jta="true" jndi-name="java:/jdbc/web" pool-name="jdbc/web_pool" enabled="true" use-java-context="true" use-ccm="true">
<datasource jta="true" jndi-name="java:/jdbc/secure" pool-name="jdbc/secure_pool" enabled="true" use-java-context="true" use-ccm="true">
<datasource jta="true" jndi-name="java:/jdbc/storage" pool-name="jdbc/storage_pool" enabled="true" use-java-context="true" use-ccm="true">
3.modified [b]applicationContext-datasource.xml with the below information.
<jee:jndi-lookup id="webDS" jndi-name="java:/jdbc/web"/>
<jee:jndi-lookup id="webSecureDS" jndi-name="java:/jdbc/secure"/>
<jee:jndi-lookup id="webStorageDS" jndi-name="java:/jdbc/storage"/>
4. modified applicationContext.xml with the below information.
<bean id="blMergedDataSources" class="org.springframework.beans.factory.config.MapFactoryBean">
<property name="sourceMap">
<map>
<entry key="java:/jdbc/web" value-ref="webDS"/>
<entry key="java:/jdbc/secure" value-ref="webSecureDS"/>
<entry key="java:/jdbc/storage" value-ref="webStorageDS"/>
</map>
</property>
</bean>
5.modified Web.xml <resouce-ref> entry with the below information.
<resource-ref>
<res-ref-name>java:/jdbc/web</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
6. and changed the Meta-INF/persistence.xml with the below information.
<persistence-unit name="blPU" transaction-type="RESOURCE_LOCAL">
<non-jta-data-source>java:/jdbc/web</non-jta-data-source>
<exclude-unlisted-classes/>
</persistence-unit>
<persistence-unit name="blSecurePU" transaction-type="RESOURCE_LOCAL">
<non-jta-data-source>java:/jdbc/secure</non-jta-data-source>
<exclude-unlisted-classes/>
</persistence-unit>
<persistence-unit name="blCMSStorage" transaction-type="RESOURCE_LOCAL">
<non-jta-data-source>java:/jdbc/storage</non-jta-data-source>
<exclude-unlisted-classes/>
</persistence-unit>