openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gerdo...@apache.org
Subject svn commit: r794393 - in /incubator/openwebbeans/trunk/samples/guess: ./ src/main/java/org/apache/webbeans/sample/bean/ src/main/java/org/apache/webbeans/sample/bindings/ src/main/java/org/apache/webbeans/sample/ejb/ src/main/java/org/apache/webbeans/s...
Date Wed, 15 Jul 2009 20:14:20 GMT
Author: gerdogdu
Date: Wed Jul 15 20:14:20 2009
New Revision: 794393

URL: http://svn.apache.org/viewvc?rev=794393&view=rev
Log:
update example for ejb.

Added:
    incubator/openwebbeans/trunk/samples/guess/src/main/java/org/apache/webbeans/sample/ejb/
    incubator/openwebbeans/trunk/samples/guess/src/main/java/org/apache/webbeans/sample/ejb/Hello.java
  (with props)
    incubator/openwebbeans/trunk/samples/guess/src/main/java/org/apache/webbeans/sample/ejb/HelloBean.java
  (with props)
Modified:
    incubator/openwebbeans/trunk/samples/guess/pom.xml
    incubator/openwebbeans/trunk/samples/guess/src/main/java/org/apache/webbeans/sample/bean/LoginBean.java
    incubator/openwebbeans/trunk/samples/guess/src/main/java/org/apache/webbeans/sample/bindings/JmsBinding.java
    incubator/openwebbeans/trunk/samples/guess/src/main/java/org/apache/webbeans/sample/bindings/LoggedInUser.java
    incubator/openwebbeans/trunk/samples/guess/src/main/java/org/apache/webbeans/sample/guess/Highest.java
    incubator/openwebbeans/trunk/samples/guess/src/main/java/org/apache/webbeans/sample/guess/NextNumber.java
    incubator/openwebbeans/trunk/samples/guess/src/main/java/org/apache/webbeans/sample/model/conversation/ConversationModel.java
    incubator/openwebbeans/trunk/samples/guess/src/main/resources/log4j.properties

Modified: incubator/openwebbeans/trunk/samples/guess/pom.xml
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/samples/guess/pom.xml?rev=794393&r1=794392&r2=794393&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/samples/guess/pom.xml (original)
+++ incubator/openwebbeans/trunk/samples/guess/pom.xml Wed Jul 15 20:14:20 2009
@@ -56,33 +56,62 @@
             <groupId>org.apache.openwebbeans</groupId>
             <artifactId>openwebbeans-jsf</artifactId>
             <version>1.0.0-incubating-SNAPSHOT</version>
-            <scope>provided</scope>
         </dependency>
 
         <dependency>
             <groupId>org.apache.openwebbeans</groupId>
             <artifactId>openwebbeans-jpa</artifactId>
             <version>1.0.0-incubating-SNAPSHOT</version>
-            <scope>provided</scope>
         </dependency>
 
         <dependency>
             <groupId>org.apache.myfaces.core</groupId>
             <artifactId>myfaces-api</artifactId>
-            <scope>provided</scope>
+            <optional>true</optional>
         </dependency>
 
         <dependency>
             <groupId>org.apache.geronimo.specs</groupId>
             <artifactId>geronimo-servlet_2.5_spec</artifactId>
             <scope>provided</scope>
+            <optional>true</optional>
         </dependency>
         <dependency>
         	<groupId>org.apache.openwebbeans</groupId>
         	<artifactId>openwebbeans-jms</artifactId>
         	<version>1.0.0-incubating-SNAPSHOT</version>
-        	<scope>provided</scope>
         </dependency>
+        <dependency>
+        	<groupId>org.apache.openwebbeans</groupId>
+        	<artifactId>openwebbeans-ejb</artifactId>
+        	<version>1.0.0-incubating-SNAPSHOT</version>
+        	<scope>compile</scope>
+        </dependency>
+        
+                <dependency>
+                    <groupId>org.apache.myfaces.core</groupId>
+                    <artifactId>myfaces-impl</artifactId>
+                    <optional>true</optional>
+                </dependency>
+                <dependency>
+                	<groupId>org.apache.geronimo.specs</groupId>
+                	<artifactId>geronimo-ejb_3.0_spec</artifactId>
+                	<scope>provided</scope>
+                	<optional>true</optional>
+                </dependency>
+                <dependency>
+                	<groupId>org.apache.geronimo.specs</groupId>
+                	<artifactId>geronimo-interceptor_3.0_spec</artifactId>
+                	<scope>provided</scope>
+                	<optional>true</optional>
+                </dependency>
+                <dependency>
+                	<groupId>org.apache.geronimo.specs</groupId>
+                	<artifactId>geronimo-jms_1.1_spec</artifactId>
+                	<version>1.1.1</version>
+                	<optional>true</optional>
+                </dependency>
+        
 	
       </dependencies>
 

Modified: incubator/openwebbeans/trunk/samples/guess/src/main/java/org/apache/webbeans/sample/bean/LoginBean.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/samples/guess/src/main/java/org/apache/webbeans/sample/bean/LoginBean.java?rev=794393&r1=794392&r2=794393&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/samples/guess/src/main/java/org/apache/webbeans/sample/bean/LoginBean.java
(original)
+++ incubator/openwebbeans/trunk/samples/guess/src/main/java/org/apache/webbeans/sample/bean/LoginBean.java
Wed Jul 15 20:14:20 2009
@@ -29,6 +29,7 @@
 
 import org.apache.webbeans.sample.bindings.LoggedInUser;
 import org.apache.webbeans.sample.dependent.LoginCheck;
+import org.apache.webbeans.sample.ejb.Hello;
 import org.apache.webbeans.sample.event.LoggedInEvent;
 import org.apache.webbeans.sample.model.User;
 import org.apache.webbeans.sample.util.FacesMessageUtil;
@@ -49,6 +50,8 @@
 	
 	private @Any Event<LoggedInEvent> event;
 	
+	private @Current Hello hello;
+	
 	public LoginBean()
 	{
 		
@@ -64,6 +67,8 @@
 			
 			event.fire(new LoggedInEvent(this.user));
 			
+			this.hello.sayHello();
+			
 			return "loginSuccess";
 		}
 		else

Modified: incubator/openwebbeans/trunk/samples/guess/src/main/java/org/apache/webbeans/sample/bindings/JmsBinding.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/samples/guess/src/main/java/org/apache/webbeans/sample/bindings/JmsBinding.java?rev=794393&r1=794392&r2=794393&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/samples/guess/src/main/java/org/apache/webbeans/sample/bindings/JmsBinding.java
(original)
+++ incubator/openwebbeans/trunk/samples/guess/src/main/java/org/apache/webbeans/sample/bindings/JmsBinding.java
Wed Jul 15 20:14:20 2009
@@ -21,7 +21,8 @@
 import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 
-import javax.xml.ws.BindingType;
+import javax.enterprise.inject.BindingType;
+
 
 @BindingType
 @Retention(RetentionPolicy.RUNTIME)

Modified: incubator/openwebbeans/trunk/samples/guess/src/main/java/org/apache/webbeans/sample/bindings/LoggedInUser.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/samples/guess/src/main/java/org/apache/webbeans/sample/bindings/LoggedInUser.java?rev=794393&r1=794392&r2=794393&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/samples/guess/src/main/java/org/apache/webbeans/sample/bindings/LoggedInUser.java
(original)
+++ incubator/openwebbeans/trunk/samples/guess/src/main/java/org/apache/webbeans/sample/bindings/LoggedInUser.java
Wed Jul 15 20:14:20 2009
@@ -21,7 +21,8 @@
 import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 
-import javax.xml.ws.BindingType;
+import javax.enterprise.inject.BindingType;
+
 
 @BindingType
 @Retention(RetentionPolicy.RUNTIME)

Added: incubator/openwebbeans/trunk/samples/guess/src/main/java/org/apache/webbeans/sample/ejb/Hello.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/samples/guess/src/main/java/org/apache/webbeans/sample/ejb/Hello.java?rev=794393&view=auto
==============================================================================
--- incubator/openwebbeans/trunk/samples/guess/src/main/java/org/apache/webbeans/sample/ejb/Hello.java
(added)
+++ incubator/openwebbeans/trunk/samples/guess/src/main/java/org/apache/webbeans/sample/ejb/Hello.java
Wed Jul 15 20:14:20 2009
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to You 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.apache.webbeans.sample.ejb;
+
+import javax.ejb.Local;
+
+@Local
+public interface Hello
+{
+    public String sayHello();
+
+}

Propchange: incubator/openwebbeans/trunk/samples/guess/src/main/java/org/apache/webbeans/sample/ejb/Hello.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/openwebbeans/trunk/samples/guess/src/main/java/org/apache/webbeans/sample/ejb/HelloBean.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/samples/guess/src/main/java/org/apache/webbeans/sample/ejb/HelloBean.java?rev=794393&view=auto
==============================================================================
--- incubator/openwebbeans/trunk/samples/guess/src/main/java/org/apache/webbeans/sample/ejb/HelloBean.java
(added)
+++ incubator/openwebbeans/trunk/samples/guess/src/main/java/org/apache/webbeans/sample/ejb/HelloBean.java
Wed Jul 15 20:14:20 2009
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to You 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.apache.webbeans.sample.ejb;
+
+import java.io.Serializable;
+
+import javax.ejb.Stateless;
+import javax.enterprise.context.SessionScoped;
+import javax.enterprise.inject.Current;
+import javax.interceptor.Interceptors;
+
+import org.apache.webbeans.ejb.interceptor.OpenWebBeansEjbInterceptor;
+import org.apache.webbeans.sample.util.FacesMessageUtil;
+
+@Stateless
+@SessionScoped
+@Interceptors({OpenWebBeansEjbInterceptor.class})
+public class HelloBean implements Hello,Serializable
+{
+    /**
+     * 
+     */
+    private static final long serialVersionUID = 1L;
+    private @Current FacesMessageUtil messageUtil;
+
+    
+    
+    
+    @Override
+    public String sayHello()
+    {
+        System.out.println(messageUtil);
+        
+        return "Hello";
+    }
+
+}

Propchange: incubator/openwebbeans/trunk/samples/guess/src/main/java/org/apache/webbeans/sample/ejb/HelloBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/openwebbeans/trunk/samples/guess/src/main/java/org/apache/webbeans/sample/guess/Highest.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/samples/guess/src/main/java/org/apache/webbeans/sample/guess/Highest.java?rev=794393&r1=794392&r2=794393&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/samples/guess/src/main/java/org/apache/webbeans/sample/guess/Highest.java
(original)
+++ incubator/openwebbeans/trunk/samples/guess/src/main/java/org/apache/webbeans/sample/guess/Highest.java
Wed Jul 15 20:14:20 2009
@@ -27,7 +27,7 @@
 import java.lang.annotation.Retention;
 import java.lang.annotation.Target;
 
-import javax.xml.ws.BindingType;
+import javax.enterprise.inject.BindingType;
 
 @BindingType
 @Target( { TYPE, METHOD, PARAMETER, FIELD })

Modified: incubator/openwebbeans/trunk/samples/guess/src/main/java/org/apache/webbeans/sample/guess/NextNumber.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/samples/guess/src/main/java/org/apache/webbeans/sample/guess/NextNumber.java?rev=794393&r1=794392&r2=794393&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/samples/guess/src/main/java/org/apache/webbeans/sample/guess/NextNumber.java
(original)
+++ incubator/openwebbeans/trunk/samples/guess/src/main/java/org/apache/webbeans/sample/guess/NextNumber.java
Wed Jul 15 20:14:20 2009
@@ -27,7 +27,8 @@
 import java.lang.annotation.Retention;
 import java.lang.annotation.Target;
 
-import javax.xml.ws.BindingType;
+import javax.enterprise.inject.BindingType;
+
 
 @BindingType
 @Target( { TYPE, METHOD, PARAMETER, FIELD })

Modified: incubator/openwebbeans/trunk/samples/guess/src/main/java/org/apache/webbeans/sample/model/conversation/ConversationModel.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/samples/guess/src/main/java/org/apache/webbeans/sample/model/conversation/ConversationModel.java?rev=794393&r1=794392&r2=794393&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/samples/guess/src/main/java/org/apache/webbeans/sample/model/conversation/ConversationModel.java
(original)
+++ incubator/openwebbeans/trunk/samples/guess/src/main/java/org/apache/webbeans/sample/model/conversation/ConversationModel.java
Wed Jul 15 20:14:20 2009
@@ -27,6 +27,8 @@
 @Named
 public class ConversationModel implements Serializable
 {
+    private static final long serialVersionUID = -5042442586067259214L;
+
     public List<String> list = new ArrayList<String>();
     
     public void addNewBook(String name)

Modified: incubator/openwebbeans/trunk/samples/guess/src/main/resources/log4j.properties
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/samples/guess/src/main/resources/log4j.properties?rev=794393&r1=794392&r2=794393&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/samples/guess/src/main/resources/log4j.properties (original)
+++ incubator/openwebbeans/trunk/samples/guess/src/main/resources/log4j.properties Wed Jul
15 20:14:20 2009
@@ -29,8 +29,8 @@
 #log4j.appender.file.layout.ConversionPattern=<%d> %-5p [%c] : %m%n
 
 
-log4j.rootLogger=debug,stdout
+log4j.rootLogger=info,stdout
 
 
 ### Main project logger to info
-log4j.logger.org.apache.webbeans=debug
\ No newline at end of file
+log4j.logger.org.apache.webbeans=info
\ No newline at end of file



Mime
View raw message