[webbeans-commits] Webbeans SVN: r2238 - in examples/trunk/tomcat: WebContent/WEB-INF and 1 other directory.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-03-27 16:15:58 -0400 (Fri, 27 Mar 2009)
New Revision: 2238
Modified:
examples/trunk/tomcat/
examples/trunk/tomcat/WebContent/WEB-INF/web.xml
examples/trunk/tomcat/build.xml
examples/trunk/tomcat/pom.xml
Log:
tomcat example
Property changes on: examples/trunk/tomcat
___________________________________________________________________
Name: svn:ignore
+ .classpath
.project
target
.settings
Modified: examples/trunk/tomcat/WebContent/WEB-INF/web.xml
===================================================================
--- examples/trunk/tomcat/WebContent/WEB-INF/web.xml 2009-03-27 19:25:32 UTC (rev 2237)
+++ examples/trunk/tomcat/WebContent/WEB-INF/web.xml 2009-03-27 20:15:58 UTC (rev 2238)
@@ -28,5 +28,9 @@
<session-config>
<session-timeout>10</session-timeout>
</session-config>
+
+ <listener>
+ <listener-class>org.jboss.webbeans.environment.tomcat.Listener</listener-class>
+ </listener>
</web-app>
Modified: examples/trunk/tomcat/build.xml
===================================================================
--- examples/trunk/tomcat/build.xml 2009-03-27 19:25:32 UTC (rev 2237)
+++ examples/trunk/tomcat/build.xml 2009-03-27 20:15:58 UTC (rev 2238)
@@ -1,7 +1,7 @@
-<project basedir="." name="Numberguess Example Build" default="restart">
+<project basedir="." name="Numberguess Example Build" default="tomcat.restart">
<property name="example.name" value="webbeans-numberguess" />
<import file="../build.xml" />
-</project>
\ No newline at end of file
+</project>
Modified: examples/trunk/tomcat/pom.xml
===================================================================
--- examples/trunk/tomcat/pom.xml 2009-03-27 19:25:32 UTC (rev 2237)
+++ examples/trunk/tomcat/pom.xml 2009-03-27 20:15:58 UTC (rev 2238)
@@ -9,7 +9,7 @@
</parent>
<groupId>org.jboss.webbeans.examples</groupId>
- <artifactId>webbeans-numberguess</artifactId>
+ <artifactId>webbeans-numberguess-tomcat</artifactId>
<packaging>war</packaging>
<name>Web Beans Examples: Numberguess</name>
@@ -40,15 +40,27 @@
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-api</artifactId>
- <scope>provided</scope>
+ <scope>runtime</scope>
</dependency>
<dependency>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-impl</artifactId>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
<groupId>com.sun.facelets</groupId>
<artifactId>jsf-facelets</artifactId>
<scope>runtime</scope>
</dependency>
+ <dependency>
+ <groupId>org.jboss.webbeans.tomcat</groupId>
+ <artifactId>webbeans-tomcat</artifactId>
+ <scope>runtime</scope>
+ </dependency>
+
<!-- <dependency>
<groupId>org.jboss.el</groupId>
<artifactId>jboss-el</artifactId>
@@ -69,11 +81,12 @@
<artifactId>el-api</artifactId>
</exclusion>
</exclusions>
+ <scope>runtime</scope>
</dependency>
+
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>jsr250-api</artifactId>
- <scope>provided</scope>
</dependency>
</dependencies>
15 years, 9 months
[webbeans-commits] Webbeans SVN: r2237 - in examples/trunk: tomcat and 11 other directories.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-03-27 15:25:32 -0400 (Fri, 27 Mar 2009)
New Revision: 2237
Added:
examples/trunk/tomcat/
examples/trunk/tomcat/WebContent/
examples/trunk/tomcat/WebContent/WEB-INF/
examples/trunk/tomcat/WebContent/WEB-INF/beans.xml
examples/trunk/tomcat/WebContent/WEB-INF/faces-config.xml
examples/trunk/tomcat/WebContent/WEB-INF/web.xml
examples/trunk/tomcat/WebContent/home.xhtml
examples/trunk/tomcat/WebContent/index.html
examples/trunk/tomcat/WebContent/style/
examples/trunk/tomcat/WebContent/template.xhtml
examples/trunk/tomcat/build.xml
examples/trunk/tomcat/pom.xml
examples/trunk/tomcat/src/
examples/trunk/tomcat/src/main/
examples/trunk/tomcat/src/main/java/
examples/trunk/tomcat/src/main/java/org/
examples/trunk/tomcat/src/main/java/org/jboss/
examples/trunk/tomcat/src/main/java/org/jboss/webbeans/
examples/trunk/tomcat/src/main/java/org/jboss/webbeans/examples/
examples/trunk/tomcat/src/main/java/org/jboss/webbeans/examples/numberguess/
examples/trunk/tomcat/src/main/java/org/jboss/webbeans/examples/numberguess/Game.java
examples/trunk/tomcat/src/main/java/org/jboss/webbeans/examples/numberguess/Generator.java
examples/trunk/tomcat/src/main/java/org/jboss/webbeans/examples/numberguess/MaxNumber.java
examples/trunk/tomcat/src/main/java/org/jboss/webbeans/examples/numberguess/Random.java
examples/trunk/tomcat/src/main/resources/
examples/trunk/tomcat/src/main/resources/META-INF/
Log:
copy numberguess examaple for tomcat
Added: examples/trunk/tomcat/WebContent/WEB-INF/beans.xml
===================================================================
Added: examples/trunk/tomcat/WebContent/WEB-INF/faces-config.xml
===================================================================
--- examples/trunk/tomcat/WebContent/WEB-INF/faces-config.xml (rev 0)
+++ examples/trunk/tomcat/WebContent/WEB-INF/faces-config.xml 2009-03-27 19:25:32 UTC (rev 2237)
@@ -0,0 +1,11 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<faces-config version="1.2"
+ xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
+
+ <application>
+ <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
+ </application>
+
+</faces-config>
Added: examples/trunk/tomcat/WebContent/WEB-INF/web.xml
===================================================================
--- examples/trunk/tomcat/WebContent/WEB-INF/web.xml (rev 0)
+++ examples/trunk/tomcat/WebContent/WEB-INF/web.xml 2009-03-27 19:25:32 UTC (rev 2237)
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app version="2.5"
+ xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <display-name>Web Beans Numberguess example</display-name>
+
+ <!-- JSF -->
+
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.jsf</url-pattern>
+ </servlet-mapping>
+
+ <context-param>
+ <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
+ <param-value>.xhtml</param-value>
+ </context-param>
+
+ <session-config>
+ <session-timeout>10</session-timeout>
+ </session-config>
+
+</web-app>
Added: examples/trunk/tomcat/WebContent/home.xhtml
===================================================================
--- examples/trunk/tomcat/WebContent/home.xhtml (rev 0)
+++ examples/trunk/tomcat/WebContent/home.xhtml 2009-03-27 19:25:32 UTC (rev 2237)
@@ -0,0 +1,34 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core">
+
+ <ui:composition template="template.xhtml">
+ <ui:define name="content">
+ <h1>Guess a number...</h1>
+ <h:form id="NumberGuessMain">
+ <div style="color: red">
+ <h:messages id="messages" globalOnly="false"/>
+ <h:outputText id="Higher" value="Higher!" rendered="#{game.number gt game.guess and game.guess ne 0}"/>
+ <h:outputText id="Lower" value="Lower!" rendered="#{game.number lt game.guess and game.guess ne 0}"/>
+ </div>
+
+ <div>
+ I'm thinking of a number between #{game.smallest} and #{game.biggest}. You have #{game.remainingGuesses} guesses.
+ </div>
+
+ <div>
+ Your guess:
+ <h:inputText id="inputGuess" value="#{game.guess}" required="true" size="3" disabled="#{game.number eq game.guess}">
+ <f:validateLongRange maximum="#{game.biggest}" minimum="#{game.smallest}"/>
+ </h:inputText>
+ <h:commandButton id="GuessButton" value="Guess" action="#{game.check}" disabled="#{game.number eq game.guess}"/>
+ </div>
+ <div>
+ <h:commandButton id="RestartButton" value="Reset" action="#{game.reset}" immediate="true" />
+ </div>
+ </h:form>
+ </ui:define>
+ </ui:composition>
+</html>
Added: examples/trunk/tomcat/WebContent/index.html
===================================================================
--- examples/trunk/tomcat/WebContent/index.html (rev 0)
+++ examples/trunk/tomcat/WebContent/index.html 2009-03-27 19:25:32 UTC (rev 2237)
@@ -0,0 +1,5 @@
+<html>
+<head>
+ <meta http-equiv="Refresh" content="0; URL=home.jsf">
+</head>
+</html>
\ No newline at end of file
Added: examples/trunk/tomcat/WebContent/template.xhtml
===================================================================
--- examples/trunk/tomcat/WebContent/template.xhtml (rev 0)
+++ examples/trunk/tomcat/WebContent/template.xhtml 2009-03-27 19:25:32 UTC (rev 2237)
@@ -0,0 +1,34 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core">
+
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <title>Numberguess</title>
+ <link href="style/main.css" rel="stylesheet" type="text/css"/>
+ <ui:insert name="head"/>
+</head>
+
+<body>
+
+ <div id="container">
+ <div id="header">
+
+ </div>
+
+ <div id="sidebar">
+
+ </div>
+
+ <div id="content">
+ <ui:insert name="content"/>
+ </div>
+
+ <br style="clear:both"/>
+ </div>
+
+</body>
+</html>
+
Added: examples/trunk/tomcat/build.xml
===================================================================
--- examples/trunk/tomcat/build.xml (rev 0)
+++ examples/trunk/tomcat/build.xml 2009-03-27 19:25:32 UTC (rev 2237)
@@ -0,0 +1,7 @@
+<project basedir="." name="Numberguess Example Build" default="restart">
+
+ <property name="example.name" value="webbeans-numberguess" />
+
+ <import file="../build.xml" />
+
+</project>
\ No newline at end of file
Added: examples/trunk/tomcat/pom.xml
===================================================================
--- examples/trunk/tomcat/pom.xml (rev 0)
+++ examples/trunk/tomcat/pom.xml 2009-03-27 19:25:32 UTC (rev 2237)
@@ -0,0 +1,86 @@
+<?xml version="1.0"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.jboss.webbeans.examples</groupId>
+ <artifactId>parent</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ </parent>
+
+ <groupId>org.jboss.webbeans.examples</groupId>
+ <artifactId>webbeans-numberguess</artifactId>
+ <packaging>war</packaging>
+ <name>Web Beans Examples: Numberguess</name>
+
+ <pluginRepositories>
+ <pluginRepository>
+ <id>codehaus snapshot repository</id>
+ <url>http://snapshots.repository.codehaus.org/</url>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </pluginRepository>
+ </pluginRepositories>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <scope>test</scope>
+ <classifier>jdk15</classifier>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.webbeans</groupId>
+ <artifactId>jsr299-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>com.sun.facelets</groupId>
+ <artifactId>jsf-facelets</artifactId>
+ <scope>runtime</scope>
+ </dependency>
+
+ <!-- <dependency>
+ <groupId>org.jboss.el</groupId>
+ <artifactId>jboss-el</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>javax.el</groupId>
+ <artifactId>el-api</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>-->
+
+ <dependency>
+ <groupId>javax.el</groupId>
+ <artifactId>el-ri</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>javax.el</groupId>
+ <artifactId>el-api</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>javax.annotation</groupId>
+ <artifactId>jsr250-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <finalName>webbeans-numberguess</finalName>
+ </build>
+
+</project>
+
Added: examples/trunk/tomcat/src/main/java/org/jboss/webbeans/examples/numberguess/Game.java
===================================================================
--- examples/trunk/tomcat/src/main/java/org/jboss/webbeans/examples/numberguess/Game.java (rev 0)
+++ examples/trunk/tomcat/src/main/java/org/jboss/webbeans/examples/numberguess/Game.java 2009-03-27 19:25:32 UTC (rev 2237)
@@ -0,0 +1,94 @@
+package org.jboss.webbeans.examples.numberguess;
+
+
+import java.io.Serializable;
+
+import javax.annotation.Named;
+import javax.annotation.PostConstruct;
+import javax.context.SessionScoped;
+import javax.faces.application.FacesMessage;
+import javax.faces.context.FacesContext;
+import javax.inject.AnnotationLiteral;
+import javax.inject.Current;
+import javax.inject.manager.Manager;
+
+@Named
+@SessionScoped
+public class Game implements Serializable
+{
+ private int number;
+
+ private int guess;
+ private int smallest;
+
+ @MaxNumber
+ private int maxNumber;
+
+ private int biggest;
+ private int remainingGuesses;
+
+ @Current Manager manager;
+
+ public Game()
+ {
+ }
+
+ public int getNumber()
+ {
+ return number;
+ }
+
+ public int getGuess()
+ {
+ return guess;
+ }
+
+ public void setGuess(int guess)
+ {
+ this.guess = guess;
+ }
+
+ public int getSmallest()
+ {
+ return smallest;
+ }
+
+ public int getBiggest()
+ {
+ return biggest;
+ }
+
+ public int getRemainingGuesses()
+ {
+ return remainingGuesses;
+ }
+
+ public String check() throws InterruptedException
+ {
+ if (guess>number)
+ {
+ biggest = guess - 1;
+ }
+ if (guess<number)
+ {
+ smallest = guess + 1;
+ }
+ if (guess == number)
+ {
+ FacesContext.getCurrentInstance().addMessage(null, new FacesMessage("Correct!"));
+ }
+ remainingGuesses--;
+ return null;
+ }
+
+ @PostConstruct
+ public void reset()
+ {
+ this.smallest = 0;
+ this.guess = 0;
+ this.remainingGuesses = 10;
+ this.biggest = maxNumber;
+ this.number = manager.getInstanceByType(Integer.class, new AnnotationLiteral<Random>(){});
+ }
+
+}
Added: examples/trunk/tomcat/src/main/java/org/jboss/webbeans/examples/numberguess/Generator.java
===================================================================
--- examples/trunk/tomcat/src/main/java/org/jboss/webbeans/examples/numberguess/Generator.java (rev 0)
+++ examples/trunk/tomcat/src/main/java/org/jboss/webbeans/examples/numberguess/Generator.java 2009-03-27 19:25:32 UTC (rev 2237)
@@ -0,0 +1,33 @@
+package org.jboss.webbeans.examples.numberguess;
+
+
+import java.io.Serializable;
+
+import javax.context.ApplicationScoped;
+import javax.inject.Produces;
+
+@ApplicationScoped
+public class Generator implements Serializable
+{
+
+ private static final long serialVersionUID = -7213673465118041882L;
+
+ private java.util.Random random = new java.util.Random( System.currentTimeMillis() );
+
+ private int maxNumber = 100;
+
+ java.util.Random getRandom()
+ {
+ return random;
+ }
+
+ @Produces @Random int next() {
+ return getRandom().nextInt(maxNumber);
+ }
+
+ @Produces @MaxNumber int getMaxNumber()
+ {
+ return maxNumber;
+ }
+
+}
Added: examples/trunk/tomcat/src/main/java/org/jboss/webbeans/examples/numberguess/MaxNumber.java
===================================================================
--- examples/trunk/tomcat/src/main/java/org/jboss/webbeans/examples/numberguess/MaxNumber.java (rev 0)
+++ examples/trunk/tomcat/src/main/java/org/jboss/webbeans/examples/numberguess/MaxNumber.java 2009-03-27 19:25:32 UTC (rev 2237)
@@ -0,0 +1,23 @@
+package org.jboss.webbeans.examples.numberguess;
+
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.BindingType;
+
+@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+@BindingType
+public @interface MaxNumber
+{
+
+}
Added: examples/trunk/tomcat/src/main/java/org/jboss/webbeans/examples/numberguess/Random.java
===================================================================
--- examples/trunk/tomcat/src/main/java/org/jboss/webbeans/examples/numberguess/Random.java (rev 0)
+++ examples/trunk/tomcat/src/main/java/org/jboss/webbeans/examples/numberguess/Random.java 2009-03-27 19:25:32 UTC (rev 2237)
@@ -0,0 +1,23 @@
+package org.jboss.webbeans.examples.numberguess;
+
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.BindingType;
+
+@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+@BindingType
+public @interface Random
+{
+
+}
15 years, 9 months
[webbeans-commits] Webbeans SVN: r2236 - in extensions/trunk/tomcat/int: src/main/java/org/jboss/webbeans/environment/tomcat and 1 other directories.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-03-27 15:09:31 -0400 (Fri, 27 Mar 2009)
New Revision: 2236
Added:
extensions/trunk/tomcat/int/src/main/java/org/jboss/webbeans/environment/tomcat/Listener.java
Removed:
extensions/trunk/tomcat/int/src/main/java/org/jboss/webbeans/environment/tomcat/ServletListener.java
Modified:
extensions/trunk/tomcat/int/pom.xml
extensions/trunk/tomcat/int/src/main/java/org/jboss/webbeans/environment/tomcat/discovery/TomcatWebBeanDiscovery.java
Log:
fixes
Modified: extensions/trunk/tomcat/int/pom.xml
===================================================================
--- extensions/trunk/tomcat/int/pom.xml 2009-03-27 18:16:09 UTC (rev 2235)
+++ extensions/trunk/tomcat/int/pom.xml 2009-03-27 19:09:31 UTC (rev 2236)
@@ -1,53 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <parent>
- <artifactId>webbeans-tomcat</artifactId>
- <groupId>org.jboss.webbeans.tomcat</groupId>
- <version>1.0.0-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.jboss.webbeans.tomcat</groupId>
- <artifactId>webbeans-tomcat-int</artifactId>
- <version>1.0.0-SNAPSHOT</version>
- <packaging>jar</packaging>
- <name>Web Beans Tomcat Integration</name>
- <url>http://www.seamframework.org/WebBeans</url>
- <build>
- <plugins>
- </plugins>
- </build>
+ <parent>
+ <artifactId>webbeans-tomcat</artifactId>
+ <groupId>org.jboss.webbeans.tomcat</groupId>
+ <version>1.0.0-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.jboss.webbeans.tomcat</groupId>
+ <artifactId>webbeans-tomcat-int</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>jar</packaging>
+ <name>Web Beans Tomcat Integration</name>
+ <url>http://www.seamframework.org/WebBeans</url>
- <dependencies>
- <dependency>
- <groupId>org.testng</groupId>
- <artifactId>testng</artifactId>
- <scope>test</scope>
- <classifier>jdk15</classifier>
- <exclusions>
- <exclusion>
- <artifactId>junit</artifactId>
- <groupId>junit</groupId>
- </exclusion>
- </exclusions>
- </dependency>
+ <dependencies>
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <scope>test</scope>
+ <classifier>jdk15</classifier>
+ <exclusions>
+ <exclusion>
+ <artifactId>junit</artifactId>
+ <groupId>junit</groupId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.webbeans</groupId>
+ <artifactId>webbeans-spi</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ </dependencies>
- <dependency>
- <groupId>org.jboss.webbeans</groupId>
- <artifactId>webbeans-spi</artifactId>
- </dependency>
-
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <scope>provided</scope>
- </dependency>
-
- <!-- TODO remove this dependency -->
- <dependency>
- <groupId>org.jboss.webbeans</groupId>
- <artifactId>webbeans-core</artifactId>
- </dependency>
-
- </dependencies>
-
</project>
Copied: extensions/trunk/tomcat/int/src/main/java/org/jboss/webbeans/environment/tomcat/Listener.java (from rev 2178, extensions/trunk/tomcat/int/src/main/java/org/jboss/webbeans/environment/tomcat/ServletListener.java)
===================================================================
--- extensions/trunk/tomcat/int/src/main/java/org/jboss/webbeans/environment/tomcat/Listener.java (rev 0)
+++ extensions/trunk/tomcat/int/src/main/java/org/jboss/webbeans/environment/tomcat/Listener.java 2009-03-27 19:09:31 UTC (rev 2236)
@@ -0,0 +1,91 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.environment.tomcat;
+
+import javax.servlet.ServletContextEvent;
+
+import org.jboss.webbeans.bootstrap.api.Bootstrap;
+import org.jboss.webbeans.bootstrap.api.Environments;
+import org.jboss.webbeans.bootstrap.spi.WebBeanDiscovery;
+import org.jboss.webbeans.context.api.BeanStore;
+import org.jboss.webbeans.context.api.helpers.ConcurrentHashMapBeanStore;
+import org.jboss.webbeans.environment.tomcat.discovery.TomcatWebBeanDiscovery;
+import org.jboss.webbeans.environment.tomcat.resources.ReadOnlyNamingContext;
+import org.jboss.webbeans.environment.tomcat.util.Reflections;
+import org.jboss.webbeans.resources.spi.NamingContext;
+import org.jboss.webbeans.servlet.api.ServletListener;
+import org.jboss.webbeans.servlet.api.helpers.ForwardingServletListener;
+
+/**
+ * @author Pete Muir
+ */
+public class Listener extends ForwardingServletListener
+{
+
+ private static final String BOOTSTRAP_IMPL_CLASS_NAME = "org.jboss.webbeans.bootstrap.WebBeansBootstrap";
+ private static final String WEB_BEANS_LISTENER_CLASS_NAME = "org.jboss.webbeans.servlet.WebBeansListener";
+ private static final String APPLICATION_BEAN_STORE_ATTRIBUTE_NAME = Listener.class.getName() + ".applicationBeanStore";
+
+ private final transient Bootstrap bootstrap;
+ private final transient ServletListener webBeansListener;
+
+ public Listener()
+ {
+ try
+ {
+ bootstrap = Reflections.newInstance(BOOTSTRAP_IMPL_CLASS_NAME, Bootstrap.class);
+ }
+ catch (Exception e)
+ {
+ throw new IllegalStateException("Error loading Web Beans bootstrap, check that Web Beans is on the classpath", e);
+ }
+ try
+ {
+ webBeansListener = Reflections.newInstance(WEB_BEANS_LISTENER_CLASS_NAME, ServletListener.class);
+ }
+ catch (Exception e)
+ {
+ throw new IllegalStateException("Error loading Web Beans listener, check that Web Beans is on the classpath", e);
+ }
+ }
+
+ public void contextDestroyed(ServletContextEvent sce)
+ {
+ bootstrap.shutdown();
+ super.contextDestroyed(sce);
+ }
+
+ public void contextInitialized(ServletContextEvent sce)
+ {
+ BeanStore applicationBeanStore = new ConcurrentHashMapBeanStore();
+ sce.getServletContext().setAttribute(APPLICATION_BEAN_STORE_ATTRIBUTE_NAME, applicationBeanStore);
+ bootstrap.setEnvironment(Environments.SERVLET);
+ bootstrap.getServices().add(WebBeanDiscovery.class, new TomcatWebBeanDiscovery(sce.getServletContext()) {});
+ bootstrap.getServices().add(NamingContext.class, new ReadOnlyNamingContext() {});
+ bootstrap.setApplicationContext(applicationBeanStore);
+ bootstrap.initialize();
+ bootstrap.boot();
+ super.contextInitialized(sce);
+ }
+
+ @Override
+ protected ServletListener delegate()
+ {
+ return webBeansListener;
+ }
+
+}
Deleted: extensions/trunk/tomcat/int/src/main/java/org/jboss/webbeans/environment/tomcat/ServletListener.java
===================================================================
--- extensions/trunk/tomcat/int/src/main/java/org/jboss/webbeans/environment/tomcat/ServletListener.java 2009-03-27 18:16:09 UTC (rev 2235)
+++ extensions/trunk/tomcat/int/src/main/java/org/jboss/webbeans/environment/tomcat/ServletListener.java 2009-03-27 19:09:31 UTC (rev 2236)
@@ -1,73 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.webbeans.environment.tomcat;
-
-import javax.servlet.ServletContextEvent;
-import javax.servlet.ServletContextListener;
-
-import org.jboss.webbeans.bootstrap.api.Bootstrap;
-import org.jboss.webbeans.bootstrap.api.Environments;
-import org.jboss.webbeans.bootstrap.spi.WebBeanDiscovery;
-import org.jboss.webbeans.context.api.BeanStore;
-import org.jboss.webbeans.context.api.helpers.ConcurrentHashMapBeanStore;
-import org.jboss.webbeans.environment.tomcat.discovery.TomcatWebBeanDiscovery;
-import org.jboss.webbeans.environment.tomcat.resources.ReadOnlyNamingContext;
-import org.jboss.webbeans.environment.tomcat.util.Reflections;
-import org.jboss.webbeans.resources.spi.NamingContext;
-import org.jboss.webbeans.servlet.WebBeansListener;
-
-/**
- * @author Pete Muir
- */
-public class ServletListener extends WebBeansListener implements ServletContextListener
-{
-
- private static final String BOOTSTRAP_IMPL_CLASS_NAME = "org.jboss.webbeans.bootstrap.WebBeansBootstrap";
- private static final String APPLICATION_BEAN_STORE_ATTRIBUTE_NAME = ServletListener.class.getName() + ".applicationBeanStore";
-
- private final transient Bootstrap bootstrap;
-
- public ServletListener()
- {
- try
- {
- bootstrap = Reflections.newInstance(BOOTSTRAP_IMPL_CLASS_NAME, Bootstrap.class);
- }
- catch (Exception e)
- {
- throw new IllegalStateException("Error loading Web Beans bootstrap, check that Web Beans is on the classpath", e);
- }
- }
-
- public void contextDestroyed(ServletContextEvent sce)
- {
- bootstrap.shutdown();
- }
-
- public void contextInitialized(ServletContextEvent sce)
- {
- BeanStore applicationBeanStore = new ConcurrentHashMapBeanStore();
- sce.getServletContext().setAttribute(APPLICATION_BEAN_STORE_ATTRIBUTE_NAME, applicationBeanStore);
- bootstrap.setEnvironment(Environments.SE);
- bootstrap.getServices().add(WebBeanDiscovery.class, new TomcatWebBeanDiscovery() {});
- bootstrap.getServices().add(NamingContext.class, new ReadOnlyNamingContext() {});
- bootstrap.setApplicationContext(applicationBeanStore);
- bootstrap.initialize();
- bootstrap.boot();
- }
-
-}
Modified: extensions/trunk/tomcat/int/src/main/java/org/jboss/webbeans/environment/tomcat/discovery/TomcatWebBeanDiscovery.java
===================================================================
--- extensions/trunk/tomcat/int/src/main/java/org/jboss/webbeans/environment/tomcat/discovery/TomcatWebBeanDiscovery.java 2009-03-27 18:16:09 UTC (rev 2235)
+++ extensions/trunk/tomcat/int/src/main/java/org/jboss/webbeans/environment/tomcat/discovery/TomcatWebBeanDiscovery.java 2009-03-27 19:09:31 UTC (rev 2236)
@@ -16,11 +16,16 @@
*/
package org.jboss.webbeans.environment.tomcat.discovery;
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URISyntaxException;
import java.net.URL;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
+import javax.servlet.ServletContext;
+
import org.jboss.webbeans.bootstrap.spi.WebBeanDiscovery;
import org.jboss.webbeans.environment.tomcat.util.Reflections;
@@ -37,11 +42,13 @@
private final Set<Class<?>> wbClasses;
private final Set<URL> wbUrls;
+ private final ServletContext servletContext;
- public TomcatWebBeanDiscovery()
+ public TomcatWebBeanDiscovery(ServletContext servletContext)
{
this.wbClasses = new HashSet<Class<?>>();
this.wbUrls = new HashSet<URL>();
+ this.servletContext = servletContext;
scan();
}
@@ -69,6 +76,22 @@
{
Scanner scanner = new URLScanner(Reflections.getClassLoader(), this);
scanner.scanResources(new String[] { "beans.xml" });
+ try
+ {
+ if (servletContext.getResource("/WEB-INF/beans.xml") != null)
+ {
+ File[] files = {new File(servletContext.getResource("/WEB-INF/classes").toURI())};
+ scanner.scanDirectories(files);
+ }
+ }
+ catch (MalformedURLException e)
+ {
+ throw new IllegalStateException("Error loading resources from servlet context ", e);
+ }
+ catch (URISyntaxException e)
+ {
+ throw new IllegalStateException("Error loading resources from servlet context ", e);
+ }
}
}
15 years, 9 months
[webbeans-commits] Webbeans SVN: r2235 - ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-03-27 14:16:09 -0400 (Fri, 27 Mar 2009)
New Revision: 2235
Modified:
ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/ServletLifecycle.java
Log:
servlet listener is getting called twice on GF so only proceed on outer most calls
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/ServletLifecycle.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/ServletLifecycle.java 2009-03-27 17:52:50 UTC (rev 2234)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/ServletLifecycle.java 2009-03-27 18:16:09 UTC (rev 2235)
@@ -98,10 +98,13 @@
*/
public void beginRequest(HttpServletRequest request)
{
- BeanStore beanStore = new ConcurrentHashMapBeanStore();
- request.setAttribute(REQUEST_ATTRIBUTE_NAME, beanStore);
- super.beginRequest(request.getRequestURI(), beanStore);
- restoreSessionContext(request.getSession());
+ if (request.getAttribute(REQUEST_ATTRIBUTE_NAME) == null)
+ {
+ BeanStore beanStore = new ConcurrentHashMapBeanStore();
+ request.setAttribute(REQUEST_ATTRIBUTE_NAME, beanStore);
+ super.beginRequest(request.getRequestURI(), beanStore);
+ restoreSessionContext(request.getSession());
+ }
}
/**
@@ -111,13 +114,17 @@
*/
public void endRequest(HttpServletRequest request)
{
- BeanStore beanStore = (BeanStore) request.getAttribute(REQUEST_ATTRIBUTE_NAME);
- if (beanStore == null)
+ if (request.getAttribute(REQUEST_ATTRIBUTE_NAME) != null)
{
- throw new IllegalStateException("Cannot obtain request scoped beans from the request");
+ BeanStore beanStore = (BeanStore) request.getAttribute(REQUEST_ATTRIBUTE_NAME);
+ if (beanStore == null)
+ {
+ throw new IllegalStateException("Cannot obtain request scoped beans from the request");
+ }
+ super.endRequest(request.getRequestURI(), beanStore);
+ request.removeAttribute(REQUEST_ATTRIBUTE_NAME);
+ SessionContext.INSTANCE.setBeanStore(null);
}
- super.endRequest(request.getRequestURI(), beanStore);
- SessionContext.INSTANCE.setBeanStore(null);
}
}
15 years, 9 months
[webbeans-commits] Webbeans SVN: r2234 - doc/trunk/reference/en-US.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-03-27 13:52:50 -0400 (Fri, 27 Mar 2009)
New Revision: 2234
Modified:
doc/trunk/reference/en-US/ri-spi.xml
Log:
update
Modified: doc/trunk/reference/en-US/ri-spi.xml
===================================================================
--- doc/trunk/reference/en-US/ri-spi.xml 2009-03-27 17:30:14 UTC (rev 2233)
+++ doc/trunk/reference/en-US/ri-spi.xml 2009-03-27 17:52:50 UTC (rev 2234)
@@ -62,9 +62,9 @@
</para>
</section>
-
- <section>
- <title>EJB Discovery</title>
+
+ <section>
+ <title>EJB services</title>
<para>
The Web Beans RI also delegates EJB3 bean discovery to the container
@@ -73,18 +73,15 @@
EJBDescriptor should be discovered:
</para>
- <programlisting role="JAVA"><![CDATA[public interface EjbDiscovery
+ <programlisting role="JAVA"><![CDATA[public interface EjbServices
{
- public static final String PROPERTY_NAME = EjbDiscovery.class.getName();
/**
* Gets a descriptor for each EJB in the application
*
* @return The bean class to descriptor map
*/
- public Iterable<EjbDescriptor<?>> discoverEjbs();
-
-}]]></programlisting>
+ public Iterable<EjbDescriptor<?>> discoverEjbs();]]></programlisting>
<programlisting role="JAVA"><![CDATA[public interface EjbDescriptor<T> {
@@ -162,18 +159,12 @@
local business interface (encapsulating the interface class and
jndi name used to look up an instance of the EJB).
</para>
-
- </section>
-
- <section>
- <title><literal>@EJB</literal>, <literal>@PersistenceContext</literal> and <literal>@Resource</literal> resolution</title>
<para>
- The resolution of <literal>@EJB</literal>,
- <literal>@PersistenceContext</literal> and
+ The resolution of <literal>@EJB</literal> and
<literal>@Resource</literal> is delegated to the container. You must
provide an implementation of
- <literal>org.jboss.webbeans.ejb.spi.EjbResolver</literal> which
+ <literal>org.jboss.webbeans.ejb.spi.EjbServices</literal> which
provides these operations. Web Beans passes in the
<literal>javax.inject.manager.InjectionPoint</literal> the
resolution is for, as well as the <literal>NamingContext</literal>
@@ -190,9 +181,25 @@
<!-- <literal>@PreDestroy</literal> lifecycle callbacks.-->
<!-- </para>-->
- </section>
+ </section>
<section>
+ <title>JPA services</title>
+
+ <para>
+ Just as resolution of <literal>@EJB</literal> is delegated to the
+ container, so is resolution of
+ <literal>@PersistenceContext</literal>.
+ </para>
+
+ <para>
+ OPEN ISSUE: Web Beans also requires the container to provide a list
+ of entities in the deployment, so that they aren't discovered as
+ simple beans.
+ </para>
+ </section>
+
+ <section>
<title>Transaction Services</title>
<para>
@@ -280,20 +287,27 @@
<para>
The bootstrap is split into phases, bootstrap initialization and
- bootstrap. Initialization will create a manager, and add the
+ boot and shutdown. Initialization will create a manager, and add the
standard (specification defined) contexts. Bootstrap will discover
EJBs, classes and XML; add beans defined using annotations; add
beans defined using XML; and validate all beans.
</para>
<para>
+ The bootstrap supports multiple environments. Different environments
+ require different services to be present (for example servlet
+ doesn't require transaction, EJB or JPA services). By default an
+ EE environment is assumed, but you can adjust the environment by
+ calling <literal>bootstrap.setEnvironment()</literal>.
+ </para>
+
+ <para>
To initialize the bootstrap you call
<literal>Bootstrap.initialize()</literal>. Before calling
- <literal>initialize()</literal> you must have called
- <literal>Bootstrap.setEjbResolver()</literal>. If you are not using
- the built in <literal>DefaultNamingContext</literal> or the built in
- <literal>DefaultResourceLoader</literal> you must set these before
- calling <literal>initialize()</literal>.
+ <literal>initialize()</literal>, you must register any services
+ required by your environment. You can do this by calling
+ <literal>bootstrap.getServices().add(JpaServices.class, new MyJpaServices())</literal>.
+ You must also provide the application context bean store.
</para>
<para>
@@ -304,10 +318,6 @@
<para>
To boot the container you call <literal>Bootstrap.boot()</literal>.
- Before calling <literal>boot()</literal> you must have called
- <literal>Bootstrap.setWebBeanDiscovery()</literal>,
- <literal>Bootstrap.setEjbDiscovery()</literal> and
- <literal>Bootstrap.setApplicationContext()</literal>.
</para>
<para>
@@ -493,13 +503,13 @@
</varlistentry>
<varlistentry>
<term>
- The <literal>webbeans-ri.jar</literal>
+ The <literal>webbeans-core.jar</literal>
</term>
<listitem>
<para>
If you are integrating the Web Beans into an environment that
supports deployment of applications, you must insert the
- <literal>webbeans-ri.jar</literal> into the applications
+ <literal>webbeans-core.jar</literal> into the applications
isolated classloader. It cannot be loaded from a shared
classloader.
</para>
15 years, 9 months
[webbeans-commits] Webbeans SVN: r2233 - ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-03-27 13:30:14 -0400 (Fri, 27 Mar 2009)
New Revision: 2233
Modified:
ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/ServletLifecycle.java
Log:
javadoc
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/ServletLifecycle.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/ServletLifecycle.java 2009-03-27 17:10:23 UTC (rev 2232)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/ServletLifecycle.java 2009-03-27 17:30:14 UTC (rev 2233)
@@ -29,9 +29,9 @@
/**
* Implementation of the Web Beans lifecycle that can react to servlet events
+ * and drives the Session, Conversation and Request (for Servlet requests)
+ * lifecycle
*
- * This implementation boots the Web Beans container.
- *
* @author Pete Muir
* @author Nicklas Karlsson
*/
15 years, 9 months
[webbeans-commits] Webbeans SVN: r2232 - ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-03-27 13:10:23 -0400 (Fri, 27 Mar 2009)
New Revision: 2232
Modified:
ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/ServletLifecycle.java
Log:
minor
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/ServletLifecycle.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/ServletLifecycle.java 2009-03-27 17:09:05 UTC (rev 2231)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/ServletLifecycle.java 2009-03-27 17:10:23 UTC (rev 2232)
@@ -112,6 +112,10 @@
public void endRequest(HttpServletRequest request)
{
BeanStore beanStore = (BeanStore) request.getAttribute(REQUEST_ATTRIBUTE_NAME);
+ if (beanStore == null)
+ {
+ throw new IllegalStateException("Cannot obtain request scoped beans from the request");
+ }
super.endRequest(request.getRequestURI(), beanStore);
SessionContext.INSTANCE.setBeanStore(null);
}
15 years, 9 months
[webbeans-commits] Webbeans SVN: r2231 - ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-03-27 13:09:05 -0400 (Fri, 27 Mar 2009)
New Revision: 2231
Modified:
ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/ServletLifecycle.java
Log:
minor
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/ServletLifecycle.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/ServletLifecycle.java 2009-03-27 17:02:23 UTC (rev 2230)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/ServletLifecycle.java 2009-03-27 17:09:05 UTC (rev 2231)
@@ -112,7 +112,6 @@
public void endRequest(HttpServletRequest request)
{
BeanStore beanStore = (BeanStore) request.getAttribute(REQUEST_ATTRIBUTE_NAME);
- request.removeAttribute(REQUEST_ATTRIBUTE_NAME);
super.endRequest(request.getRequestURI(), beanStore);
SessionContext.INSTANCE.setBeanStore(null);
}
15 years, 9 months
[webbeans-commits] Webbeans SVN: r2230 - ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-03-27 13:02:23 -0400 (Fri, 27 Mar 2009)
New Revision: 2230
Modified:
ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/BeanDeployer.java
Log:
minor
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/BeanDeployer.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/BeanDeployer.java 2009-03-27 16:54:16 UTC (rev 2229)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/BeanDeployer.java 2009-03-27 17:02:23 UTC (rev 2230)
@@ -261,7 +261,7 @@
!ejbApiAbstraction.ENTERPRISE_BEAN_CLASS.isAssignableFrom(rawType) &&
!jsfApiAbstraction.UICOMPONENT_CLASS.isAssignableFrom(rawType) &&
hasSimpleWebBeanConstructor(clazz)
- && manager.getServices().contains(JpaServices.class) ? !manager.getServices().get(JpaServices.class).discoverEntities().contains(clazz.getRawType()) : true;
+ && (manager.getServices().contains(JpaServices.class) ? !manager.getServices().get(JpaServices.class).discoverEntities().contains(clazz.getRawType()) : true);
}
private static boolean hasSimpleWebBeanConstructor(AnnotatedClass<?> type)
15 years, 9 months