[JBoss JIRA] (AS7-5022) Server sometimes crashes during reload operation
by Thomas Diesler (JIRA)
[ https://issues.jboss.org/browse/AS7-5022?page=com.atlassian.jira.plugin.s... ]
Thomas Diesler resolved AS7-5022.
---------------------------------
Fix Version/s: (was: 7.2.0.Alpha1)
(was: 7.1.3.Final (EAP))
Resolution: Duplicate Issue
Duplicates AS7-4746
> Server sometimes crashes during reload operation
> ------------------------------------------------
>
> Key: AS7-5022
> URL: https://issues.jboss.org/browse/AS7-5022
> Project: Application Server 7
> Issue Type: Bug
> Components: OSGi
> Affects Versions: 7.1.2.Final (EAP)
> Reporter: Jan Martiska
> Assignee: Thomas Diesler
> Priority: Critical
>
> After some number of server reloads, next reload fails.. the number seems random, for me it is between 6 and 150.
> this error message pops up during boot:
> {noformat}
> 15:21:05,036 ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 53) JBAS014612: Operation ("add") failed - address: ([("subsystem" => "osgi")]): org.jboss.msc.service.DuplicateServiceException: Service jbosgi.integration.PersistentBundlesHandler is already registered
> {noformat}
> This shell script can be used for reproduction:
> {noformat}
> #!/bin/sh
> $JBOSS_HOME/bin/standalone.sh > /dev/null &
> sleep 10
> for i in `seq 1 150`; do
> echo $i
> $JBOSS_HOME/bin/jboss-cli.sh -c --command=:reload
> sleep 4
> tail --lines=50 $JBOSS_HOME/standalone/log/server.log | grep ERROR
> done
> {noformat}
> Testing environment> RHEL 5 or 6. This happens both when reloading using jboss-cli.sh and jboss-as-controller-client. It seems it has never happened to me when EAP was running in IPv6 mode (java.net.preferIPv4Stack=false), only IPv4. Affects all standalone profiles. It randomly breaks my admin console testsuite, which uses server reloads quite a lot.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 10 months
[JBoss JIRA] (AS7-4552) JBoss AS 7 produces non-transactional (autocommit) EntityManager within transactional EJB methods when using 3rd party javax.sql.DataSource via @DataSourceDefinition
by Craig Ringer (JIRA)
Craig Ringer created AS7-4552:
---------------------------------
Summary: JBoss AS 7 produces non-transactional (autocommit) EntityManager within transactional EJB methods when using 3rd party javax.sql.DataSource via @DataSourceDefinition
Key: AS7-4552
URL: https://issues.jboss.org/browse/AS7-4552
Project: Application Server 7
Issue Type: Bug
Components: EJB, JPA / Hibernate, Transactions
Affects Versions: 7.1.1.Final
Environment: java version "1.7.0_01"
Java(TM) SE Runtime Environment (build 1.7.0_01-b08)
Java HotSpot(TM) 64-Bit Server VM (build 21.1-b02, mixed mode)
Linux ayaki.localdomain 3.3.0-4.fc16.x86_64 #1 SMP Tue Mar 20 18:05:40 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
Reporter: Craig Ringer
Assignee: jaikiran pai
When using a javax.sql.DataSource via @DataSourceDefinition to create the JTA datasource for a persistence unit, transactional EJB business methods run without transactions. No warning or error is emitted.
Business method calls annotated @TransactionAttribute(TransactionAttributeType.REQUIRED) receive an EntityManager that *is in autocommit mode*, ie is *not* in a transaction.
This violates the EJB3 spec and is a nasty problem.
I discovered this when testing some code that uses deferred constraints to create two interdependent database objects; record A must have at least one record B referencing it, but record B also has a foreign key reference to record A. This can be satisfied only with deferred constraints, and works fine in SQL-level testing. When testing with Arquillian at the JBoss AS 7 / Hibernate / JPA level, though, it was breaking.
Further investigation showed that the entity manager was in autocommit despite the method being transactional, as demonstrated by a test that tries to create and fetch from a cursor.
The attached self-contained test case demonstrates this issue. I'll be working on testing the issue against H2 or Derby next, but wanted to get this report in here first.
Even if this proves to be an issue with PostgreSQL's javax.sql.DataSource implementation, JBoss AS 7 clearly has some validation and checking to do because it *must* not allow an autocommit entity manager to be injected for transactional business methods.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 10 months