Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git-svn-id: http://anonsvn.jboss.org/repos/weld/ri/trunk@919 1c488680-804c-0410-94cd-c6b725194a0e
- Loading branch information
Showing
7 changed files
with
176 additions
and
46 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
42 changes: 24 additions & 18 deletions
42
webbeans-ri/src/test/java/org/jboss/webbeans/test/AbstractEjbEmbeddableTest.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
51 changes: 29 additions & 22 deletions
51
webbeans-ri/src/test/java/org/jboss/webbeans/test/EnterpriseBeanTest.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 |
---|---|---|
@@ -1,32 +1,39 @@ | ||
package org.jboss.webbeans.test; | ||
|
||
import javax.ejb.EJBException; | ||
import javax.naming.InitialContext; | ||
import javax.naming.NamingException; | ||
|
||
import org.jboss.webbeans.examples.Translator; | ||
import org.testng.annotations.Test; | ||
|
||
|
||
|
||
|
||
public class EnterpriseBeanTest extends AbstractEjbEmbeddableTest | ||
{ | ||
|
||
// @Test(expectedExceptions=UnsupportedOperationException.class) | ||
// public void test() throws NamingException | ||
// { | ||
// | ||
// InitialContext ctx = new InitialContext(); | ||
// Translator translator = (Translator) ctx.lookup("SentenceTranslator/local"); | ||
// try | ||
// { | ||
// translator.translate("foo"); | ||
// } | ||
// catch (EJBException e) | ||
// { | ||
// if (e.getCausedByException() instanceof RuntimeException) | ||
// { | ||
// throw (RuntimeException) e.getCausedByException(); | ||
// } | ||
// else | ||
// { | ||
// throw new RuntimeException(e.getCausedByException()); | ||
// } | ||
// } | ||
// } | ||
@Test(expectedExceptions=UnsupportedOperationException.class) | ||
public void test() throws NamingException | ||
{ | ||
|
||
InitialContext ctx = new InitialContext(); | ||
Translator translator = (Translator) ctx.lookup("SentenceTranslator/local"); | ||
try | ||
{ | ||
translator.translate("foo"); | ||
} | ||
catch (EJBException e) | ||
{ | ||
if (e.getCausedByException() instanceof RuntimeException) | ||
{ | ||
throw (RuntimeException) e.getCausedByException(); | ||
} | ||
else | ||
{ | ||
throw new RuntimeException(e.getCausedByException()); | ||
} | ||
} | ||
} | ||
|
||
} |
12 changes: 9 additions & 3 deletions
12
webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Leopard.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 |
---|---|---|
@@ -1,11 +1,17 @@ | ||
package org.jboss.webbeans.test.beans; | ||
|
||
import javax.ejb.MessageDriven; | ||
import javax.jms.Message; | ||
import javax.webbeans.Production; | ||
|
||
@Production | ||
@MessageDriven | ||
public class Leopard | ||
//@MessageDriven | ||
public class Leopard implements javax.jms.MessageListener | ||
{ | ||
|
||
public void onMessage(Message message) | ||
{ | ||
// TODO Auto-generated method stub | ||
|
||
} | ||
|
||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> | ||
|
||
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false"> | ||
|
||
<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender"> | ||
<errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/> | ||
<param name="Target" value="System.out"/> | ||
<layout class="org.apache.log4j.PatternLayout"> | ||
<!-- The default pattern: Date Priority [Category] Message\n --> | ||
<param name="ConversionPattern" value="%-5p [%c{6}] %m%n"/> | ||
</layout> | ||
</appender> | ||
|
||
<!-- ############### Embedded EJB3 ################# --> | ||
<category name="org.jboss"> | ||
<priority value="ERROR"/> | ||
</category> | ||
<category name="com.arjuna"> | ||
<priority value="ERROR"/> | ||
</category> | ||
|
||
<!-- ############### Hibernate logging ################# --> | ||
|
||
<category name="org.hibernate"> | ||
<priority value="ERROR"/> | ||
</category> | ||
|
||
<!-- | ||
<category name="org.hibernate.SQL"> | ||
<priority value="TRACE"/> | ||
</category> | ||
<category name="org.hibernate.type"> | ||
<priority value="TRACE"/> | ||
</category> | ||
<category name="org.hibernate.loader"> | ||
<priority value="TRACE"/> | ||
</category> | ||
<category name="org.hibernate.cache"> | ||
<priority value="TRACE"/> | ||
</category> | ||
--> | ||
|
||
<!-- ############### Web Beans logging ################### --> | ||
|
||
<category name="org.jboss.webbeans"> | ||
<priority value="WARN"/> | ||
</category> | ||
|
||
<root> | ||
<priority value="INFO"/> | ||
<appender-ref ref="CONSOLE"/> | ||
</root> | ||
|
||
</log4j:configuration> |