Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
189 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
...c/test/java/org/jboss/weld/tests/enterprise/proxyability/EnterpriseBeanLifecycleTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package org.jboss.weld.tests.enterprise.proxyability; | ||
|
||
import org.jboss.testharness.impl.packaging.Artifact; | ||
import org.jboss.testharness.impl.packaging.IntegrationTest; | ||
import org.jboss.testharness.impl.packaging.Packaging; | ||
import org.jboss.testharness.impl.packaging.PackagingType; | ||
import org.jboss.weld.test.AbstractWeldTest; | ||
import org.testng.annotations.Test; | ||
|
||
@Artifact | ||
@Packaging(PackagingType.EAR) | ||
@IntegrationTest | ||
public class EnterpriseBeanLifecycleTest extends AbstractWeldTest | ||
{ | ||
|
||
@Test(description="WELD-290") | ||
public void testSLSBInjectedIntoPassivatingManagedBean() | ||
{ | ||
SimpleBean bean = getCurrentManager().getInstanceByType(SimpleBean.class); | ||
assert bean.getMessage().equals("This is my message from my stateless bean"); | ||
|
||
} | ||
|
||
} |
18 changes: 18 additions & 0 deletions
18
tests/src/test/java/org/jboss/weld/tests/enterprise/proxyability/MyStatelessBean.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package org.jboss.weld.tests.enterprise.proxyability; | ||
|
||
import java.io.Serializable; | ||
|
||
import javax.ejb.Stateless; | ||
|
||
/** | ||
* Session Bean implementation class MyStatelessBean | ||
*/ | ||
@Stateless | ||
public class MyStatelessBean implements MyStatelessBeanLocal, Serializable | ||
{ | ||
|
||
public String getText() | ||
{ | ||
return "This is my message from my stateless bean"; | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
tests/src/test/java/org/jboss/weld/tests/enterprise/proxyability/MyStatelessBeanLocal.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package org.jboss.weld.tests.enterprise.proxyability; | ||
|
||
import javax.ejb.Local; | ||
|
||
@Local | ||
public interface MyStatelessBeanLocal | ||
{ | ||
|
||
String getText(); | ||
} |
20 changes: 20 additions & 0 deletions
20
tests/src/test/java/org/jboss/weld/tests/enterprise/proxyability/SimpleBean.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package org.jboss.weld.tests.enterprise.proxyability; | ||
|
||
import java.io.Serializable; | ||
|
||
import javax.enterprise.context.SessionScoped; | ||
import javax.inject.Inject; | ||
|
||
@SessionScoped | ||
public class SimpleBean implements Serializable | ||
{ | ||
|
||
@Inject | ||
private MyStatelessBeanLocal myStatelessBean; | ||
|
||
public String getMessage() | ||
{ | ||
return myStatelessBean.getText(); | ||
} | ||
|
||
} |