[
https://issues.apache.org/jira/browse/OPENEJB-1968?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13532015#comment-13532015
]
Howard W. Smith, Jr. commented on OPENEJB-1968:
-----------------------------------------------
The Windows Server 2003 32bit 4GB RAM is doing it's best...slowly chugging
away, trying to insert the data into the database. So far, the test results
include/reveal slowness, database/dead lock (I can't do anything as an enduser,
cannot retrieve data from database), and shows that the 1st airport shuttle was
inserted, but 2nd airport shuttle (2 airport shuttles in one email) is still
being inserted into the database, so I will have to add those test results in
the next comment.
Dec 13, 2012 10:48:00 PM pf.ApplicationScopeBean log
INFO: EmailStatelessBean.getEmails(): invoked Thu Dec 13 22:48:00 EST 2012
Dec 13, 2012 10:48:01 PM pf.ApplicationScopeBean log
INFO: EmailStatelessBean.getEmails(): # of emails retrieved = 1
Dec 13, 2012 10:48:01 PM pf.ApplicationScopeBean log
INFO: EmailStatelessBean.processAirportShuttleRequest(): BEGIN Thu Dec 13
22:48:01 EST 2012
Dec 13, 2012 10:50:30 PM org.apache.openejb.core.timer.EjbTimerServiceImpl
ejbTimeout
WARNING: RuntimeException from ejbTimeout on EmailStatelessBean
javax.ejb.ConcurrentAccessTimeoutException: Unable to get write lock on
'getEmails' method for: utils.mail.EmailStatelessBean
at
org.apache.openejb.core.singleton.SingletonContainer.aquireLock(SingletonContainer.java:309)
at
org.apache.openejb.core.singleton.SingletonContainer._invoke(SingletonContainer.java:228)
at
org.apache.openejb.core.singleton.SingletonContainer.invoke(SingletonContainer.java:211)
at
org.apache.openejb.core.timer.EjbTimerServiceImpl.ejbTimeout(EjbTimerServiceImpl.java:569)
at
org.apache.openejb.core.timer.EjbTimeoutJob.execute(EjbTimeoutJob.java:39)
at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Dec 13, 2012 10:51:00 PM org.apache.openejb.core.timer.EjbTimerServiceImpl
ejbTimeout
WARNING: RuntimeException from ejbTimeout on EmailStatelessBean
javax.ejb.ConcurrentAccessTimeoutException: Unable to get write lock on
'getEmails' method for: utils.mail.EmailStatelessBean
at
org.apache.openejb.core.singleton.SingletonContainer.aquireLock(SingletonContainer.java:309)
at
org.apache.openejb.core.singleton.SingletonContainer._invoke(SingletonContainer.java:228)
at
org.apache.openejb.core.singleton.SingletonContainer.invoke(SingletonContainer.java:211)
at
org.apache.openejb.core.timer.EjbTimerServiceImpl.ejbTimeout(EjbTimerServiceImpl.java:569)
at
org.apache.openejb.core.timer.EjbTimeoutJob.execute(EjbTimeoutJob.java:39)
at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Dec 13, 2012 10:51:00 PM org.apache.openejb.core.timer.EjbTimerServiceImpl
ejbTimeout
WARNING: Failed to execute ejbTimeout on EmailStatelessBean successfully within
1 attempts
Dec 13, 2012 10:52:30 PM org.apache.openejb.core.timer.EjbTimerServiceImpl
ejbTimeout
WARNING: RuntimeException from ejbTimeout on EmailStatelessBean
javax.ejb.ConcurrentAccessTimeoutException: Unable to get write lock on
'getEmails' method for: utils.mail.EmailStatelessBean
at
org.apache.openejb.core.singleton.SingletonContainer.aquireLock(SingletonContainer.java:309)
at
org.apache.openejb.core.singleton.SingletonContainer._invoke(SingletonContainer.java:228)
at
org.apache.openejb.core.singleton.SingletonContainer.invoke(SingletonContainer.java:211)
at
org.apache.openejb.core.timer.EjbTimerServiceImpl.ejbTimeout(EjbTimerServiceImpl.java:569)
at
org.apache.openejb.core.timer.EjbTimeoutJob.execute(EjbTimeoutJob.java:39)
at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Dec 13, 2012 10:52:41 PM pf.ApplicationScopeBean log
INFO: EmailStatelessBean.processAirportShuttleRequest(): ADD Airport Shuttle -
Flight # 1 SUCCESSFULLY for 12/20/2012
Dec 13, 2012 10:53:00 PM org.apache.openejb.core.timer.EjbTimerServiceImpl
ejbTimeout
WARNING: RuntimeException from ejbTimeout on EmailStatelessBean
javax.ejb.ConcurrentAccessTimeoutException: Unable to get write lock on
'getEmails' method for: utils.mail.EmailStatelessBean
at
org.apache.openejb.core.singleton.SingletonContainer.aquireLock(SingletonContainer.java:309)
at
org.apache.openejb.core.singleton.SingletonContainer._invoke(SingletonContainer.java:228)
at
org.apache.openejb.core.singleton.SingletonContainer.invoke(SingletonContainer.java:211)
at
org.apache.openejb.core.timer.EjbTimerServiceImpl.ejbTimeout(EjbTimerServiceImpl.java:569)
at
org.apache.openejb.core.timer.EjbTimeoutJob.execute(EjbTimeoutJob.java:39)
at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Dec 13, 2012 10:53:00 PM org.apache.openejb.core.timer.EjbTimerServiceImpl
ejbTimeout
WARNING: Failed to execute ejbTimeout on EmailStatelessBean successfully within
1 attempts
javax.ejb.EJBException: The bean encountered a non-application exception;
nested exception is:
Exception [EclipseLink-4002] (Eclipse Persistence Services -
2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLTransactionRollbackException: A lock could not
be obtained within the time requested
Error Code: 30000
Call: SELECT t0.ORDER_ID, t0.BALANCE, t0.CANCELLED, t0.CANCELLED_DATE,
t0.CHANGED_DT, t0.CONFIRMED, ...
Query: ReadAllQuery(name="Orders.findAllBookedTrips" referenceClass=Orders
sql="SELECT t0.ORDER_ID, t0.BALANCE, ...
at
org.apache.openejb.core.ivm.BaseEjbProxyHandler.convertException(BaseEjbProxyHandler.java:363)
at
org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:283)
at
jpa.session.OrdersFacade$LocalBeanProxy.filterBy(jpa/session/OrdersFacade.java)
at
jsf.orders.pf_OrdersController.filterBy(pf_OrdersController.java:1755)
at
jsf.orders.pf_OrdersController.initLazyModel(pf_OrdersController.java:2625)
at
jsf.orders.pf_OrdersController.recreateModel(pf_OrdersController.java:16106)
at
jsf.orders.pf_OrdersController.prepareList(pf_OrdersController.java:6000)
at
jsf.orders.pf_OrdersController.prepareList(pf_OrdersController.java:5952)
at
jsf.orders.pf_OrdersController.clearFilter(pf_OrdersController.java:5858)
at
jsf.orders.pf_OrdersController.browseOrdersAll(pf_OrdersController.java:686)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.apache.webbeans.intercept.InterceptorHandler.invoke(InterceptorHandler.java:322)
at
org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler.invoke(NormalScopedBeanInterceptorHandler.java:117)
at
org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler.invoke(NormalScopedBeanInterceptorHandler.java:108)
at
jsf.orders.pf_OrdersController_$$_javassist_6.browseOrdersAll(pf_OrdersController_$$_javassist_6.java)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at javax.el.BeanELResolver.invokeMethod(BeanELResolver.java:737)
at javax.el.BeanELResolver.invoke(BeanELResolver.java:467)
at javax.el.CompositeELResolver.invoke(CompositeELResolver.java:246)
at de.odysseus.el.tree.impl.ast.AstMethod.eval(AstMethod.java:91)
at de.odysseus.el.tree.impl.ast.AstMethod.invoke(AstMethod.java:104)
at de.odysseus.el.tree.impl.ast.AstEval.invoke(AstEval.java:71)
at
de.odysseus.el.TreeMethodExpression.invoke(TreeMethodExpression.java:132)
at
org.apache.myfaces.view.facelets.el.ContextAwareTagMethodExpression.invoke(ContextAwareTagMethodExpression.java:96)
at
javax.faces.event.MethodExpressionActionListener.processAction(MethodExpressionActionListener.java:83)
at javax.faces.event.ActionEvent.processListener(ActionEvent.java:51)
at
javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:420)
at javax.faces.component.UICommand.broadcast(UICommand.java:103)
at javax.faces.component.UIViewRoot._broadcastAll(UIViewRoot.java:1028)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:286)
at javax.faces.component.UIViewRoot._process(UIViewRoot.java:1375)
at
javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:752)
at
org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(InvokeApplicationExecutor.java:38)
at
org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:170)
at
org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:79)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.omnifaces.filter.GzipResponseFilter.doFilter(GzipResponseFilter.java:148)
at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:75)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at pf.LoginFilter.doFilter(LoginFilter.java:204)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:45)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at
org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1822)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services -
2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLTransactionRollbackException: A lock could not
be obtained within the time requested
Error Code: 30000
Call: SELECT t0.ORDER_ID, t0.BALANCE, t0.CANCELLED, t0.CANCELLED_DATE,
t0.CHANGED_DT, t0.CONFIRMED, ...
Query: ReadAllQuery(name="Orders.findAllBookedTrips" referenceClass=Orders
sql="SELECT t0.ORDER_ID, t0.BALANCE, ...
at
org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:333)
at
org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:644)
at
org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:535)
at
org.eclipse.persistence.internal.sessions.AbstractSession.basicExecuteCall(AbstractSession.java:1717)
at
org.eclipse.persistence.sessions.server.ServerSession.executeCall(ServerSession.java:566)
at
org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:207)
at
org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:193)
at
org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeSelectCall(DatasourceCallQueryMechanism.java:264)
at
org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.selectAllRows(DatasourceCallQueryMechanism.java:646)
at
org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectAllRowsFromTable(ExpressionQueryMechanism.java:2611)
at
org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectAllRows(ExpressionQueryMechanism.java:2570)
at
org.eclipse.persistence.queries.ReadAllQuery.executeObjectLevelReadQuery(ReadAllQuery.java:420)
at
org.eclipse.persistence.queries.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:1081)
at
org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:844)
at
org.eclipse.persistence.queries.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:1040)
at
org.eclipse.persistence.queries.ReadAllQuery.execute(ReadAllQuery.java:392)
at
org.eclipse.persistence.internal.sessions.AbstractSession.internalExecuteQuery(AbstractSession.java:2831)
at
org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1516)
at
org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1498)
at
org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1463)
at
org.eclipse.persistence.internal.jpa.EJBQueryImpl.executeReadQuery(EJBQueryImpl.java:485)
at
org.eclipse.persistence.internal.jpa.EJBQueryImpl.getResultList(EJBQueryImpl.java:742)
at jpa.session.OrdersFacade.filterBy(OrdersFacade.java:284)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:181)
at
org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:163)
at org.apache.openejb.cdi.CdiInterceptor.invoke(CdiInterceptor.java:128)
at
org.apache.openejb.cdi.CdiInterceptor.access$000(CdiInterceptor.java:43)
at org.apache.openejb.cdi.CdiInterceptor$1.call(CdiInterceptor.java:64)
at
org.apache.openejb.cdi.CdiInterceptor.aroundInvoke(CdiInterceptor.java:70)
at sun.reflect.GeneratedMethodAccessor117.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:181)
at
org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:163)
at
org.apache.openejb.monitoring.StatsInterceptor.record(StatsInterceptor.java:176)
at
org.apache.openejb.monitoring.StatsInterceptor.invoke(StatsInterceptor.java:95)
at sun.reflect.GeneratedMethodAccessor118.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:181)
at
org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:163)
at
org.apache.openejb.core.interceptor.InterceptorStack.invoke(InterceptorStack.java:138)
at
org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:237)
at
org.apache.openejb.core.stateless.StatelessContainer.invoke(StatelessContainer.java:189)
at
org.apache.openejb.core.ivm.EjbObjectProxyHandler.synchronizedBusinessMethod(EjbObjectProxyHandler.java:253)
at
org.apache.openejb.core.ivm.EjbObjectProxyHandler.businessMethod(EjbObjectProxyHandler.java:248)
at
org.apache.openejb.core.ivm.EjbObjectProxyHandler._invoke(EjbObjectProxyHandler.java:92)
at
org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:279)
... 67 more
Caused by: java.sql.SQLTransactionRollbackException: A lock could not be
obtained within the time requested
at
org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown
Source)
at
org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown
Source)
at
org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown
Source)
at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown
Source)
at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown
Source)
at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown
Source)
at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedStatement.executeQuery(Unknown
Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.apache.tomcat.jdbc.pool.interceptor.StatementDecoratorInterceptor$StatementProxy.invoke(StatementDecoratorInterceptor.java:252)
at $Proxy138.executeQuery(Unknown Source)
at
org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeSelect(DatabaseAccessor.java:929)
at
org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:607)
... 117 more
Caused by: java.sql.SQLException: A lock could not be obtained within the time
requested
at
org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
at
org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown
Source)
... 134 more
Caused by: ERROR 40XL1: A lock could not be obtained within the time requested
at org.apache.derby.iapi.error.StandardException.newException(Unknown
Source)
at
org.apache.derby.impl.services.locks.ConcurrentLockSet.lockObject(Unknown
Source)
at
org.apache.derby.impl.services.locks.ConcurrentLockSet.zeroDurationLockObject(Unknown
Source)
at
org.apache.derby.impl.services.locks.AbstractPool.zeroDurationlockObject(Unknown
Source)
at
org.apache.derby.impl.services.locks.ConcurrentPool.zeroDurationlockObject(Unknown
Source)
at
org.apache.derby.impl.store.raw.xact.RowLocking2nohold.lockRecordForRead(Unknown
Source)
at
org.apache.derby.impl.store.access.conglomerate.OpenConglomerate.lockPositionForRead(Unknown
Source)
at
org.apache.derby.impl.store.access.conglomerate.GenericScanController.fetchRows(Unknown
Source)
at
org.apache.derby.impl.store.access.heap.HeapScan.fetchNextGroup(Unknown Source)
at
org.apache.derby.impl.sql.execute.BulkTableScanResultSet.reloadArray(Unknown
Source)
at
org.apache.derby.impl.sql.execute.BulkTableScanResultSet.getNextRowCore(Unknown
Source)
at
org.apache.derby.impl.sql.execute.ProjectRestrictResultSet.getNextRowCore(Unknown
Source)
at
org.apache.derby.impl.sql.execute.ProjectRestrictResultSet.getNextRowCore(Unknown
Source)
at
org.apache.derby.impl.sql.execute.SortResultSet.getRowFromResultSet(Unknown
Source)
at
org.apache.derby.impl.sql.execute.SortResultSet.getNextRowFromRS(Unknown Source)
at org.apache.derby.impl.sql.execute.SortResultSet.loadSorter(Unknown
Source)
at org.apache.derby.impl.sql.execute.SortResultSet.openCore(Unknown
Source)
at
org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.open(Unknown Source)
at
org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source)
at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown
Source)
... 128 more
> @Stateless EJB with @Schedule method and single EntityManager/transaction
> does not perform well and holds transaction
> ---------------------------------------------------------------------------------------------------------------------
>
> Key: OPENEJB-1968
> URL: https://issues.apache.org/jira/browse/OPENEJB-1968
> Project: OpenEJB
> Issue Type: Bug
> Components: ejb31
> Affects Versions: 4.5.0
> Environment: TomEE 1.5.1
> Windows Server 2003 32bit 4GB RAM
> Reporter: Howard W. Smith, Jr.
> Labels: @Stateless, EJB, entitymanager, transaction
> Attachments: EmailStatelessBean.java, tomcat7-stderr.2012-12-12.log
>
> Original Estimate: 504h
> Remaining Estimate: 504h
>
> After implementing 'workaround' option # 1 in my previous email (below), the
> test results were really really bad. :(
> for 4 emails, it took 30 minutes to insert the data into the database, and
> then it seemed as though the single @Stateless EJB held onto the transaction,
> even after the @Schedule method, getEmails(), was done and exited.
> Should I file a JIRA? I would assume that the @Stateless bean would 'let go'
> of the transaction, but transaction remained opened. Maybe, I should have
> issued a entityManager.flush() after completing each email, but I did flush()
> a lot throughout the process.
> Please note that this machine is Windows Server 2003 32bit 4GB RAM, and it
> takes 10 to 15 minutes to insert data from 2 emails (which is a very small
> amount of data embedded in the email). I could not select any data from
> database after login. I had to shutdown TomEE.
> Also, note, when I originally developed this, one @Stateless EJB with 1
> entity manager, it took 2 seconds on Windows Server 2008 64bit 16GB RAM, and
> it did not hold the transaction (or database locks). also, i could select
> data afterwards.
> I still need to try what David mentioned, but it's been an all-nighter for
> me, so i need to stop right here for now.
> I think I will open a JIRA for this.
> On Tue, Dec 11, 2012 at 10:10 PM, Howard W. Smith, Jr.
> <[email protected]> wrote:
> Shaking my head... test results were not good at all.
> 1. @StatelessEJB EmailStatelessBean has @Schedule getEmails()
> 2. @EmailStatelessBean has multiple @EJB references to @Stateless
> (sessionfacade) classes that are the DAO classes
> 3. EmailStatelessBean gets invoked when triggered by @Schedule
> 4. EmailStatelessBean execution locks the tables, still, and locks up the
> entire app, and seems to take longer...since endusers (myself) are making
> requests against database (and web app).
> 5. Last but not least, EmailStatelessBean failed to commit the changes;
> transaction rolled back for EmailStatelessBean as well as enduser requests.
> So, my workaround options include the following:
> 1. EmailStatelessBean, when invoked by @Schedule method, will check the CDI
> @ApplicationScoped bean (ApplicationScopeBean), and see if any endusers are
> logged in; i developed a sessionInfo class that is updated everytime enduser
> does a HTTP request; if any endusers are logged in, then I can use Atmosphere
> (PrimeFaces Push) to push a message to the endusers, notifying them to
> 'please logout, as there are customer requests pending that need to be
> retrieved and inserted into the web app's database', and EmailStatelessBean
> will 'return' (or exit) and not perform the operation. This way, everytime
> @Schedule invokes the bean method, it will continue to check for an available
> time to perform the get-emails-and-insert-into-database operation. Also, I'll
> set when EmailStatelessBean begins the operation, then I'll set flag on
> @ApplicationScoped bean (insertingCustomerRequestsIntoDatabase = true); this
> flag will be checked when endusers attempt to login web app, and FacesMessage
> will be displayed, Please login a few minutes later as system is inserting
> customer requests into database.
> 2. Another option would be to send a message to all clients via Atmosphere
> (PrimeFaces Push), and the UI will be locked immediately, and user will be
> required to wait.
> Honestly, I don't like either of these approaches, but I think the endusers
> will accept the 1st option (above). If I go with 1st approach, then I may
> revert back to single transaction, which will complete the entire operation
> much faster than multiple transactions (via multiple EJB DAO classes).
> As you can see, I don't have enough experience locking database for such a
> batch operation as this. I know the endusers want the customer requests to
> show up into the database 'immediately', and they want to know when it
> happens. Right now, this is my only option until I redesign the business
> website to interface directly with the web app. right now, the web app is
> 'only' used by 'personnel' (the owners of the business...which is my family).
> hahaha :)
> They love the app (honestly, they liked the speed and reliability of the web
> app when it was on Glassfish), but I'm doing all i can to win them over with
> TomEE. :)
> Your thoughts, please.
> Thanks,
> Howard
--
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