[Design of JCA on JBoss] - Re: Handling fatal JDBC connection exceptions
by cbredesen
anonymous wrote : Destroying the stale connection upon receiving the fatal exception Or destroying the stale connections when getting them from the Pool will effectively have the same effect.
No, it would not. Currently if you have no valid connection checker (or SQL), a fatal exception must be encountered before each individual connection is destroyed.
Consider a pool of 100 connections against a database that was restarted. All 100 connections are now invalid, but we don't know until we attempt to use one. 100 failed transactions later, we have a clean pool.
What I'm proposing (based on interaction with a WAS user) is a setting which allows a single fatal exception to kill all connections in the pool because we know they aren't going to be usable. This way you limit yourself to 1 (or very few) failed transactions. It's just another way of doing proactive pool management without doing background validation (or validate on match).
-Chris
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4158684#4158684
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4158684
16 years, 3 months
[Design of EJB 3.0] - Re: MergedJBossClientMetaDataDeployer is not used?
by alex.loubyansky@jboss.com
Actually, jbossas/trunk/ejb3/src/resources/META-INF/ejb-deployers-beans.xml has it.
I ran the ejb3 installer which overrode it with the projects/ejb3/trunk/core/src/main/resources/META-INF/ejb3-deployers-beans.xml
So, the one in the ejb3 project looks to be out of date.
Index: src/main/resources/META-INF/ejb3-deployers-beans.xml
| ===================================================================
| --- src/main/resources/META-INF/ejb3-deployers-beans.xml (revision 74605)
| +++ src/main/resources/META-INF/ejb3-deployers-beans.xml (working copy)
| @@ -1,14 +1,35 @@
| <?xml version="1.0" encoding="UTF-8"?>
|
| <!--
| - JCA Deployers
| + EJB3 Deployers
| -->
| <deployment xmlns="urn:jboss:bean-deployer:2.0">
|
| <bean name="DefaultPersistenceProperties" class="org.jboss.ejb3.DefaultPersistenceProperties"/>
|
| <bean name="Ejb3Deployer" class="org.jboss.ejb3.deployers.Ejb3Deployer">
| - <property name="type">ejb3x</property>
| + <install bean="ManagedDeploymentCreator" method="addVersionedAttachmentType">
| + <parameter>
| + <value>org.jboss.metadata.ejb.jboss.JBossMetaData</value>
| + </parameter>
| + <parameter>
| + <value>ejb3x</value>
| + </parameter>
| + <parameter>
| + <value>3.*</value>
| + </parameter>
| + <parameter>
| + <value>getEjbVersion</value>
| + </parameter>
| + </install>
| + <uninstall bean="ManagedDeploymentCreator" method="removeVersionedAttachmentType">
| + <parameter>
| + <value>org.jboss.metadata.ejb.jboss.JBossMetaData</value>
| + </parameter>
| + <parameter>
| + <value>ejb3x</value>
| + </parameter>
| + </uninstall>
| <property name="kernel"><inject bean="jboss.kernel:service=Kernel"/></property>
| <property name="mbeanServer"><inject bean="JMXKernel" property="mbeanServer"/></property>
| <property name="defaultPersistenceProperties"><inject bean="DefaultPersistenceProperties" property="properties"/></property>
| @@ -16,6 +37,8 @@
| <property name="poolFactoryRegistry"><inject bean="EJB3PoolFactoryRegistry" /></property>
| <property name="remoteProxyFactoryRegistry"><inject bean="EJB3RemoteProxyFactoryRegistry" /></property>
| <property name="persistenceManagerFactoryRegistry"><inject bean="EJB3PersistenceManagerFactoryRegistry" /></property>
| + <!-- Should war deployments be scanned for annotated ejbs -->
| + <property name="scanWars">false</property>
|
| <!--
|
| @@ -122,21 +145,30 @@
| </bean>
|
| <bean name="JBossClientParsingDeployer" class="org.jboss.ejb3.deployers.JBossClientParsingDeployer">
| - <property name="type">car</property>
| <depends>AppClientParsingDeployer</depends>
| - </bean>
| -
| - <bean name="AppClientScanningDeployer" class="org.jboss.ejb3.deployers.AppClientScanningDeployer">
| - <depends>JBossClientParsingDeployer</depends>
| - </bean>
| -
| + </bean>
| + <bean name="MergedJBossClientMetaDataDeployer" class="org.jboss.ejb3.deployers.MergedJBossClientMetaDataDeployer">
| + <depends>AppClientParsingDeployer</depends>
| + </bean>
| +
| <bean name="Ejb3ClientDeployer" class="org.jboss.ejb3.deployers.Ejb3ClientDeployer">
| - <property name="type">car</property>
| + <install bean="ManagedDeploymentCreator" method="addAttachmentType">
| + <parameter>
| + <value>org.jboss.metadata.client.jboss.JBossClientMetaData</value>
| + </parameter>
| + <parameter>
| + <value>car</value>
| + </parameter>
| + </install>
| + <uninstall bean="ManagedDeploymentCreator" method="removeAttachmentType">
| + <parameter>
| + <value>org.jboss.metadata.client.jboss.JBossClientMetaData</value>
| + </parameter>
| + </uninstall>
| <property name="kernel"><inject bean="jboss.kernel:service=Kernel"/></property>
| <property name="mbeanServer"><inject bean="JMXKernel" property="mbeanServer"/></property>
| <!-- TODO: check depends -->
| <depends>AspectLibrary</depends>
| - <depends>AppClientScanningDeployer</depends>
| </bean>
|
| <!-- EJB3 Cache Factory Registry -->
| @@ -227,27 +259,6 @@
| </entry>
| </map>
| </property>
| - <property name="loadBalancePolicies">
| - <!-- Define each of the registered factories -->
| - <map class="java.util.HashMap" keyClass="java.lang.String"
| - valueClass="java.lang.Class">
| - <!-- RoundRobin -->
| - <entry>
| - <key>RoundRobin</key>
| - <value>org.jboss.ha.client.loadbalance.RoundRobin</value>
| - </entry>
| - <!-- RandomRobin -->
| - <entry>
| - <key>RandomRobin</key>
| - <value>org.jboss.ha.client.loadbalance.RandomRobin</value>
| - </entry>
| - <!-- FirstAvailable -->
| - <entry>
| - <key>FirstAvailable</key>
| - <value>org.jboss.ha.client.loadbalance.FirstAvailable</value>
| - </entry>
| - </map>
| - </property>
| </bean>
|
| <!-- EJB3 Persistence Manager Factory Registry -->
| @@ -269,7 +280,19 @@
|
| <!-- Persistence Unit deployers -->
| <bean name="PersistenceUnitParsingDeployer" class="org.jboss.ejb3.deployers.PersistenceUnitParsingDeployer">
| - <property name="type">car</property>
| + <install bean="ManagedDeploymentCreator" method="addAttachmentType">
| + <parameter>
| + <value>org.jboss.metadata.jpa.spec.PersistenceMetaData</value>
| + </parameter>
| + <parameter>
| + <value>par</value>
| + </parameter>
| + </install>
| + <uninstall bean="ManagedDeploymentCreator" method="removeAttachmentType">
| + <parameter>
| + <value>org.jboss.metadata.jpa.spec.PersistenceMetaData</value>
| + </parameter>
| + </uninstall>
| </bean>
|
| </deployment>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4158673#4158673
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4158673
16 years, 3 months
[Design of JBoss Portal] - Re: portal clustering problem when using optimistic locking
by galder.zamarreno@jboss.com
Prabhat,
It's true that pessimistic locking for 2nd level cache is currently our preferred configuration, hence it's the default for EJB3 2nd level cache in EAP/AS 4.2+ but I dunno the exact details on why PL was chosen over OL. I'm gonna forward the forum link to Brian who I think might be able to give us further information on why PL was chosen over OL.
In the mean time, I don't have enough info to determine the root cause of your issues and so I'd like you to follow this instructions, repeat the test and attach a zip file with the resulting files to the JIRA.
- Add thread logging information and enable TRACE for org.jboss.cache package. See [1]
- Generate thread dumps in both nodes when you're unable to access that page.
Once you've done this, could you try with the latest EAP 4.2.x CP which is EAP 4.2.0.GA_CP03? This is our latest release for customers which has newer bug fix releases for JBoss Cache and Hibernate amongst other things.
[1] Add to conf/jboss-log4j.xml:
| <category name="org.jboss.cache">
| <priority value="TRACE" />
| </category>
|
| Change ConversionPattern for server.log file appender to full pattern:
| <param name="ConversionPattern" value="%d %-5r %-5p [%c] (%t:%x) %m%n"/>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4158663#4158663
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4158663
16 years, 3 months