[JBoss JIRA] (AS7-1628) Custom JSF deployment does not work altogether with CDI
by Stan Silvert (JIRA)
[ https://issues.jboss.org/browse/AS7-1628?page=com.atlassian.jira.plugin.s... ]
Stan Silvert commented on AS7-1628:
-----------------------------------
See this comment for workaround https://community.jboss.org/wiki/DesignOfAS7Multi-JSFFeature#comment-11484
> Custom JSF deployment does not work altogether with CDI
> -------------------------------------------------------
>
> Key: AS7-1628
> URL: https://issues.jboss.org/browse/AS7-1628
> Project: Application Server 7
> Issue Type: Bug
> Components: JSF
> Reporter: George Gastaldi
> Assignee: Stuart Douglas
> Labels: jsf
> Fix For: Open To Community
>
>
> When using another JSF impl (with flag org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL set to true) and a beans.xml is on WEB-INF, the following error occurs:
> {code:java}
> 12:33:07,066 INFO [org.jboss.modules] JBoss Modules version 1.0.1.GA
> 12:33:07,341 INFO [org.jboss.msc] JBoss MSC version 1.0.0.GA
> 12:33:07,394 INFO [org.jboss.as] JBoss AS 7.0.1.Final "Zap" starting
> 12:33:08,212 WARN [org.jboss.as] No security realm defined for native management service, all access will be unrestricted.
> 12:33:08,220 INFO [org.jboss.as] creating http management service using network interface (management) port (9990)
> 12:33:08,267 WARN [org.jboss.as] No security realm defined for http management service, all access will be unrestricted.
> 12:33:08,276 INFO [org.jboss.as.logging] Removing bootstrap log handlers
> 12:33:08,293 INFO [org.jboss.as.connector.subsystems.datasources] (Controller Boot Thread) Deploying JDBC-compliant driver class org.h2.Driver (version 1.2)
> 12:33:08,306 INFO [org.jboss.as.clustering.infinispan.subsystem] (Controller Boot Thread) Activating Infinispan subsystem.
> 12:33:08,418 INFO [org.jboss.as.naming] (Controller Boot Thread) Activating Naming Subsystem
> 12:33:08,426 INFO [org.jboss.as.naming] (MSC service thread 1-5) Starting Naming Service
> 12:33:08,429 INFO [org.jboss.as.osgi] (Controller Boot Thread) Activating OSGi Subsystem
> 12:33:08,449 INFO [org.jboss.as.security] (Controller Boot Thread) Activating Security Subsystem
> 12:33:08,453 INFO [org.jboss.remoting] (MSC service thread 1-4) JBoss Remoting version 3.2.0.Beta2
> 12:33:08,469 INFO [org.xnio] (MSC service thread 1-4) XNIO Version 3.0.0.Beta3
> 12:33:08,482 INFO [org.xnio.nio] (MSC service thread 1-4) XNIO NIO Implementation Version 3.0.0.Beta3
> 12:33:08,724 INFO [org.apache.catalina.core.AprLifecycleListener] (MSC service thread 1-1) The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: D:\jdk6\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;D:/powerlogic/jcompany55/java/bin/../jre/bin/server;D:/powerlogic/jcompany55/java/bin/../jre/bin;D:/powerlogic/jcompany55/java/bin/../jre/lib/amd64;D:\powerlogic\jcompany55\java\bin;c:\Program Files\Microsoft IntelliType Pro\;D:\jdk6\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;D:\maven\bin;C:\Program Files (x86)\apache-ant-1.8.2\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\GnuWin32\bin;C:\Program Files (x86)\GNU\GnuPG\pub;C:\Program Files (x86)\Git\bin;D:\powerlogic\jcompany55\eclipse;
> 12:33:08,731 INFO [org.jboss.as.ee] (Controller Boot Thread) Activating EE subsystem
> 12:33:08,753 INFO [org.jboss.as.jmx.JMXConnectorService] (MSC service thread 1-7) Starting remote JMX connector
> 12:33:08,757 INFO [org.jboss.as.remoting] (MSC service thread 1-5) Listening on /127.0.0.1:9999
> 12:33:08,803 INFO [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-8) Starting Coyote HTTP/1.1 on http--127.0.0.1-8080
> 12:33:09,018 INFO [org.jboss.as.connector] (MSC service thread 1-3) Starting JCA Subsystem (JBoss IronJacamar 1.0.3.Final)
> 12:33:09,088 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-8) Bound data source [java:jboss/datasources/ExampleDS]
> 12:33:09,394 INFO [org.jboss.as.deployment] (MSC service thread 1-1) Started FileSystemDeploymentService for directory D:\jboss-as-web-7.0.1.Final\standalone\deployments
> 12:33:09,402 INFO [org.jboss.as.deployment] (DeploymentScanner-threads - 1) Found exemplo.war in deployment directory. To trigger deployment create a file called exemplo.war.dodeploy
> 12:33:09,403 INFO [org.jboss.as.deployment] (DeploymentScanner-threads - 1) Found hellomyfaces.war in deployment directory. To trigger deployment create a file called hellomyfaces.war.dodeploy
> 12:33:09,427 INFO [org.jboss.as] (Controller Boot Thread) JBoss AS 7.0.1.Final "Zap" started in 2588ms - Started 93 of 148 services (55 services are passive or on-demand)
> 12:33:09,444 INFO [org.jboss.as.server.deployment] (MSC service thread 1-5) Starting deployment of "hellomyfaces.war"
> 12:33:10,229 INFO [org.jboss.as.jpa] (MSC service thread 1-8) added javax.persistence.api dependency to hellomyfaces.war
> 12:33:10,274 INFO [org.jboss.weld] (MSC service thread 1-5) Processing CDI deployment: hellomyfaces.war
> 12:33:10,628 INFO [org.jboss.weld] (MSC service thread 1-1) Starting Services for CDI deployment: hellomyfaces.war
> 12:33:10,652 INFO [org.jboss.weld.Version] (MSC service thread 1-1) WELD-000900 1.1.2 (Final)
> 12:33:10,679 INFO [org.jboss.weld] (MSC service thread 1-4) Starting weld service
> 12:33:11,055 INFO [org.apache.myfaces.ee6.MyFacesContainerInitializer] (MSC service thread 1-6) Added FacesServlet with mappings=[/faces/*, *.jsf, *.faces]
> 12:33:11,096 INFO [org.apache.myfaces.shared_impl.config.MyfacesConfig] (MSC service thread 1-6) No context init parameter 'org.apache.myfaces.PRETTY_HTML' found, using default value true
> 12:33:11,096 INFO [org.apache.myfaces.shared_impl.config.MyfacesConfig] (MSC service thread 1-6) No context init parameter 'org.apache.myfaces.ALLOW_JAVASCRIPT' found, using default value true
> 12:33:11,096 INFO [org.apache.myfaces.shared_impl.config.MyfacesConfig] (MSC service thread 1-6) No context init parameter 'org.apache.myfaces.RENDER_CLEAR_JAVASCRIPT_FOR_BUTTON' found, using default value false
> 12:33:11,097 INFO [org.apache.myfaces.shared_impl.config.MyfacesConfig] (MSC service thread 1-6) No context init parameter 'org.apache.myfaces.RENDER_HIDDEN_FIELDS_FOR_LINK_PARAMS' found, using default value false
> 12:33:11,097 INFO [org.apache.myfaces.shared_impl.config.MyfacesConfig] (MSC service thread 1-6) No context init parameter 'org.apache.myfaces.SAVE_FORM_SUBMIT_LINK_IE' found, using default value false
> 12:33:11,097 INFO [org.apache.myfaces.shared_impl.config.MyfacesConfig] (MSC service thread 1-6) No context init parameter 'org.apache.myfaces.READONLY_AS_DISABLED_FOR_SELECTS' found, using default value true
> 12:33:11,097 INFO [org.apache.myfaces.shared_impl.config.MyfacesConfig] (MSC service thread 1-6) No context init parameter 'org.apache.myfaces.RENDER_VIEWSTATE_ID' found, using default value true
> 12:33:11,097 INFO [org.apache.myfaces.shared_impl.config.MyfacesConfig] (MSC service thread 1-6) No context init parameter 'org.apache.myfaces.STRICT_XHTML_LINKS' found, using default value true
> 12:33:11,097 INFO [org.apache.myfaces.shared_impl.config.MyfacesConfig] (MSC service thread 1-6) No context init parameter 'org.apache.myfaces.RENDER_FORM_SUBMIT_SCRIPT_INLINE' found, using default value false
> 12:33:11,098 INFO [org.apache.myfaces.shared_impl.config.MyfacesConfig] (MSC service thread 1-6) No context init parameter 'org.apache.myfaces.CONFIG_REFRESH_PERIOD' found, using default value 2
> 12:33:11,098 INFO [org.apache.myfaces.shared_impl.config.MyfacesConfig] (MSC service thread 1-6) No context init parameter 'org.apache.myfaces.VIEWSTATE_JAVASCRIPT' found, using default value false
> 12:33:11,098 INFO [org.apache.myfaces.shared_impl.config.MyfacesConfig] (MSC service thread 1-6) No context init parameter 'org.apache.myfaces.REFRESH_TRANSIENT_BUILD_ON_PSS' found, using default value auto
> 12:33:11,098 INFO [org.apache.myfaces.shared_impl.config.MyfacesConfig] (MSC service thread 1-6) No context init parameter 'org.apache.myfaces.REFRESH_TRANSIENT_BUILD_ON_PSS_PRESERVE_STATE' found, using default value false
> 12:33:11,098 INFO [org.apache.myfaces.shared_impl.config.MyfacesConfig] (MSC service thread 1-6) No context init parameter 'org.apache.myfaces.VALIDATE_XML' found, using default value false
> 12:33:11,098 INFO [org.apache.myfaces.shared_impl.config.MyfacesConfig] (MSC service thread 1-6) No context init parameter 'org.apache.myfaces.WRAP_SCRIPT_CONTENT_WITH_XML_COMMENT_TAG' found, using default value true
> 12:33:11,099 INFO [org.apache.myfaces.shared_impl.config.MyfacesConfig] (MSC service thread 1-6) Tomahawk jar not available. Autoscrolling, DetectJavascript, AddResourceClass and CheckExtensionsFilter are disabled now.
> 12:33:11,122 INFO [org.apache.myfaces.config.DefaultFacesConfigurationProvider] (MSC service thread 1-6) Reading standard config META-INF/standard-faces-config.xml
> 12:33:11,425 AVISO [org.apache.myfaces.config.annotation.DefaultAnnotationProvider] (MSC service thread 1-6) AnnotationConfigurator does not found classes for annotations in /WEB-INF/classes/org/jboss/test/jsf/hellomyfaces/ . This could happen because maven jetty plugin is used (goal jetty:run). Try configure org.apache.myfaces.annotation.SCAN_PACKAGES init parameter or use jetty:run-exploded instead.
> 12:33:11,681 INFO [org.apache.myfaces.config.DefaultFacesConfigurationProvider] (MSC service thread 1-6) Reading config : jar:file:D:%5Cjboss-as-web-7.0.1.Final%5Cmodules%5Corg%5Cjboss%5Cas%5Cweld%5Cmain%5Cjboss-as-weld-7.0.1.Final.jar!/META-INF/faces-config.xml
> 12:33:11,714 GRAVE [org.apache.myfaces.webapp.AbstractFacesInitializer] (MSC service thread 1-6) An error occured while initializing MyFaces: Class org.jboss.as.weld.webtier.jsf.WeldApplicationFactory is no javax.faces.application.ApplicationFactory: java.lang.IllegalArgumentException: Class org.jboss.as.weld.webtier.jsf.WeldApplicationFactory is no javax.faces.application.ApplicationFactory
> at javax.faces.FactoryFinder.newFactoryInstance(FactoryFinder.java:311) [myfaces-api-2.1.1.jar:]
> at javax.faces.FactoryFinder._getFactory(FactoryFinder.java:277) [myfaces-api-2.1.1.jar:]
> at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:200) [myfaces-api-2.1.1.jar:]
> at org.apache.myfaces.config.FacesConfigurator.configureApplication(FacesConfigurator.java:489) [myfaces-impl-2.1.1.jar:]
> at org.apache.myfaces.config.FacesConfigurator.configure(FacesConfigurator.java:401) [myfaces-impl-2.1.1.jar:]
> at org.apache.myfaces.webapp.AbstractFacesInitializer.buildConfiguration(AbstractFacesInitializer.java:309) [myfaces-impl-2.1.1.jar:]
> at org.apache.myfaces.webapp.Jsp21FacesInitializer.initContainerIntegration(Jsp21FacesInitializer.java:73) [myfaces-impl-2.1.1.jar:]
> at org.apache.myfaces.webapp.AbstractFacesInitializer.initFaces(AbstractFacesInitializer.java:125) [myfaces-impl-2.1.1.jar:]
> at org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:111) [myfaces-impl-2.1.1.jar:]
> at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3368) [jbossweb-7.0.1.Final.jar:7.0.1.Final]
> at org.apache.catalina.core.StandardContext.start(StandardContext.java:3821) [jbossweb-7.0.1.Final.jar:7.0.1.Final]
> at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:70) [jboss-as-web-7.0.1.Final.jar:7.0.1.Final]
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1765)
> at org.jboss.msc.service.ServiceControllerImpl$ClearTCCLTask.run(ServiceControllerImpl.java:2291)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_24]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_24]
> at java.lang.Thread.run(Thread.java:662) [:1.6.0_24]
> 12:33:11,725 INFO [org.jboss.web] (MSC service thread 1-6) registering web context: /hellomyfaces
> 12:33:11,770 INFO [org.jboss.as.server.controller] (DeploymentScanner-threads - 2) Deployed "hellomyfaces.war"
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 11 months
[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)
by Tiago Frazão (JIRA)
[ https://issues.jboss.org/browse/AS7-6079?page=com.atlassian.jira.plugin.s... ]
Tiago Frazão edited comment on AS7-6079 at 1/29/13 7:20 AM:
-------------------------------------------------------------
//---
was (Author: tiagoff):
Hi Guys,
I do still have the issue ... and i had to change a little bit the Jboss code to overcome the problem.
When we define the configurations (sync-on-commin-only, insert-after-ejb-post-create, call-ejb-store-on-clean) in "jbosscmp-jdbc.xml" like bellow :
<jbosscmp-jdbc>
<defaults>
<datasource>java:jboss/datasources/XptoDS</datasource>
<datasource-mapping>Oracle9i</datasource-mapping>
<create-table>false</create-table>
<remove-table>false</remove-table>
<sync-on-commit-only>true</sync-on-commit-only>
<insert-after-ejb-post-create>true</insert-after-ejb-post-create>
<call-ejb-store-on-clean>true</call-ejb-store-on-clean>
</defaults>
<entity>
<ejb-name>User</ejb-name>
<table-name>USER</table-name>
<cmp-field><field-name>name</field-name>
<column-name>NAME</column-name></cmp-field>
</entity>
...
</jbosscmp-jdbc>
During the lifecycle of org.jboss.as.cmp.processors.CmpParsingProcessor, the default values previously settled (in <defaults>) are been replaced for the one defined in <entity> scope, but if we do not define anything like above, the CmpParsinProcessor is using the default values of the CmpConfig. (primitive values)
I had to change 2 classes to skip this problem and I would like to know if is applicable or make sense for you.
public class CmpConfig {
private boolean syncOnCommitOnly;
private boolean insertAfterEjbPostCreate;
private boolean callEjbStoreOnClean = true;
private boolean wasSyncOnCommitOnlyChanged = false;
private boolean wasInsertAfterEjbPostCreateChanged = false;
private boolean wasCallEjbStoreOnCleanChanged = false;
public boolean isSyncOnCommitOnly() {
return syncOnCommitOnly;
}
public void setSyncOnCommitOnly(boolean syncOnCommitOnly) {
this.syncOnCommitOnly = syncOnCommitOnly;
this.wasSyncOnCommitOnlyChanged = true;
}
public boolean isInsertAfterEjbPostCreate() {
return insertAfterEjbPostCreate;
}
public void setInsertAfterEjbPostCreate(boolean insertAfterEjbPostCreate) {
this.insertAfterEjbPostCreate = insertAfterEjbPostCreate;
this.wasInsertAfterEjbPostCreateChanged = true;
}
public boolean isCallEjbStoreOnClean() {
return callEjbStoreOnClean;
}
public void setCallEjbStoreOnClean(boolean callEjbStoreOnClean) {
this.callEjbStoreOnClean = callEjbStoreOnClean;
this.wasCallEjbStoreOnCleanChanged = true;
}
public boolean wasSyncOnCommitOnlyChanged() {
return wasSyncOnCommitOnlyChanged;
}
public boolean wasInsertAfterEjbPostCreateChanged() {
return wasInsertAfterEjbPostCreateChanged;
}
public boolean wasCallEjbStoreOnCleanChanged() {
return wasCallEjbStoreOnCleanChanged;
}
}
and
public JDBCEntityMetaData(JDBCApplicationMetaData jdbcApplication, ParsedEntity parsed, JDBCEntityMetaData defaultValues) {
....
....
localHomeClass = defaultValues.getLocalHomeClass();
localClass = defaultValues.getLocalClass();
cmpConfig = defaultValues.getCmpConfig(); // --> added
....
....
// cmpConfig = parsed.getCmpConfig(); -- removed
// -- added
if (parsed.getCmpConfig().wasSyncOnCommitOnlyChanged()) {
cmpConfig.setSyncOnCommitOnly(parsed.getCmpConfig().isSyncOnCommitOnly());
}
// -- added
if (parsed.getCmpConfig().wasInsertAfterEjbPostCreateChanged()) {
cmpConfig.setInsertAfterEjbPostCreate(parsed.getCmpConfig().isInsertAfterEjbPostCreate());
}
// -- added
if (parsed.getCmpConfig().wasCallEjbStoreOnCleanChanged()) {
cmpConfig.setCallEjbStoreOnClean(parsed.getCmpConfig().isCallEjbStoreOnClean());
}
}
Regards
> 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: 7.2.0.CR1, 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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 11 months
[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)
by Tiago Frazão (JIRA)
[ https://issues.jboss.org/browse/AS7-6079?page=com.atlassian.jira.plugin.s... ]
Tiago Frazão commented on AS7-6079:
------------------------------------
Hi Guys,
I do still have the issue ... and i had to change a little bit the Jboss code to overcome the problem.
When we define the configurations (sync-on-commin-only, insert-after-ejb-post-create, call-ejb-store-on-clean) in "jbosscmp-jdbc.xml" like bellow :
<jbosscmp-jdbc>
<defaults>
<datasource>java:jboss/datasources/XptoDS</datasource>
<datasource-mapping>Oracle9i</datasource-mapping>
<create-table>false</create-table>
<remove-table>false</remove-table>
<sync-on-commit-only>true</sync-on-commit-only>
<insert-after-ejb-post-create>true</insert-after-ejb-post-create>
<call-ejb-store-on-clean>true</call-ejb-store-on-clean>
</defaults>
<entity>
<ejb-name>User</ejb-name>
<table-name>USER</table-name>
<cmp-field><field-name>name</field-name>
<column-name>NAME</column-name></cmp-field>
</entity>
...
</jbosscmp-jdbc>
During the lifecycle of org.jboss.as.cmp.processors.CmpParsingProcessor, the default values previously settled (in <defaults> are been replaced for the one defined in <entity> scope, but if we do not define anything like above, the CmpParsinProcessor is using the default values of the CmpConfig. (primitive values)
I had to change 2 classes to skip this problem and I would like to know if is applicable or make sense for you.
public class CmpConfig {
private boolean syncOnCommitOnly;
private boolean insertAfterEjbPostCreate;
private boolean callEjbStoreOnClean = true;
private boolean wasSyncOnCommitOnlyChanged = false;
private boolean wasInsertAfterEjbPostCreateChanged = false;
private boolean wasCallEjbStoreOnCleanChanged = false;
public boolean isSyncOnCommitOnly()
{ return syncOnCommitOnly; }
public void setSyncOnCommitOnly(boolean syncOnCommitOnly)
{ this.syncOnCommitOnly = syncOnCommitOnly; this.wasSyncOnCommitOnlyChanged = true; }
public boolean isInsertAfterEjbPostCreate()
{ return insertAfterEjbPostCreate; }
public void setInsertAfterEjbPostCreate(boolean insertAfterEjbPostCreate)
{ this.insertAfterEjbPostCreate = insertAfterEjbPostCreate; this.wasInsertAfterEjbPostCreateChanged = true; }
public boolean isCallEjbStoreOnClean()
{ return callEjbStoreOnClean; }
public void setCallEjbStoreOnClean(boolean callEjbStoreOnClean)
{ this.callEjbStoreOnClean = callEjbStoreOnClean; this.wasCallEjbStoreOnCleanChanged = true; }
public boolean wasSyncOnCommitOnlyChanged()
{ return wasSyncOnCommitOnlyChanged; }
public boolean wasInsertAfterEjbPostCreateChanged()
{ return wasInsertAfterEjbPostCreateChanged; }
public boolean wasCallEjbStoreOnCleanChanged()
{ return wasCallEjbStoreOnCleanChanged; }
}
and
public JDBCEntityMetaData(JDBCApplicationMetaData jdbcApplication, ParsedEntity parsed, JDBCEntityMetaData defaultValues) {
....
....
localHomeClass = defaultValues.getLocalHomeClass();
localClass = defaultValues.getLocalClass();
cmpConfig = defaultValues.getCmpConfig(); // --> added
....
....
// cmpConfig = parsed.getCmpConfig(); – removed
// – added
if (parsed.getCmpConfig().wasSyncOnCommitOnlyChanged())
{ cmpConfig.setSyncOnCommitOnly(parsed.getCmpConfig().isSyncOnCommitOnly()); }
// – added
if (parsed.getCmpConfig().wasInsertAfterEjbPostCreateChanged())
{ cmpConfig.setInsertAfterEjbPostCreate(parsed.getCmpConfig().isInsertAfterEjbPostCreate()); }
// – added
if (parsed.getCmpConfig().wasCallEjbStoreOnCleanChanged())
{ cmpConfig.setCallEjbStoreOnClean(parsed.getCmpConfig().isCallEjbStoreOnClean()); }
}
Regards
> 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: 7.2.0.CR1, 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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 11 months
[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)
by Tiago Frazão (JIRA)
[ https://issues.jboss.org/browse/AS7-6079?page=com.atlassian.jira.plugin.s... ]
Tiago Frazão commented on AS7-6079:
------------------------------------
Hi Guys,
I do still have the issue ... and i had to change a little bit the Jboss code to overcome the problem.
When we define the configurations (sync-on-commin-only, insert-after-ejb-post-create, call-ejb-store-on-clean) in "jbosscmp-jdbc.xml" like bellow :
<jbosscmp-jdbc>
<defaults>
<datasource>java:jboss/datasources/XptoDS</datasource>
<datasource-mapping>Oracle9i</datasource-mapping>
<create-table>false</create-table>
<remove-table>false</remove-table>
<sync-on-commit-only>true</sync-on-commit-only>
<insert-after-ejb-post-create>true</insert-after-ejb-post-create>
<call-ejb-store-on-clean>true</call-ejb-store-on-clean>
</defaults>
<entity>
<ejb-name>User</ejb-name>
<table-name>USER</table-name>
<cmp-field><field-name>name</field-name>
<column-name>NAME</column-name></cmp-field>
</entity>
...
</jbosscmp-jdbc>
During the lifecycle of org.jboss.as.cmp.processors.CmpParsingProcessor, the default values previously settled (in <defaults>) are been replaced for the one defined in <entity> scope, but if we do not define anything like above, the CmpParsinProcessor is using the default values of the CmpConfig. (primitive values)
I had to change 2 classes to skip this problem and I would like to know if is applicable or make sense for you.
public class CmpConfig {
private boolean syncOnCommitOnly;
private boolean insertAfterEjbPostCreate;
private boolean callEjbStoreOnClean = true;
private boolean wasSyncOnCommitOnlyChanged = false;
private boolean wasInsertAfterEjbPostCreateChanged = false;
private boolean wasCallEjbStoreOnCleanChanged = false;
public boolean isSyncOnCommitOnly() {
return syncOnCommitOnly;
}
public void setSyncOnCommitOnly(boolean syncOnCommitOnly) {
this.syncOnCommitOnly = syncOnCommitOnly;
this.wasSyncOnCommitOnlyChanged = true;
}
public boolean isInsertAfterEjbPostCreate() {
return insertAfterEjbPostCreate;
}
public void setInsertAfterEjbPostCreate(boolean insertAfterEjbPostCreate) {
this.insertAfterEjbPostCreate = insertAfterEjbPostCreate;
this.wasInsertAfterEjbPostCreateChanged = true;
}
public boolean isCallEjbStoreOnClean() {
return callEjbStoreOnClean;
}
public void setCallEjbStoreOnClean(boolean callEjbStoreOnClean) {
this.callEjbStoreOnClean = callEjbStoreOnClean;
this.wasCallEjbStoreOnCleanChanged = true;
}
public boolean wasSyncOnCommitOnlyChanged() {
return wasSyncOnCommitOnlyChanged;
}
public boolean wasInsertAfterEjbPostCreateChanged() {
return wasInsertAfterEjbPostCreateChanged;
}
public boolean wasCallEjbStoreOnCleanChanged() {
return wasCallEjbStoreOnCleanChanged;
}
}
and
public JDBCEntityMetaData(JDBCApplicationMetaData jdbcApplication, ParsedEntity parsed, JDBCEntityMetaData defaultValues) {
....
....
localHomeClass = defaultValues.getLocalHomeClass();
localClass = defaultValues.getLocalClass();
cmpConfig = defaultValues.getCmpConfig(); // --> added
....
....
// cmpConfig = parsed.getCmpConfig(); -- removed
// -- added
if (parsed.getCmpConfig().wasSyncOnCommitOnlyChanged()) {
cmpConfig.setSyncOnCommitOnly(parsed.getCmpConfig().isSyncOnCommitOnly());
}
// -- added
if (parsed.getCmpConfig().wasInsertAfterEjbPostCreateChanged()) {
cmpConfig.setInsertAfterEjbPostCreate(parsed.getCmpConfig().isInsertAfterEjbPostCreate());
}
// -- added
if (parsed.getCmpConfig().wasCallEjbStoreOnCleanChanged()) {
cmpConfig.setCallEjbStoreOnClean(parsed.getCmpConfig().isCallEjbStoreOnClean());
}
}
Regards
> 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: 7.2.0.CR1, 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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 11 months
[JBoss JIRA] (AS7-6414) Management Console - LDAP authentication fails
by Darran Lofthouse (JIRA)
[ https://issues.jboss.org/browse/AS7-6414?page=com.atlassian.jira.plugin.s... ]
Darran Lofthouse reassigned AS7-6414:
-------------------------------------
Assignee: Darran Lofthouse
> Management Console - LDAP authentication fails
> ----------------------------------------------
>
> Key: AS7-6414
> URL: https://issues.jboss.org/browse/AS7-6414
> Project: Application Server 7
> Issue Type: Bug
> Environment: JBoss 7.1.1 on windows xp 32 / jboss 7.1.2 on cent os 6.3, x86_64, standalone.xml
> Reporter: narayana b
> Assignee: Darran Lofthouse
>
> 1) security realms
> <!-- nari start -->
> <security-realm name="my_Ldap_Realm">
> <authentication>
> <ldap connection="my_Ldap_Connection" base-dn="dc=example,dc=com">
> <username-filter attribute="sAMAccountName"/>
> <!--
> <advanced-filter filter="(sAMAccountName={0})"/> -->
> </ldap>
> </authentication>
> </security-realm>
> <!-- nari end -->
> 2) outbound connections
> <!--nari start -->
> <outbound-connections>
> <ldap name="my_Ldap_Connection"
> url="ldap://localhost:10389/"
> search-dn="cn=jboss,ou=People,dc=example,dc=com" search-credential="admin123" />
> </outbound-connections>
> <!--nari end -->
> 3) Management console info config
> <!-- nari -->
> <native-interface security-realm="my_Ldap_Realm">
> <socket-binding native="management-native"/>
> </native-interface>
> <http-interface security-realm="my_Ldap_Realm">
> <socket-binding http="management-http"/>
> <!-- nari disabled [http] and enabled [https]
> <socket-binding https="management-console-https"/> -->
>
> </http-interface>
> <!-- nari end -->
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 11 months