[jboss-jira] [JBoss JIRA] (AS7-6079) EJB 2.1 CMP configuration options missing (sync-on-commit-only, insert-after-ejb-post-create, call-ejb-store-on-clean)
ben ben (JIRA)
issues at jboss.org
Fri Jul 4 04:47:25 EDT 2014
[ https://issues.jboss.org/browse/AS7-6079?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12982301#comment-12982301 ]
ben ben edited comment on AS7-6079 at 7/4/14 4:45 AM:
------------------------------------------------------
For AS 7 versions prior to 7.2.0, the option <insert-after-ejb-post-create> is not available for jbosscmp-jdbc.xml, neither at <entity> level nor at <container-configuration> level.
Before the bug resolution, adding the option in jbosscmp-jdbc.xml causes a parsing error and the deployment fails.
Thanks to Tiago Frazão, I've made the ejbPostCreate() work on AS 7.1.1 Final, setting the default value to true in class org.jboss.as.cmp.CmpConfig.
(private boolean insertAfterEjbPostCreate; replaced by private boolean insertAfterEjbPostCreate = true; )
One more thing : in order to make the ejbPostCreate() method work with this <insert-after-ejb-post-create> option enabled (whith the fix described above or even in AS 7.2.0 + versions) you have to define the ejb relationships with <foreign-key-mapping /> mode in jbosscmp-jdbc.xml.
The <relation-table-mapping> mode relationships will not work, causing an error "Could not insert relations into ..."
was (Author: biwann):
For AS 7 versions prior to 7.2.0, the option <insert-after-ejb-post-create> is not available for jbosscmp-jdbc.xml, neither at <entity> level nor at <container-configuration> level.
Belfore the bug resolution, adding the option in jbosscmp-jdbc.xml causes a parsing error and the deployment fails.
Thanks to Tiago Frazão, I've made the ejbPostCreate() work on AS 7.1.1 Final, setting the default value to true in class org.jboss.as.cmp.CmpConfig.
(private boolean insertAfterEjbPostCreate; replaced by private boolean insertAfterEjbPostCreate = true; )
One more thing : in order to make the ejbPostCreate() method work with this <insert-after-ejb-post-create> option enabled (whith the fix described above or even in AS 7.2.0 + versions) you have to define the ejb relationships with <foreign-key-mapping /> mode in jbosscmp-jdbc.xml.
The <relation-table-mapping> mode relationships will not work, causing an error "Could not insert relations into ..."
> EJB 2.1 CMP configuration options missing (sync-on-commit-only, insert-after-ejb-post-create, call-ejb-store-on-clean)
> ----------------------------------------------------------------------------------------------------------------------
>
> Key: AS7-6079
> URL: https://issues.jboss.org/browse/AS7-6079
> Project: Application Server 7
> Issue Type: Bug
> Components: EJB
> Affects Versions: 7.1.0.Alpha1, 7.1.3.Final (EAP)
> Reporter: Brad Maxwell
> Assignee: Brad Maxwell
> Fix For: EAP 6.1.0.Alpha (7.2.0.Final), 7.1.4.Final (EAP)
>
>
> In JBoss AS 7, EJB 2.1 CMP beans cannot configure some options such as sync-on-commit-only and insert-after-ejb-post which were configurable in previous versions of JBoss.
> Should also confirm how to configure the rest of the options that were available previously.
> <container-configuration>
> <container-name>Clustered CMP 2.x EntityBean</container-name>
> <call-logging>false</call-logging>
> <invoker-proxy-binding-name>clustered-entity-rmi-invoker</invoker-proxy-binding-name>
> <sync-on-commit-only>false</sync-on-commit-only>
> <insert-after-ejb-post-create>false</insert-after-ejb-post-create>
> <container-interceptors>
> ...
> </container-interceptors>
> <instance-pool>org.jboss.ejb.plugins.EntityInstancePool</instance-pool>
> <instance-cache>org.jboss.ejb.plugins.EntityInstanceCache</instance-cache>
> <persistence-manager>org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager</persistence-manager>
> <locking-policy>org.jboss.ejb.plugins.lock.QueuedPessimisticEJBLock</locking-policy>
> <container-cache-conf>
> <cache-policy>org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy</cache-policy>
> <cache-policy-conf>
> <min-capacity>50</min-capacity>
> <max-capacity>1000000</max-capacity>
> <overager-period>300</overager-period>
> <max-bean-age>600</max-bean-age>
> <resizer-period>400</resizer-period>
> <max-cache-miss-period>60</max-cache-miss-period>
> <min-cache-miss-period>1</min-cache-miss-period>
> <cache-load-factor>0.75</cache-load-factor>
> </cache-policy-conf>
> </container-cache-conf>
> <container-pool-conf>
> <MaximumSize>100</MaximumSize>
> </container-pool-conf>
> <commit-option>B</commit-option>
> </container-configuration>
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
More information about the jboss-jira
mailing list