openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gerdo...@apache.org
Subject svn commit: r804757 - in /incubator/openwebbeans/trunk/samples/jms-sample: ./ src/ src/main/ src/main/java/ src/main/java/org/ src/main/java/org/apache/ src/main/java/org/apache/webbeans/ src/main/java/org/apache/webbeans/sample/ src/main/java/org/apac...
Date Sun, 16 Aug 2009 20:09:57 GMT
Author: gerdogdu
Date: Sun Aug 16 20:09:56 2009
New Revision: 804757

URL: http://svn.apache.org/viewvc?rev=804757&view=rev
Log:
Adding JMS Sample for Enterprise Servers

Added:
    incubator/openwebbeans/trunk/samples/jms-sample/   (with props)
    incubator/openwebbeans/trunk/samples/jms-sample/pom.xml   (with props)
    incubator/openwebbeans/trunk/samples/jms-sample/src/
    incubator/openwebbeans/trunk/samples/jms-sample/src/main/
    incubator/openwebbeans/trunk/samples/jms-sample/src/main/java/
    incubator/openwebbeans/trunk/samples/jms-sample/src/main/java/org/
    incubator/openwebbeans/trunk/samples/jms-sample/src/main/java/org/apache/
    incubator/openwebbeans/trunk/samples/jms-sample/src/main/java/org/apache/webbeans/
    incubator/openwebbeans/trunk/samples/jms-sample/src/main/java/org/apache/webbeans/sample/
    incubator/openwebbeans/trunk/samples/jms-sample/src/main/java/org/apache/webbeans/sample/bindings/
    incubator/openwebbeans/trunk/samples/jms-sample/src/main/java/org/apache/webbeans/sample/bindings/JmsBinding.java
  (with props)
    incubator/openwebbeans/trunk/samples/jms-sample/src/main/java/org/apache/webbeans/sample/jms/
    incubator/openwebbeans/trunk/samples/jms-sample/src/main/java/org/apache/webbeans/sample/jms/JmsReceiverBean.java
  (with props)
    incubator/openwebbeans/trunk/samples/jms-sample/src/main/java/org/apache/webbeans/sample/jms/JmsSenderBean.java
  (with props)
    incubator/openwebbeans/trunk/samples/jms-sample/src/main/resources/
    incubator/openwebbeans/trunk/samples/jms-sample/src/main/resources/META-INF/
    incubator/openwebbeans/trunk/samples/jms-sample/src/main/resources/META-INF/beans.xml
  (with props)
    incubator/openwebbeans/trunk/samples/jms-sample/src/main/resources/META-INF/openwebbeans/
    incubator/openwebbeans/trunk/samples/jms-sample/src/main/resources/META-INF/openwebbeans/openwebbeans.properties
  (with props)
    incubator/openwebbeans/trunk/samples/jms-sample/src/main/resources/log4j.properties  
(with props)
    incubator/openwebbeans/trunk/samples/jms-sample/src/main/webapp/
    incubator/openwebbeans/trunk/samples/jms-sample/src/main/webapp/WEB-INF/
    incubator/openwebbeans/trunk/samples/jms-sample/src/main/webapp/WEB-INF/beans.xml   (with
props)
    incubator/openwebbeans/trunk/samples/jms-sample/src/main/webapp/WEB-INF/faces-config.xml
  (with props)
    incubator/openwebbeans/trunk/samples/jms-sample/src/main/webapp/WEB-INF/web.xml   (with
props)
    incubator/openwebbeans/trunk/samples/jms-sample/src/main/webapp/index.html   (with props)
    incubator/openwebbeans/trunk/samples/jms-sample/src/main/webapp/receiver.xhtml   (with
props)
    incubator/openwebbeans/trunk/samples/jms-sample/src/main/webapp/sender.xhtml   (with props)

Propchange: incubator/openwebbeans/trunk/samples/jms-sample/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sun Aug 16 20:09:56 2009
@@ -0,0 +1,4 @@
+target
+.classpath
+.project
+.settings

Added: incubator/openwebbeans/trunk/samples/jms-sample/pom.xml
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/samples/jms-sample/pom.xml?rev=804757&view=auto
==============================================================================
--- incubator/openwebbeans/trunk/samples/jms-sample/pom.xml (added)
+++ incubator/openwebbeans/trunk/samples/jms-sample/pom.xml Sun Aug 16 20:09:56 2009
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="UTF-8"?>
+	<!--
+
+		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.
+	-->
+<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>samples</artifactId>
+		<groupId>org.apache.openwebbeans</groupId>
+		<version>1.0.0-incubating-SNAPSHOT</version>
+	</parent>
+	<modelVersion>4.0.0</modelVersion>
+	<groupId>org.apache.openwebbeans.samples</groupId>
+	<artifactId>jms-sample</artifactId>
+	<packaging>war</packaging>
+	<name>Apache OpenWebBeans :: Sample Jms Injection Demo</name>
+	<description>Sample Jms Injection Demo</description>
+
+	<build>
+		<finalName>jms-sample</finalName>
+	</build>
+
+	<dependencies>
+
+		<!-- For Junit Test -->
+		<dependency>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+			<scope>test</scope>
+		</dependency>
+		
+		<!-- JSF Facelet -->
+		<dependency>
+			<groupId>com.sun.facelets</groupId>
+			<artifactId>jsf-facelets</artifactId>
+			<version>1.1.14</version>
+		</dependency>
+
+		<!-- JSR-299 API -->
+		<dependency>
+			<groupId>org.apache.openwebbeans</groupId>
+			<artifactId>openwebbeans-api</artifactId>
+			<version>1.0.0-incubating-SNAPSHOT</version>
+		</dependency>
+		
+		<!-- OWB implementation -->
+		<dependency>
+			<groupId>org.apache.openwebbeans</groupId>
+			<artifactId>openwebbeans-api</artifactId>
+			<version>1.0.0-incubating-SNAPSHOT</version>
+		</dependency>		
+		
+		<!-- JSF Plugin -->
+		<dependency>
+			<groupId>org.apache.openwebbeans</groupId>
+			<artifactId>openwebbeans-jsf</artifactId>
+			<version>1.0.0-incubating-SNAPSHOT</version>
+		</dependency>
+		
+		<!-- MyFaces API -->
+		<dependency>
+			<groupId>org.apache.myfaces.core</groupId>
+			<artifactId>myfaces-api</artifactId>
+			<scope>provided</scope>
+		</dependency>
+		
+		<!-- Servlet API -->
+		<dependency>
+			<groupId>org.apache.geronimo.specs</groupId>
+			<artifactId>geronimo-servlet_2.5_spec</artifactId>
+			<scope>provided</scope>
+		</dependency>
+				
+		<!-- JMS API -->
+		<dependency>
+			<groupId>org.apache.geronimo.specs</groupId>
+			<artifactId>geronimo-jms_1.1_spec</artifactId>
+			<version>1.1.1</version>
+			<scope>provided</scope>
+		</dependency>
+
+		<!-- JMS Plugin -->
+		<dependency>
+			<groupId>org.apache.openwebbeans</groupId>
+			<artifactId>openwebbeans-jms</artifactId>
+			<version>1.0.0-incubating-SNAPSHOT</version>
+		</dependency>						
+			
+	</dependencies>
+
+</project>

Propchange: incubator/openwebbeans/trunk/samples/jms-sample/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/openwebbeans/trunk/samples/jms-sample/src/main/java/org/apache/webbeans/sample/bindings/JmsBinding.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/samples/jms-sample/src/main/java/org/apache/webbeans/sample/bindings/JmsBinding.java?rev=804757&view=auto
==============================================================================
--- incubator/openwebbeans/trunk/samples/jms-sample/src/main/java/org/apache/webbeans/sample/bindings/JmsBinding.java
(added)
+++ incubator/openwebbeans/trunk/samples/jms-sample/src/main/java/org/apache/webbeans/sample/bindings/JmsBinding.java
Sun Aug 16 20:09:56 2009
@@ -0,0 +1,33 @@
+/*
+ *  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.bindings;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import javax.enterprise.inject.BindingType;
+
+
+@BindingType
+@Retention(RetentionPolicy.RUNTIME)
+@Target({ElementType.FIELD,ElementType.METHOD, ElementType.TYPE, ElementType.PARAMETER})
+public @interface JmsBinding
+{
+
+}

Propchange: incubator/openwebbeans/trunk/samples/jms-sample/src/main/java/org/apache/webbeans/sample/bindings/JmsBinding.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/openwebbeans/trunk/samples/jms-sample/src/main/java/org/apache/webbeans/sample/jms/JmsReceiverBean.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/samples/jms-sample/src/main/java/org/apache/webbeans/sample/jms/JmsReceiverBean.java?rev=804757&view=auto
==============================================================================
--- incubator/openwebbeans/trunk/samples/jms-sample/src/main/java/org/apache/webbeans/sample/jms/JmsReceiverBean.java
(added)
+++ incubator/openwebbeans/trunk/samples/jms-sample/src/main/java/org/apache/webbeans/sample/jms/JmsReceiverBean.java
Sun Aug 16 20:09:56 2009
@@ -0,0 +1,117 @@
+/*
+ * 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.jms;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.enterprise.context.SessionScoped;
+import javax.enterprise.inject.Named;
+import javax.jms.JMSException;
+import javax.jms.Message;
+import javax.jms.MessageListener;
+import javax.jms.QueueConnection;
+import javax.jms.QueueReceiver;
+import javax.jms.TextMessage;
+
+import org.apache.webbeans.sample.bindings.JmsBinding;
+
+@SessionScoped
+@Named("receiver")
+public class JmsReceiverBean implements MessageListener,Serializable
+{
+    private static final long serialVersionUID = 5704416477431590842L;
+
+    private @JmsBinding QueueReceiver queueReceiver;
+    
+    private @JmsBinding QueueConnection queueConnection;
+    
+    private String message;
+    
+    private boolean receive = false;
+    
+    private List<String> messages = new ArrayList<String>();
+
+    public String getMessage()
+    {
+        return message;
+    }
+
+    public void setMessage(String message)
+    {
+        this.message = message;
+    }
+
+    public void startReceive()
+    {
+        try
+        {
+            if(!receive)
+            {
+                this.receive = true;
+                this.queueConnection.start();
+            }
+            
+            queueReceiver.setMessageListener(this);
+        }
+        catch (JMSException e)
+        {
+            e.printStackTrace();
+        }
+    }
+    
+    @Override
+    public void onMessage(Message message)
+    {
+        TextMessage me = (TextMessage) message;
+        try
+        {
+            this.message = me.getText();
+            this.messages.add(this.message);
+        }
+        catch (JMSException e)
+        {
+            e.printStackTrace();
+        }
+    }
+
+    public String refresh()
+    {
+        return null;
+    }
+    
+    public boolean isReceive()
+    {
+        return receive;
+    }
+
+    public void setReceive(boolean receive)
+    {
+        this.receive = receive;
+    }
+
+    public List<String> getMessages()
+    {
+        return messages;
+    }
+
+    public void setMessages(List<String> messages)
+    {
+        this.messages = messages;
+    }
+    
+    
+
+}

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

Added: incubator/openwebbeans/trunk/samples/jms-sample/src/main/java/org/apache/webbeans/sample/jms/JmsSenderBean.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/samples/jms-sample/src/main/java/org/apache/webbeans/sample/jms/JmsSenderBean.java?rev=804757&view=auto
==============================================================================
--- incubator/openwebbeans/trunk/samples/jms-sample/src/main/java/org/apache/webbeans/sample/jms/JmsSenderBean.java
(added)
+++ incubator/openwebbeans/trunk/samples/jms-sample/src/main/java/org/apache/webbeans/sample/jms/JmsSenderBean.java
Sun Aug 16 20:09:56 2009
@@ -0,0 +1,75 @@
+/*
+ *  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.jms;
+
+import javax.enterprise.context.RequestScoped;
+import javax.enterprise.inject.Named;
+import javax.jms.JMSException;
+import javax.jms.QueueSender;
+import javax.jms.QueueSession;
+import javax.jms.TextMessage;
+
+import org.apache.webbeans.sample.bindings.JmsBinding;
+
+@RequestScoped
+@Named("sender")
+public class JmsSenderBean
+{
+    private @JmsBinding QueueSender queueSender;
+    
+    private @JmsBinding QueueSession queueSession;
+    
+    private String text;
+
+    public JmsSenderBean()
+    {
+        
+    }
+    
+    public String addMessage()
+    {
+        try
+        {
+            TextMessage message = queueSession.createTextMessage(this.text);
+            queueSender.send(message);
+        }
+        catch (JMSException e)
+        {
+            e.printStackTrace();
+        }
+        
+        return null;
+    }
+
+    /**
+     * @return the text
+     */
+    public String getText()
+    {
+        return text;
+    }
+
+    /**
+     * @param text the text to set
+     */
+    public void setText(String text)
+    {
+        this.text = text;
+    }
+    
+    
+}

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

Added: incubator/openwebbeans/trunk/samples/jms-sample/src/main/resources/META-INF/beans.xml
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/samples/jms-sample/src/main/resources/META-INF/beans.xml?rev=804757&view=auto
==============================================================================
--- incubator/openwebbeans/trunk/samples/jms-sample/src/main/resources/META-INF/beans.xml
(added)
+++ incubator/openwebbeans/trunk/samples/jms-sample/src/main/resources/META-INF/beans.xml
Sun Aug 16 20:09:56 2009
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+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.
+-->
+<WebBeans 	xmlns="urn:java:ee"
+ 			xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+			xsi:schemaLocation="urn:java:ee http://java.sun.com/jee/beans-1.0.xsd">	
+</WebBeans>
\ No newline at end of file

Propchange: incubator/openwebbeans/trunk/samples/jms-sample/src/main/resources/META-INF/beans.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/openwebbeans/trunk/samples/jms-sample/src/main/resources/META-INF/openwebbeans/openwebbeans.properties
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/samples/jms-sample/src/main/resources/META-INF/openwebbeans/openwebbeans.properties?rev=804757&view=auto
==============================================================================
--- incubator/openwebbeans/trunk/samples/jms-sample/src/main/resources/META-INF/openwebbeans/openwebbeans.properties
(added)
+++ incubator/openwebbeans/trunk/samples/jms-sample/src/main/resources/META-INF/openwebbeans/openwebbeans.properties
Sun Aug 16 20:09:56 2009
@@ -0,0 +1,31 @@
+#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.
+#---------------------------------------------------------------
+# The default configuration for OpenWebBeans
+#
+# The default configuration is intended for a JDK and a simple ServletContainer
+# like jetty, resin or tomcat.
+# 
+#---------------------------------------------------------------
+
+#general configuration section
+
+#use OWB Specific XML Configuration
+org.apache.webbeans.useOwbSpecificXmlConfig=true
+
+#JNDI Enterprise Implementation
+org.apache.webbeans.spi.JNDIService=org.apache.webbeans.spi.ee.JNDIServiceEnterpriseImpl
\ No newline at end of file

Propchange: incubator/openwebbeans/trunk/samples/jms-sample/src/main/resources/META-INF/openwebbeans/openwebbeans.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/openwebbeans/trunk/samples/jms-sample/src/main/resources/log4j.properties
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/samples/jms-sample/src/main/resources/log4j.properties?rev=804757&view=auto
==============================================================================
--- incubator/openwebbeans/trunk/samples/jms-sample/src/main/resources/log4j.properties (added)
+++ incubator/openwebbeans/trunk/samples/jms-sample/src/main/resources/log4j.properties Sun
Aug 16 20:09:56 2009
@@ -0,0 +1,36 @@
+#	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.
+#
+### direct log messages to stdout ###
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.Target=System.out
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
+#%c category,p priority,d time,L line number,m message, n newline;
+
+
+#log4j.appender.file=org.apache.log4j.RollingFileAppender
+#log4j.appender.file.File=hsm-application.log
+#log4j.appender.file.MaxFileSize=10MB
+#log4j.appender.file.MaxBackupIndex=2
+#log4j.appender.file.Encoding=UTF-8
+#log4j.appender.file.layout=org.apache.log4j.PatternLayout
+#log4j.appender.file.layout.ConversionPattern=<%d> %-5p [%c] : %m%n
+
+
+log4j.rootLogger=info,stdout
+
+
+### Main project logger to info
+log4j.logger.org.apache.webbeans=info
\ No newline at end of file

Propchange: incubator/openwebbeans/trunk/samples/jms-sample/src/main/resources/log4j.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/openwebbeans/trunk/samples/jms-sample/src/main/webapp/WEB-INF/beans.xml
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/samples/jms-sample/src/main/webapp/WEB-INF/beans.xml?rev=804757&view=auto
==============================================================================
--- incubator/openwebbeans/trunk/samples/jms-sample/src/main/webapp/WEB-INF/beans.xml (added)
+++ incubator/openwebbeans/trunk/samples/jms-sample/src/main/webapp/WEB-INF/beans.xml Sun
Aug 16 20:09:56 2009
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+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.
+-->
+<WebBeans 	xmlns="urn:java:ee"
+			xmlns:myapp="urn:java:org.apache.webbeans.sample.bindings"
+ 			xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+			xsi:schemaLocation="urn:java:ee http://java.sun.com/jee/beans-1.0.xsd">
+	
+	<Deploy>
+		<Standard/>
+		<Production/>
+	</Deploy>
+	
+	<Queue>
+		<Resource>
+			<name>queue/A</name>
+		</Resource>
+		<myapp:JmsBinding/>
+	</Queue>
+	
+</WebBeans>
\ No newline at end of file

Propchange: incubator/openwebbeans/trunk/samples/jms-sample/src/main/webapp/WEB-INF/beans.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/openwebbeans/trunk/samples/jms-sample/src/main/webapp/WEB-INF/faces-config.xml
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/samples/jms-sample/src/main/webapp/WEB-INF/faces-config.xml?rev=804757&view=auto
==============================================================================
--- incubator/openwebbeans/trunk/samples/jms-sample/src/main/webapp/WEB-INF/faces-config.xml
(added)
+++ incubator/openwebbeans/trunk/samples/jms-sample/src/main/webapp/WEB-INF/faces-config.xml
Sun Aug 16 20:09:56 2009
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+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.
+-->
+
+<faces-config
+    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"
+    version="1.2">
+    
+    <application>
+        <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
+    </application>
+    
+    	
+</faces-config>

Propchange: incubator/openwebbeans/trunk/samples/jms-sample/src/main/webapp/WEB-INF/faces-config.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/openwebbeans/trunk/samples/jms-sample/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/samples/jms-sample/src/main/webapp/WEB-INF/web.xml?rev=804757&view=auto
==============================================================================
--- incubator/openwebbeans/trunk/samples/jms-sample/src/main/webapp/WEB-INF/web.xml (added)
+++ incubator/openwebbeans/trunk/samples/jms-sample/src/main/webapp/WEB-INF/web.xml Sun Aug
16 20:09:56 2009
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+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.
+-->
+<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
+  <display-name>guess</display-name>
+  
+  <welcome-file-list>
+  	<welcome-file>index.html</welcome-file>
+  </welcome-file-list>
+  
+  <listener>
+    <listener-class>org.apache.webbeans.servlet.WebBeansConfigurationListener</listener-class>
+  </listener>
+  
+  <filter>
+  	<filter-name>webbeans</filter-name>
+  	<filter-class>org.apache.webbeans.jsf.WebBeansJSFFilter</filter-class>
+  </filter>
+  <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>
+  <filter-mapping>
+  	<filter-name>webbeans</filter-name>
+  	<servlet-name>Faces Servlet</servlet-name>
+  </filter-mapping>
+	
+	<context-param>
+      <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
+      <param-value>.xhtml</param-value>
+   </context-param>
+	  
+</web-app>
\ No newline at end of file

Propchange: incubator/openwebbeans/trunk/samples/jms-sample/src/main/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/openwebbeans/trunk/samples/jms-sample/src/main/webapp/index.html
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/samples/jms-sample/src/main/webapp/index.html?rev=804757&view=auto
==============================================================================
--- incubator/openwebbeans/trunk/samples/jms-sample/src/main/webapp/index.html (added)
+++ incubator/openwebbeans/trunk/samples/jms-sample/src/main/webapp/index.html Sun Aug 16
20:09:56 2009
@@ -0,0 +1,21 @@
+<html>
+<!--
+	
+	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.
+-->
+<head>
+  <meta http-equiv="Refresh" content="0; URL=sender.jsf">
+</head>
+</html>
\ No newline at end of file

Propchange: incubator/openwebbeans/trunk/samples/jms-sample/src/main/webapp/index.html
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/openwebbeans/trunk/samples/jms-sample/src/main/webapp/receiver.xhtml
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/samples/jms-sample/src/main/webapp/receiver.xhtml?rev=804757&view=auto
==============================================================================
--- incubator/openwebbeans/trunk/samples/jms-sample/src/main/webapp/receiver.xhtml (added)
+++ incubator/openwebbeans/trunk/samples/jms-sample/src/main/webapp/receiver.xhtml Sun Aug
16 20:09:56 2009
@@ -0,0 +1,79 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!--
+	
+	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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml"
+    xmlns:f="http://java.sun.com/jsf/core"
+    xmlns:h="http://java.sun.com/jsf/html"
+    xmlns:ui="http://java.sun.com/jsf/facelets">
+
+<head>
+  <title>OpenWebBeans :: Examples :: JMS Sample :: Receiver</title>
+</head>
+
+<body>
+  
+  <div id="container">
+    <div id="content">
+		<h:messages globalOnly="false" showSummary="true" infoStyle="font-weight:bold;"></h:messages>
+		
+		<h:form id="form">
+						
+			<div style="border:1px solid black;margin: 25px 75px;">
+				
+				<h2 style="color:red;font-weight:bold;font-size:14px">Register Listener</h2>
+				
+				<h:panelGrid columns="2" cellpadding="5">										
+					<h:commandButton action="#{receiver.startReceive}" value="Register JMSListener" disabled="#{receiver.receive}"/>
+					<h:commandButton action="#{receiver.refresh}" value="Refresh Recieved Message List"/>
+				</h:panelGrid>
+				
+			</div>
+			
+			<div style="border:1px solid black;margin: 25px 75px;">
+				
+				<h2 style="color:red;font-weight:bold;font-size:14px">Last Message Content</h2>
+			
+				<h:outputText value="JMS Last Message : " style="color:red;font-weight:bold;font-size:14px;"></h:outputText>
				
+				<h:outputText value="#{receiver.message}"/>
+			</div>										
+			
+			<div style="border:1px solid black;margin: 25px 75px;">
+			
+				<h2 style="color:red;font-weight:bold;font-size:14px">JMS Received Message List</h2>
													
+				
+				<h:dataTable value="#{receiver.messages}" var="data">
+				
+					<h:column>
+						<f:facet name="header">
+							<h:outputText value="Message Content" />
+						</f:facet>
+						
+						<h:outputText value="#{data}" />
+						
+					</h:column>						
+				
+				</h:dataTable>
+					
+			</div>
+			
+			
+		</h:form>
+	    </div>
+    
+  </div>
+</body>
+</html>
\ No newline at end of file

Propchange: incubator/openwebbeans/trunk/samples/jms-sample/src/main/webapp/receiver.xhtml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/openwebbeans/trunk/samples/jms-sample/src/main/webapp/sender.xhtml
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/samples/jms-sample/src/main/webapp/sender.xhtml?rev=804757&view=auto
==============================================================================
--- incubator/openwebbeans/trunk/samples/jms-sample/src/main/webapp/sender.xhtml (added)
+++ incubator/openwebbeans/trunk/samples/jms-sample/src/main/webapp/sender.xhtml Sun Aug 16
20:09:56 2009
@@ -0,0 +1,53 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!--
+	
+	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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml"
+    xmlns:f="http://java.sun.com/jsf/core"
+    xmlns:h="http://java.sun.com/jsf/html"
+    xmlns:ui="http://java.sun.com/jsf/facelets">
+
+<head>
+  <title>OpenWebBeans :: Examples :: JMS Sample :: Sender</title>
+</head>
+
+<body>
+  
+  <div id="container">
+    <div id="content">
+		<h:messages globalOnly="false" showSummary="true" infoStyle="font-weight:bold;"></h:messages>
+		
+		<h:form id="form">
+						
+			<div style="border:1px solid black;margin: 25px 75px;">
+			
+				<h:panelGrid columns="2">
+					
+					<h:outputLabel for="text">
+						<h:outputText value="JMS Send Message Text : "></h:outputText>
+					</h:outputLabel>
+					<h:inputText id="text" value="#{sender.text}" required="true" requiredMessage="Please
give a JMS Message text!"></h:inputText>
+										
+					<h:commandButton action="#{sender.addMessage}" value="Send Message to a Queue"></h:commandButton>
+					
+				</h:panelGrid>
+			</div>
+		</h:form>
+	    </div>
+    
+  </div>
+</body>
+</html>
\ No newline at end of file

Propchange: incubator/openwebbeans/trunk/samples/jms-sample/src/main/webapp/sender.xhtml
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message