[JCA/JBoss] - Re: Validation of destroyed connections
by bortx
I'm maintaining a pool with 5 connections and validations every minute. On creation, I assign them an id for monitoring. Here you can see a test case I've already done:
On startup jboss creates 5 connections (ids 1 to 5), and validates them every minute. In a given moment, the EIS closes all connections, so the validation of all of them fails and jboss destroys them:
18:24:25,314 INFO [TAManagedConnectionFactory:142] VALIDATING CONNECTIONS....
18:24:25,314 INFO [TAManagedConnection:249] Validating connection 2
18:24:25,314 INFO [TAManagedConnection:290] I/O ERROR
18:24:25,314 INFO [TAManagedConnectionFactory:150] Invalid connection found
18:24:25,314 INFO [TAManagedConnectionFactory:154] VALIDATION FINISHED
18:24:25,314 WARN [JBossManagedConnectionPool:657]
18:24:25,314 INFO [TAManagedConnection:150] Destroying connection...
18:24:25,314 INFO [TAManagedConnection:160] Connection destroyed
18:24:25,314 INFO [TAManagedConnectionFactory:142] VALIDATING CONNECTIONS....
18:24:25,314 INFO [TAManagedConnection:249] Validating connection 3
18:24:25,314 INFO [TAManagedConnection:290] I/O ERROR
18:24:25,314 INFO [TAManagedConnectionFactory:150] Invalid connection found
18:24:25,314 INFO [TAManagedConnectionFactory:154] VALIDATION FINISHED
18:24:25,314 WARN [JBossManagedConnectionPool:657]
18:24:25,314 INFO [TAManagedConnection:150] Destroying connection...
18:24:25,314 INFO [TAManagedConnection:160] Connection destroyed
18:24:25,314 INFO [TAManagedConnectionFactory:142] VALIDATING CONNECTIONS....
18:24:25,314 INFO [TAManagedConnection:249] Validating connection 4
18:24:25,314 INFO [TAManagedConnection:290] I/O ERROR
18:24:25,314 INFO [TAManagedConnectionFactory:150] Invalid connection found
18:24:25,314 INFO [TAManagedConnectionFactory:154] VALIDATION FINISHED
18:24:25,314 WARN [JBossManagedConnectionPool:657]
18:24:25,314 INFO [TAManagedConnection:150] Destroying connection...
18:24:25,314 INFO [TAManagedConnection:160] Connection destroyed
18:24:25,314 INFO [TAManagedConnectionFactory:142] VALIDATING CONNECTIONS....
18:24:25,314 INFO [TAManagedConnection:249] Validating connection 5
18:24:25,314 INFO [TAManagedConnection:290] I/O ERROR
18:24:25,314 INFO [TAManagedConnectionFactory:150] Invalid connection found
18:24:25,314 INFO [TAManagedConnectionFactory:154] VALIDATION FINISHED
18:24:25,314 WARN [JBossManagedConnectionPool:657]
18:24:25,314 INFO [TAManagedConnection:150] Destroying connection...
18:24:25,314 INFO [TAManagedConnection:160] Connection destroyed
18:24:25,314 INFO [TAManagedConnectionFactory:142] VALIDATING CONNECTIONS....
18:24:25,314 INFO [TAManagedConnection:249] Validating connection 1
18:24:25,329 INFO [TAManagedConnection:290] I/O ERROR
18:24:25,329 INFO [TAManagedConnectionFactory:150] Invalid connection found
18:24:25,329 INFO [TAManagedConnectionFactory:154] VALIDATION FINISHED
18:24:25,329 WARN [JBossManagedConnectionPool:657]
18:24:25,329 INFO [TAManagedConnection:150] Destroying connection...
18:24:25,329 INFO [TAManagedConnection:160] Connection destroyed
Inmediately jboss creates 5 new connections (ids 6 to 10) in order to fill the pool:
18:24:25,329 INFO [TAManagedConnection:111] Initiating connection...
18:24:25,329 INFO [TAManagedConnection:118] Connection established
18:24:25,329 INFO [TAManagedConnectionFactory:111] Connection created - number 6
18:24:25,329 INFO [TAManagedConnection:111] Initiating connection...
18:24:25,329 INFO [TAManagedConnection:118] Connection established
18:24:25,329 INFO [TAManagedConnectionFactory:111] Connection created - number 7
18:24:25,329 INFO [TAManagedConnection:111] Initiating connection...
18:24:25,329 INFO [TAManagedConnection:118] Connection established
18:24:25,329 INFO [TAManagedConnectionFactory:111] Connection created - number 8
18:24:25,329 INFO [TAManagedConnection:111] Initiating connection...
18:24:25,329 INFO [TAManagedConnection:118] Connection established
18:24:25,329 INFO [TAManagedConnectionFactory:111] Connection created - number 9
18:24:25,329 INFO [TAManagedConnection:111] Initiating connection...
18:24:25,329 INFO [TAManagedConnection:118] Connection established
18:24:25,329 INFO [TAManagedConnectionFactory:111] Connection created - number 10
30 seconds before, jboss validates the recently created connections:
18:24:55,330 INFO [TAManagedConnectionFactory:142] VALIDATING CONNECTIONS....
18:24:55,330 INFO [TAManagedConnection:249] Validating connection 6
18:24:55,345 INFO [TAManagedConnection:275] Connection is valid
18:24:55,345 INFO [TAManagedConnectionFactory:154] VALIDATION FINISHED
18:24:55,345 INFO [TAManagedConnectionFactory:142] VALIDATING CONNECTIONS....
18:24:55,345 INFO [TAManagedConnection:249] Validating connection 7
18:24:55,345 INFO [TAManagedConnection:275] Connection is valid
18:24:55,345 INFO [TAManagedConnectionFactory:154] VALIDATION FINISHED
18:24:55,345 INFO [TAManagedConnectionFactory:142] VALIDATING CONNECTIONS....
18:24:55,345 INFO [TAManagedConnection:249] Validating connection 8
18:24:55,345 INFO [TAManagedConnection:275] Connection is valid
18:24:55,345 INFO [TAManagedConnectionFactory:154] VALIDATION FINISHED
18:24:55,361 INFO [TAManagedConnectionFactory:142] VALIDATING CONNECTIONS....
18:24:55,361 INFO [TAManagedConnection:249] Validating connection 9
18:24:55,361 INFO [TAManagedConnection:275] Connection is valid
18:24:55,361 INFO [TAManagedConnectionFactory:154] VALIDATION FINISHED
18:24:55,361 INFO [TAManagedConnectionFactory:142] VALIDATING CONNECTIONS....
18:24:55,361 INFO [TAManagedConnection:249] Validating connection 10
18:24:55,377 INFO [TAManagedConnection:275] Connection is valid
18:24:55,377 INFO [TAManagedConnectionFactory:154] VALIDATION FINISHED
but 30 seconds before this (and exactly 1 minute before the last unsuccessful validation) jboss validates the destroyed connections (ids 1 to 5):
18:25:25,377 INFO [TAManagedConnectionFactory:142] VALIDATING CONNECTIONS....
18:25:25,377 INFO [TAManagedConnection:249] Validating connection 2
18:25:25,377 INFO [TAManagedConnection:299] Channel is not connected
18:25:25,377 INFO [TAManagedConnectionFactory:150] Invalid connection found
18:25:25,377 INFO [TAManagedConnectionFactory:154] VALIDATION FINISHED
18:25:25,377 WARN [JBossManagedConnectionPool:657]
18:25:25,377 INFO [TAManagedConnectionFactory:142] VALIDATING CONNECTIONS....
18:25:25,377 INFO [TAManagedConnection:249] Validating connection 3
18:25:25,377 INFO [TAManagedConnection:299] Channel is not connected
18:25:25,377 INFO [TAManagedConnectionFactory:150] Invalid connection found
18:25:25,377 INFO [TAManagedConnectionFactory:154] VALIDATION FINISHED
18:25:25,377 WARN [JBossManagedConnectionPool:657]
18:25:25,377 INFO [TAManagedConnectionFactory:142] VALIDATING CONNECTIONS....
18:25:25,377 INFO [TAManagedConnection:249] Validating connection 4
18:25:25,377 INFO [TAManagedConnection:299] Channel is not connected
18:25:25,377 INFO [TAManagedConnectionFactory:150] Invalid connection found
18:25:25,377 INFO [TAManagedConnectionFactory:154] VALIDATION FINISHED
18:25:25,377 WARN [JBossManagedConnectionPool:657]
18:25:25,377 INFO [TAManagedConnectionFactory:142] VALIDATING CONNECTIONS....
18:25:25,377 INFO [TAManagedConnection:249] Validating connection 5
18:25:25,377 INFO [TAManagedConnection:299] Channel is not connected
18:25:25,377 INFO [TAManagedConnectionFactory:150] Invalid connection found
18:25:25,377 INFO [TAManagedConnectionFactory:154] VALIDATION FINISHED
18:25:25,377 WARN [JBossManagedConnectionPool:657]
18:25:25,377 INFO [TAManagedConnectionFactory:142] VALIDATING CONNECTIONS....
18:25:25,377 INFO [TAManagedConnection:249] Validating connection 1
18:25:25,377 INFO [TAManagedConnection:299] Channel is not connected
18:25:25,377 INFO [TAManagedConnectionFactory:150] Invalid connection found
18:25:25,377 INFO [TAManagedConnectionFactory:154] VALIDATION FINISHED
18:25:25,377 WARN [JBossManagedConnectionPool:657]
As you can see, jboss is constantly validating destroyed connections, the more connections get invalid, the more the problem increases.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4024394#4024394
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4024394
17Â years, 10Â months
[JBoss Seam] - more than one Seam Phase Listeners?
by mrines77
As far as I can tell, I heve only the one (I thought obligatory) Seam Phase Listener in my faces-config.xml file:
<!-- Same for all Seam applications -->
| <application>
| <variable-resolver>org.jboss.seam.jsf.SeamVariableResolver</variable-resolver>
| </application>
| <lifecycle>
| <phase-listener>org.jboss.seam.jsf.SeamExtendedManagedPersistencePhaseListener</phase-listener>
| </lifecycle>
|
Here is the startup portion of the log4j file. Notice the duplicate statements generated starting at the "WARN There should only be one Seam phase listener per application:"
10:25:27,093 [main] INFO - Reading standard config org/apache/myfaces/resource/standard-faces-config.xml
| 10:25:27,484 [main] INFO - Reading config jar:file:/WEB-INF/lib/ajax4jsf.jar!/META-INF/faces-config.xml
| 10:25:27,500 [main] INFO - Reading config jar:file:/WEB-INF/lib/jboss-seam-debug.jar!/META-INF/faces-config.xml
| 10:25:27,515 [main] INFO - Reading config jar:file:/WEB-INF/lib/jboss-seam-ui.jar!/META-INF/faces-config.xml
| 10:25:27,531 [main] INFO - Reading config jar:file:/WEB-INF/lib/jboss-seam.jar!/META-INF/faces-config.xml
| 10:25:27,546 [main] INFO - Reading config jar:file:/WEB-INF/lib/jsf-facelets.jar!/META-INF/faces-config.xml
| 10:25:27,546 [main] INFO - Reading config jar:file:/WEB-INF/lib/tomahawk-1.1.3.jar!/META-INF/faces-config.xml
| 10:25:27,578 [main] INFO - Reading config /WEB-INF/navigation.xml
| 10:25:27,578 [main] INFO - Reading config /WEB-INF/faces-config.xml
| 10:25:27,640 [main] INFO - Starting up MyFaces-package : myfaces-api in version : 1.1.5 from path : file:/WEB-INF/lib/myfaces-api-1.1.5.jar
| 10:25:27,640 [main] INFO - Starting up MyFaces-package : myfaces-impl in version : 1.1.5 from path : file:/WEB-INF/lib/myfaces-impl-1.1.5.jar
| 10:25:27,640 [main] INFO - MyFaces-package : tomahawk-sandbox not found.
| 10:25:27,640 [main] INFO - Starting up MyFaces-package : tomahawk in version : 1.1.3 from path : file:/WEB-INF/lib/tomahawk-1.1.3.jar
| 10:25:27,671 [main] WARN - Locale name in faces-config.xml null or empty, setting locale to default locale : en_US
| 10:25:27,781 [main] WARN - There should only be one Seam phase listener per application
| 10:25:27,781 [main] WARN - There should only be one Seam phase listener per application
| 10:25:27,781 [main] INFO - Serialization provider : class org.apache.myfaces.shared_impl.util.serial.DefaultSerialFactory
| 10:25:27,796 [main] INFO - ServletContext '' initialized.
| 10:25:27,796 [main] INFO - Welcome to Seam 1.2.0.PATCH1
| 10:25:27,828 [main] INFO - scanning: /WEB-INF/lib/jboss-seam.jar
| 10:25:27,828 [main] INFO - scanning: /WEB-INF/lib/jboss-seam.jar
| 10:25:27,828 [main] DEBUG - archive: WEB-INF\lib\jboss-seam.jar
| 10:25:27,828 [main] DEBUG - archive: WEB-INF\lib\jboss-seam.jar
| 10:25:27,828 [main] DEBUG - found: META-INF/
| 10:25:27,828 [main] DEBUG - found: META-INF/
| 10:25:27,828 [main] DEBUG - found: META-INF/MANIFEST.MF
| 10:25:27,828 [main] DEBUG - found: META-INF/MANIFEST.MF
| 10:25:27,828 [main] DEBUG - found: META-INF/components.xml
| 10:25:27,828 [main] DEBUG - found: META-INF/components.xml
| 10:25:27,828 [main] DEBUG - found: META-INF/faces-config.xml
| 10:25:27,828 [main] DEBUG - found: META-INF/faces-config.xml
| 10:25:27,828 [main] DEBUG - found: org/
| 10:25:27,828 [main] DEBUG - found: org/
| 10:25:27,828 [main] DEBUG - found: org/jboss/
| 10:25:27,828 [main] DEBUG - found: org/jboss/
| 10:25:27,828 [main] DEBUG - found: org/jboss/seam/
| 10:25:27,828 [main] DEBUG - found: org/jboss/seam/
| 10:25:27,828 [main] DEBUG - found: org/jboss/seam/Component$1.class
| 10:25:27,828 [main] DEBUG - found: org/jboss/seam/Component$1.class
| 10:25:27,828 [main] DEBUG - found: org/jboss/seam/Component$BijectedAttribute.class
| 10:25:27,828 [main] DEBUG - found: org/jboss/seam/Component$BijectedAttribute.class
| 10:25:27,828 [main] DEBUG - found: org/jboss/seam/Component$BijectedField.class
I notice that if I elimiate the Seam Phase Listener in my faces-config.xml, then my site comes up without the warning above but the ejb components do not appear in the application context within the debug page and I get a no Phase Id error instead. Can there be a built-in Seam Phase Listener that is conflicting with my webapp's one? Anyone else come across this scenario? One last note, even though I have only one log4.xml in my webapp, I start getting duplicate log messages right after the Seam Phase Listener warning. Any ideas? Sure would help a push here, a bit stuck.
Mark
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4024392#4024392
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4024392
17Â years, 10Â months