[JBossCache] - Optimistic DataVersioningException on read-only objects
by JakaJaksic
Hi, all!
We noticed an interesting problem with optimistic locking. The problem is frequent versioning exceptions on objects which are very rarely modified or even read-only. If we run a stress test, the errors appear almost immediately, while in real-life use they occur at least a few times a day, which is bad enough. Because of this, we had to temporarily switch JBC off, because we couldn't find a working configuration, but since 1.4.1 SP1 our application seems to run well in pessimistic mode. So this is no longer a critical problem, but I still think it deserves some attention.
The thing is that these errors seem really unnecessary. I do not know precisely how the combination of Hibernate + JBoss Cache works, but the nature of our application is such that real concurrent modifications of the same objects are extremely rare (it is basically a BPM application, using JBPM 3.0, where objects or records are mainly just inserted, and modifications are mostly done in a "private" context, where each user/process/thread only touches its own objects). So where do these errors come from? I'm pretty sure the objects causing errors are NOT being modified, much less concurrently - they are merely being concurrently accessed, but that should not be a problem, right?
I also have a question as to which locking mode is better to use in an application such as ours, where the possibility of concurrent object modifications is almost none. Of course we will stay with pessimistic for now, because it works. I'm just wondering if this is the optimal choice anyway, or are we missing something?
Regards,
Jaka
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4014746#4014746
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4014746
19Â years, 2Â months
[JBoss Seam] - Re: Need some help with Seam Email
by bsmithjj
Some more data from the deploy trace:
| 19:30:04,234 INFO [ServletContextListener] Welcome to Seam 1.1.6.GA
| 19:30:04,250 INFO [Initialization] Namespace: http://jboss.com/products/seam/core, package: org.jboss.seam.core, prefix: org.jboss.seam.core
| 19:30:04,265 INFO [Initialization] Namespace: http://jboss.com/products/seam/framework, package: org.jboss.seam.framework, prefix: org.jboss.seam.core.framework
| 19:30:04,265 INFO [Initialization] Namespace: http://jboss.com/products/seam/jms, package: org.jboss.seam.jms, prefix: org.jboss.seam.jms
| 19:30:04,265 INFO [Initialization] Namespace: http://jboss.com/products/seam/drools, package: org.jboss.seam.drools, prefix: org.jboss.seam.drools
| 19:30:04,265 INFO [Initialization] Namespace: http://jboss.com/products/seam/remoting, package: org.jboss.seam.remoting, prefix: org.jboss.seam.remoting
| 19:30:04,265 INFO [Initialization] Namespace: http://jboss.com/products/seam/theme, package: org.jboss.seam.theme, prefix: org.jboss.seam.theme
| 19:30:04,265 INFO [Scanner] scanning: /C:/jboss-4.0.4.EJB.3RC8/server/default/tmp/deploy/tmp5440access-control-1.0.ear-contents/access-control-ejbs-1.0.jar
| 19:30:04,265 INFO [Scanner] scanning: /C:/jboss-4.0.4.EJB.3RC8/server/default/tmp/deploy/tmp5440access-control-1.0.ear-contents/jboss-seam-mail-1.1.6.jar
| 19:30:04,281 INFO [Scanner] scanning: /C:/jboss-4.0.4.EJB.3RC8/server/default/tmp/deploy/tmp5440access-control-1.0.ear-contents/jboss-seam-ui-1.1.6.jar
| 19:30:04,281 INFO [Scanner] scanning: C:\jboss-4.0.4.EJB.3RC8\server\default\tmp\deploy\tmp5440access-control-1.0.ear-contents\access-control-webapp-1.0-exp.war\WEB-INF\classes
| 19:30:04,281 INFO [Scanner] scanning: /C:/jboss-4.0.4.EJB.3RC8/server/default/tmp/deploy/tmp5440access-control-1.0.ear-contents/access-control-webapp-1.0-exp.war/WEB-INF/lib/jboss-seam-
| ui-1.1.6.jar
| 19:30:04,281 INFO [Initialization] Namespace: http://jboss.com/products/seam/mail, package: org.jboss.seam.mail, prefix: org.jboss.seam.mail
| 19:30:04,296 INFO [Scanner] scanning: /C:/jboss-4.0.4.EJB.3RC8/server/default/tmp/deploy/tmp5440access-control-1.0.ear-contents/jboss-seam-1.1.6.jar
| 19:30:04,312 INFO [Initialization] Namespace: http://jboss.com/products/seam/security, package: org.jboss.seam.security, prefix: org.jboss.seam.security
| 19:30:04,312 INFO [Initialization] Namespace: http://jboss.com/products/seam/drools, package: org.jboss.seam.drools, prefix: org.jboss.seam.drools
| 19:30:04,312 INFO [Initialization] Namespace: http://jboss.com/products/seam/remoting, package: org.jboss.seam.remoting, prefix: org.jboss.seam.remoting
| 19:30:04,312 INFO [Initialization] Namespace: http://jboss.com/products/seam/theme, package: org.jboss.seam.theme, prefix: org.jboss.seam.theme
| 19:30:04,312 INFO [Initialization] Namespace: http://jboss.com/products/seam/core, package: org.jboss.seam.core, prefix: org.jboss.seam.core
| 19:30:04,312 INFO [Initialization] Namespace: http://jboss.com/products/seam/jms, package: org.jboss.seam.jms, prefix: org.jboss.seam.jms
| 19:30:04,312 INFO [Initialization] Namespace: http://jboss.com/products/seam/framework, package: org.jboss.seam.framework, prefix: org.jboss.seam.core.framework
| 19:30:04,312 INFO [Initialization] reading /WEB-INF/components.xml
| 19:30:04,359 INFO [Initialization] reading jar:file:/C:/jboss-4.0.4.EJB.3RC8/server/default/tmp/deploy/tmp5440access-control-1.0.ear-contents/jboss-seam-1.1.6.jar!/META-INF/components.x
| ml
| 19:30:04,375 INFO [Initialization] reading properties from: /seam.properties
| 19:30:04,375 INFO [Initialization] reading properties from: /jndi.properties
| 19:30:04,375 INFO [Initialization] initializing Seam
| 19:30:04,375 INFO [Scanner] scanning: /C:/jboss-4.0.4.EJB.3RC8/server/default/tmp/deploy/tmp5440access-control-1.0.ear-contents/access-control-ejbs-1.0.jar
| 19:30:04,718 INFO [Scanner] scanning: /C:/jboss-4.0.4.EJB.3RC8/server/default/tmp/deploy/tmp5440access-control-1.0.ear-contents/jboss-seam-mail-1.1.6.jar
| 19:30:04,765 INFO [Scanner] scanning: /C:/jboss-4.0.4.EJB.3RC8/server/default/tmp/deploy/tmp5440access-control-1.0.ear-contents/jboss-seam-ui-1.1.6.jar
| 19:30:04,890 INFO [Scanner] scanning: C:\jboss-4.0.4.EJB.3RC8\server\default\tmp\deploy\tmp5440access-control-1.0.ear-contents\access-control-webapp-1.0-exp.war\WEB-INF\classes
| 19:30:04,937 INFO [Scanner] scanning: /C:/jboss-4.0.4.EJB.3RC8/server/default/tmp/deploy/tmp5440access-control-1.0.ear-contents/access-control-webapp-1.0-exp.war/WEB-INF/lib/jboss-seam-
| ui-1.1.6.jar
| 19:30:05,031 INFO [Scanner] scanning: /C:/jboss-4.0.4.EJB.3RC8/server/default/tmp/deploy/tmp5440access-control-1.0.ear-contents/jboss-seam-1.1.6.jar
| 19:30:06,484 INFO [Initialization] two components with same name, higher precedence wins: org.jboss.seam.jms.queueConnection
| 19:30:06,500 INFO [Initialization] two components with same name, higher precedence wins: org.jboss.seam.core.pages
| 19:30:06,515 INFO [Initialization] two components with same name, higher precedence wins: org.jboss.seam.core.manager
| 19:30:06,515 INFO [Initialization] two components with same name, higher precedence wins: org.jboss.seam.mail.mailSession
| 19:30:06,531 INFO [Initialization] two components with same name, higher precedence wins: org.jboss.seam.persistence.persistenceProvider
| 19:30:06,562 INFO [Component] Component: org.jboss.seam.core.init, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.Init
| 19:30:06,578 INFO [Initialization] Installing components...
| 19:30:06,578 INFO [Component] Component: org.jboss.seam.core.applicationContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.ApplicationContext
| 19:30:06,578 INFO [Component] Component: org.jboss.seam.core.conversationStack, scope: PAGE, type: JAVA_BEAN, class: org.jboss.seam.core.ConversationStack
| ...
| ...
| ...
|
the message about "[Initialization] two components with same name, higher precedence wins: org.jboss.seam.core.pages" is a bit strange.
here is my components.xml:
| <?xml version="1.0" encoding="UTF-8"?>
| <components xmlns="http://jboss.com/products/seam/components"
| xmlns:core="http://jboss.com/products/seam/core"
| xmlns:mail="http://jboss.com/products/seam/mail"
| xmlns:components="http://jboss.com/products/seam/components"
| xmlns:framework="http://jboss.com/products/seam/framework"
| xmlns:jms="http://jboss.com/products/seam/jms"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation=
| "http://jboss.com/products/seam/core http://jboss.com/products/seam/core-1.1.xsd
| http://jboss.com/products/seam/components http://jboss.com/products/seam/components-1.1.xsd
| http://jboss.com/products/seam/framework http://jboss.com/products/seam/framework-1.1.xsd
| http://jboss.com/products/seam/jms http://jboss.com/products/seam/jms-1.1.xsd
| http://jboss.com/products/seam/mail http://jboss.com/products/seam/mail-1.1.xsd">
|
| <core:init jndi-pattern="access-control-1.0/#{ejbName}/local" debug="true"/>
|
| <mail:mail-session jndi-name="java:/Mail"/>
|
| <!-- 1500 second conversation timeout (for long running tests) -->
| <core:manager conversation-timeout="1800000"/>
|
| <core:pages no-conversation-view-id="/index.xhtml">
|
| </core:pages>
|
| <!-- jBPM Component configuration -->
| <core:jbpm>
| <core:process-definitions>
| <value>processdefinition.xml</value>
| </core:process-definitions>
| </core:jbpm>
|
| <core:managed-persistence-context
| name="accessControlDatabase"
| persistence-unit-jndi-name="java:/EntityManagerFactories/accessControlDatabase"/>
|
| <!-- Queue Connection Factory -->
| <jms:queue-connection queue-connection-factory-jndi-name="java:/QueueConnectionFactory"/>
|
| <!-- Queue(s) -->
| <jms:managed-queue-sender name="evergreenSecurityQueue" auto-create="true"
| queue-jndi-name="java:/SonicJMS/Queues/AccessControlAdaptor/EvergreenSecurity"/>
|
| <!-- Queue(s) -->
| <jms:managed-queue-sender name="accessControlReceiveQueue" auto-create="true"
| queue-jndi-name="java:/SonicJMS/Queues/AccessControl/Receive"/>
|
| <jms:managed-queue-sender name="test1sendQ" auto-create="true"
| queue-jndi-name="java:/SonicJMS/Queues/Test1/Send"/>
|
| <jms:managed-queue-sender name="test2sendQ" auto-create="true"
| queue-jndi-name="java:/SonicJMS/Queues/Test2/Send"/>
|
| </components>
|
|
and here is my mail-service.xml:
| <?xml version="1.0" encoding="UTF-8"?>
| <!DOCTYPE server>
| <!-- $Id: mail-service.xml,v 1.5.6.1 2005/06/01 06:20:43 starksm Exp $ -->
|
| <server>
|
| <!-- ==================================================================== -->
| <!-- Mail Connection Factory -->
| <!-- ==================================================================== -->
|
| <mbean code="org.jboss.mail.MailService"
| name="jboss:service=Mail">
| <attribute name="JNDIName">java:/Mail</attribute>
| <attribute name="User"></attribute>
| <attribute name="Password"></attribute>
| <attribute name="Configuration">
| <!-- Test -->
| <configuration>
| <!-- Change to your mail server prototocol -->
| <!--property name="mail.store.protocol" value="pop3"/-->
| <property name="mail.transport.protocol" value="smtp"/>
|
| <!-- Change to the user who will receive mail -->
| <!--property name="mail.user" value="nobody"/-->
|
| <!-- Change to the mail server -->
| <!--property name="mail.pop3.host" value="pop3.nosuchhost.nosuchdomain.com"/-->
|
| <!-- Change to the SMTP gateway server -->
| <property name="mail.smtp.host" value="smtpboston2.evergreeninsite.com"/>
|
| <!-- Change to the address mail will be from -->
| <property name="mail.from" value="EvergreenAccessControl(a)evergreeninvestments.com"/>
|
| <!-- Enable debugging output from the javamail classes -->
| <property name="mail.debug" value="true"/>
| </configuration>
| <depends>jboss:service=Naming</depends>
| </attribute>
| </mbean>
|
| </server>
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4014724#4014724
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4014724
19Â years, 2Â months