[EJB/JBoss] - Late Or Wrong Detected Deadlocks ?
by mkehrer
Environment:
JBoss 3.2.7; J2EE 1.3.1; JDK 1.4.2_11; MSSQL 2005;
Problem:
We have observerd that a QueuedPessimisticEJBLock is detected (too late?) after a object has been accessed several times before, already...
2007-02-11 13:16:26,573 9345975 ERROR (JMS SessionPool Worker-38) [org.jboss.ejb.plugins.LogInterceptor]TransactionRolledbackLocalException in method: public abstract long com.foo.blah.package.ejb.ExampleLocal.getTrackId(), causedBy:
java.lang.RuntimeException: Transaction marked for rollback, possibly a timeout
at org.jboss.ejb.plugins.lock.QueuedPessimisticEJBLock.doSchedule(QueuedPessimisticEJBLock.java:228)
at org.jboss.ejb.plugins.lock.QueuedPessimisticEJBLock.schedule(QueuedPessimisticEJBLock.java:183)
at org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.java:85)
at org.jboss.ejb.plugins.EntityCreationInterceptor.invoke(EntityCreationInterceptor.java:54)
at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:317)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:150)
at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:111)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
at org.jboss.ejb.EntityContainer.internalInvoke(EntityContainer.java:484)
at org.jboss.ejb.Container.invoke(Container.java:709)
at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:419)
at org.jboss.ejb.plugins.local.EntityProxy.invoke(EntityProxy.java:44)
at $Proxy559.getTrackId(Unknown Source)
at com.foo.blah.package.ejb.control.FooServiceBean.checkSomethingOfExample(FooServiceBean.java:899)
at sun.reflect.GeneratedMethodAccessor289.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:683)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:72)
at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:317)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:150)
at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:111)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
at org.jboss.ejb.StatelessSessionContainer.internalInvoke(StatelessSessionContainer.java:331)
at org.jboss.ejb.Container.invoke(Container.java:709)
at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:419)
at org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:83)
at $Proxy676.checkSomethingOfExample(Unknown Source)
at com.foo.blah.package.ejb.control.RoutingServiceBean.checkSomethingOfExample(RoutingServiceBean.java:711)
at sun.reflect.GeneratedMethodAccessor288.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:683)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84)
at org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext(AbstractTxInterceptorBMT.java:144)
at org.jboss.ejb.plugins.TxInterceptorBMT.invoke(TxInterceptorBMT.java:62)
at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:72)
at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:111)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
at org.jboss.ejb.StatelessSessionContainer.internalInvoke(StatelessSessionContainer.java:331)
at org.jboss.ejb.Container.invoke(Container.java:709)
at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:419)
at org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:83)
at $Proxy670.checkSomethingOfExample(Unknown Source)
at com.foo.blah.package.ejb.control.ctrl.SupplementDistributorCtrlBean.processMessage(SupplementDistributorCtrlBean.java:154)
at sun.reflect.GeneratedMethodAccessor493.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:683)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:72)
at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:284)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:150)
at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:111)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
at org.jboss.ejb.StatelessSessionContainer.internalInvoke(StatelessSessionContainer.java:331)
at org.jboss.ejb.Container.invoke(Container.java:709)
at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:419)
at org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:83)
at $Proxy677.processMessage(Unknown Source)
at com.foo.blah.package.ejb.control.receive.PlcReceiveBean.onMessage(PlcReceiveBean.java:136)
at sun.reflect.GeneratedMethodAccessor150.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.java:458)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterceptor.java:62)
at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:284)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:150)
at org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:90)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:372)
at org.jboss.ejb.Container.invoke(Container.java:709)
at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:928)
at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:1205)
at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:276)
at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:904)
at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:159)
at org.jboss.mq.SpySession.run(SpySession.java:351)
at org.jboss.jms.asf.StdServerSession.run0(StdServerSession.java:200)
at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:180)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743)
at java.lang.Thread.run(Thread.java:534)
I'm confused, cause no lock has been detected while seveal 'isSomethingTrue' or 'getSomething' methods of 'ExampleLocal' have been invoked in the same method, before 'checkSomethingOfExample' is called.
Does anybody understand whats happening here and is able to explain this behavior?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4015875#4015875
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4015875
19Â years, 2Â months
[JBoss Seam] - Seam Mail and multipart/alternative bug ?
by sebdoby
Hello,
When I send a mail with alternate facet in the body of message, the ContentType text/plain appear after the ContentType text/html :
| ------=_Part_6_13694334.1171380287058
| Content-Type: multipart/alternative;
| boundary="----=_Part_7_10830435.1171380287058"
|
| ------=_Part_7_10830435.1171380287058
| Content-Type: text/html; charset=us-ascii
| Content-Transfer-Encoding: 7bit
| <html>
| <body>
| <p><b>sebdoby,</b></p>
| <p>This is an example <i>HTML</i> email sent by Seam.</p>
| <p>It has an alternative text body for mail readers that don't support html.</p>
| </body>
| </html>
| ------=_Part_7_10830435.1171380287058
| Content-Type: text/plain; charset=us-ascii
| Content-Transfer-Encoding: 7bit
|
| This is the alternative text body for mail readers that don't support html
| ------=_Part_7_10830435.1171380287058--
|
| ------=_Part_6_13694334.1171380287058--
|
So, the html is never read by your email client application (tested with thunderbird)
If you put text/html at the end, it runs correctly :
| ------=_Part_6_13694334.1171380287058
| Content-Type: multipart/alternative;
| boundary="----=_Part_7_10830435.1171380287058"
| ------=_Part_7_10830435.1171380287058
| Content-Type: text/plain; charset=us-ascii
| Content-Transfer-Encoding: 7bit
|
| This is the alternative text body for mail readers that don't support html
| ------=_Part_7_10830435.1171380287058
| Content-Type: text/html; charset=us-ascii
| Content-Transfer-Encoding: 7bit
| <html>
| <body>
| <p><b>sebdoby,</b></p>
| <p>This is an example <i>HTML</i> email sent by Seam.</p>
| <p>It has an alternative text body for mail readers that don't support html.</p>
| </body>
| </html>
|
| ------=_Part_7_10830435.1171380287058--
|
| ------=_Part_6_13694334.1171380287058--
|
Version : 1.1.6.GA
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4015870#4015870
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4015870
19Â years, 2Â months
[JBoss Seam] - Action not being called
by edeprez
Hello,
I'm struggling with the following problem. So maybe someone will be kind enough to enlight me on what I'm doing wrong.
I've simplified the code for the sake of clarity.
A list of string is displayed. An id is associated with each string.
A click on [edit] sends a request to the backing bean with the id as a request parameter. Then the list refreshes and the display changes for the corresponding string.
The first click on [edit] actually works and triggers the backing bean. Any subsequent click on any commandLink goes to the server, updates the id with request parameter as expected, but doesn't call the action method!
Here is the html
| <html xmlns="http://www.w3.org/1999/xhtml"
| xmlns:ui="http://java.sun.com/jsf/facelets"
| xmlns:h="http://java.sun.com/jsf/html"
| xmlns:f="http://java.sun.com/jsf/core"
| xmlns:s="http://jboss.com/products/seam/taglib">
|
| <head>
| </head>
|
| <body>
| <ui:debug hotkey="x" rendered="true"/>
| <form jsfc="h:form" id="testForm">
| <ui:repeat value="#{ctest.addresses}" var="addr">
| <h:panelGroup rendered="#{ctest.editMode and addr.id == ctest.editId}">
| <h:outputText value="-edit- #{addr.value}" />
| <h:commandLink title="reset" action="#{ctest.reset}" value="[reset]" />
| </h:panelGroup>
| <h:panelGroup rendered="#{not (ctest.editMode and addr.id == ctest.editId)}">
| <h:outputText value="#{addr.value} " />
| <h:commandLink title="edit" action="#{ctest.edit}" value="[edit]">
| <f:param name="editId" value="#{addr.id}"/>
| </h:commandLink>
| </h:panelGroup>
| XX editMode: #{ctest.editMode} / addr.id: #{addr.id} / ctest.editId: #{ctest.editId}
| <br/>
| </ui:repeat>
|
| <br/>
| <h:commandLink title="reset" action="#{ctest.reset}" value="[reset]" />
| </form>
| </body>
| </html>
|
And the backing bean:
| @Name("ctest")
| @Scope(ScopeType.SESSION)
| public class CmpTest {
| private static Logger logger = Logger.getLogger(CmpTest.class);
|
| private ArrayList<Elem> addresses = new ArrayList<Elem>();
|
| @RequestParameter
| private Long editId;
|
| private boolean editMode;
|
| @Create
| public void cmpTest() {
| System.out.println("CREATING " + editUser);
| for (int i = 0; i < 2; i++) {
| addresses.add(new Elem(new Long(i), "ADDR " + i));
| }
|
| }
|
| public List getAddresses() {
| return addresses;
| }
| public boolean getEditMode() {
| return editMode;
| }
| public Long getEditId() {
| return editId;
| }
|
| public void reset() {
| logger.info("RESET!");
| editId = null;
| editMode = false;
| }
| public void edit() {
| logger.info("EDIT!! " + editId);
| editMode = true;
| }
|
|
| public static class Elem {
| Long id;
| String value;
| public Elem(Long id, String value) {
| this.id = id;
| this.value = value;
| }
| public Long getId() {
| return id;
| }
| public void setId(Long id) {
| this.id = id;
| }
| public String getValue() {
| return value;
| }
| public void setValue(String value) {
| this.value = value;
| }
| public String toString() {
| return id + ":" + value;
| }
| }
| }
|
A click on the [reset] link that is outside of the ui:repeat somehow cleanup stuff so the next click on a link in the list triggers a call of the action method.
Note that the same behavior occurs if there is not loop and a single object displayed.
Any clues/explanation on why the action method is not called?
Thanks!
Eric.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4015866#4015866
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4015866
19Â years, 2Â months