Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WFLY-3989 Setup the right TCCL during endpoint instance creation as well as view instance creation #6852

Merged
merged 1 commit into from Oct 22, 2014

Conversation

jaikiran
Copy link
Contributor

https://issues.jboss.org/browse/WFLY-3989 describes the issue where the TCCL isn't set to the application's classloader when the MDB object instantiation is being done. As noted in an old (related) discussion http://lists.jboss.org/pipermail/jboss-as7-dev/2011-July/003339.html the user application code is expected to have the correct TCCL (which in this case should be the application's deployment classloader).

This commit fixes the issue by using the right TCCL during the endpoint instantiation as well as the component view instance creation (which in case of MDBs can lead to the MDB implementation object instantiation). The commit also updates the MDBTestCase to verify these changes.

P.S: This needs review from the EE team as well as JCA team. Specifically, the TCCL switch during the view instance creation in ViewService. Although the change fixes this issue and does seem logical, I haven't been in this code for a long time now and I'm not fully sure of its impact.

@wildfly-ci
Copy link

Windows Build 406 is now running using a merge of 10ae59c

@wildfly-ci
Copy link

Linux Build 5299 is now running using a merge of 10ae59c

@wildfly-ci
Copy link

Linux with security manager Build 291 is now running using a merge of 10ae59c

@wildfly-ci
Copy link

Linux with security manager Build 291 outcome was FAILURE using a merge of 10ae59c
Summary: Tests failed: 2 (2 new), passed: 792, ignored: 244 Build time: 0:06:22

Build problems:

Failed tests detected

Failed tests

org.jboss.as.test.smoke.jms.SendToTopicFromWithinTransactionTest.sendSuccessfully: java.lang.AssertionError: null
    at org.junit.Assert.fail(Assert.java:86)
    at org.junit.Assert.assertTrue(Assert.java:41)

org.jboss.as.test.smoke.jms.SendToQueueFromWithinTransactionTest.sendSuccessfully: java.lang.AssertionError: null
    at org.junit.Assert.fail(Assert.java:86)
    at org.junit.Assert.assertTrue(Assert.java:41)

@wildfly-ci
Copy link

Windows Build 406 outcome was FAILURE using a merge of 10ae59c
Summary: Tests failed: 5 (5 new), passed: 3019, ignored: 238 Build time: 0:55:43

Build problems:

Failed tests detected

Failed tests

org.jboss.as.test.integration.ejb.mdb.MDBTestCase.testSuspendResumeWithMDB: java.lang.AssertionError: Reply message was null on reply queue: HornetQQueue[mdbtest/replyQueue]
    at org.junit.Assert.fail(Assert.java:88)
    at org.junit.Assert.assertTrue(Assert.java:41)

org.jboss.as.test.integration.ejb.mdb.MDBTestCase.testDDBasedMDB: java.lang.AssertionError: Reply message was null on reply queue: HornetQQueue[mdbtest/replyQueue]
    at org.junit.Assert.fail(Assert.java:88)
    at org.junit.Assert.assertTrue(Assert.java:41)

org.jboss.as.test.integration.batch.chunk.ChunkPartitionTestCase.chunks: java.io.IOException: java.util.concurrent.ExecutionException: java.io.IOException: HTTP Status 500 Response: <html><head><title>ERROR</title><style>body {
    font-family: "Lucida Grande", "Lucida Sans Unicode", "Trebuchet MS", Helvetica, Arial, Verdana, sans-serif;
    margin: 5px;

org.jboss.as.test.integration.batch.flow.FlowTestCase.flow: java.io.IOException: java.util.concurrent.ExecutionException: java.io.IOException: HTTP Status 500 Response: <html><head><title>ERROR</title><style>body {
    font-family: "Lucida Grande", "Lucida Sans Unicode", "Trebuchet MS", Helvetica, Arial, Verdana, sans-serif;
    margin: 5px;

org.jboss.as.test.compat.jpa.hibernate.persistencebootstrap.PersistenceBootstrapTestCase.testSimpleCreateAndLoadEntities: javax.naming.NameNotFoundException: PersistenceBootstrapTestCase_test/beans/SFSB1!org.jboss.as.test.compat.jpa.hibernate.persistencebootstrap.SFSB1
    at org.jboss.as.ee.component.ViewManagedReferenceFactory.getReference(ViewManagedReferenceFactory.java:58)
    at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:143)

@wildfly-ci
Copy link

Linux Build 5299 outcome was FAILURE using a merge of 10ae59c
Summary: Tests failed: 5 (5 new), passed: 3019, ignored: 238 Build time: 0:59:07

Build problems:

Failed tests detected

Failed tests

org.jboss.as.test.integration.ejb.mdb.MDBTestCase.testSuspendResumeWithMDB: java.lang.AssertionError: Reply message was null on reply queue: HornetQQueue[mdbtest/replyQueue]
    at org.junit.Assert.fail(Assert.java:88)
    at org.junit.Assert.assertTrue(Assert.java:41)

org.jboss.as.test.integration.ejb.mdb.MDBTestCase.testDDBasedMDB: java.lang.AssertionError: Reply message was null on reply queue: HornetQQueue[mdbtest/replyQueue]
    at org.junit.Assert.fail(Assert.java:88)
    at org.junit.Assert.assertTrue(Assert.java:41)

org.jboss.as.test.integration.batch.chunk.ChunkPartitionTestCase.chunks: java.io.IOException: java.util.concurrent.ExecutionException: java.io.IOException: HTTP Status 500 Response: <html><head><title>ERROR</title><style>body {
    font-family: "Lucida Grande", "Lucida Sans Unicode", "Trebuchet MS", Helvetica, Arial, Verdana, sans-serif;
    margin: 5px;

org.jboss.as.test.integration.batch.flow.FlowTestCase.flow: java.io.IOException: java.util.concurrent.ExecutionException: java.io.IOException: HTTP Status 500 Response: <html><head><title>ERROR</title><style>body {
    font-family: "Lucida Grande", "Lucida Sans Unicode", "Trebuchet MS", Helvetica, Arial, Verdana, sans-serif;
    margin: 5px;

org.jboss.as.test.compat.jpa.hibernate.persistencebootstrap.PersistenceBootstrapTestCase.testSimpleCreateAndLoadEntities: javax.naming.NameNotFoundException: PersistenceBootstrapTestCase_test/beans/SFSB1!org.jboss.as.test.compat.jpa.hibernate.persistencebootstrap.SFSB1
    at org.jboss.as.ee.component.ViewManagedReferenceFactory.getReference(ViewManagedReferenceFactory.java:58)
    at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:143)

@jaikiran
Copy link
Contributor Author

Genuine failures due to a typo in the code. Fixing now.

@jaikiran
Copy link
Contributor Author

Typo fixed.

retest this please

@wildfly-ci
Copy link

Linux with security manager Build 292 is now running using a merge of aa14566

@wildfly-ci
Copy link

Windows Build 407 is now running using a merge of aa14566

@wildfly-ci
Copy link

Linux Build 5300 is now running using a merge of aa14566

@wildfly-ci
Copy link

Linux with security manager Build 292 outcome was FAILURE using a merge of aa14566
Summary: Tests failed: 2, passed: 792, ignored: 244 Build time: 0:06:21

Build problems:

Failed tests detected

Failed tests

org.jboss.as.test.smoke.jms.SendToTopicFromWithinTransactionTest.sendSuccessfully: java.lang.AssertionError: null
    at org.junit.Assert.fail(Assert.java:86)
    at org.junit.Assert.assertTrue(Assert.java:41)

org.jboss.as.test.smoke.jms.SendToQueueFromWithinTransactionTest.sendSuccessfully: java.lang.AssertionError: null
    at org.junit.Assert.fail(Assert.java:86)
    at org.junit.Assert.assertTrue(Assert.java:41)

@wildfly-ci
Copy link

Windows Build 407 outcome was SUCCESS using a merge of aa14566
Summary: Tests passed: 3024, ignored: 238 Build time: 0:54:25

@wildfly-ci
Copy link

Linux Build 5300 outcome was SUCCESS using a merge of aa14566
Summary: Tests passed: 3023, ignored: 238, muted: 1 Build time: 0:56:43

bstansberry added a commit that referenced this pull request Oct 22, 2014
WFLY-3989 Setup the right TCCL during endpoint instance creation as well as view instance creation
@bstansberry bstansberry merged commit a357381 into wildfly:master Oct 22, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-merge Only for use by those with merge permissions!
Projects
None yet
4 participants