Test the exception propagation from the server side to the client side : click here
-(exception servlet)
-
-
-
-
-
-
- Sample is OK.
-
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/etc/resources/web/jsp/checkRsp.jsp b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/etc/resources/web/jsp/checkRsp.jsp
deleted file mode 100644
index 33b3d2578ad0e8ce2c25e98b2fcc4283114c6aa4..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/etc/resources/web/jsp/checkRsp.jsp
+++ /dev/null
@@ -1,22 +0,0 @@
-<%@ page session="false" %>
-<%
-Cookie[] cookies = request.getCookies();
-HttpSession session = request.getSession(false);
-%>
-
-
Check session
-
-
check Servlet output
-<%= (session != null ? "
Logged in.
Session ID: " + session.getId() + "
" : "
No session.
") %>
-<%
- if ( cookies != null)
- for (int i=0; i < cookies.length;i++)
- out.println(cookies[i].getName()+ ": " + cookies[i].getValue() + " ");
-%>
- <%=request.getAttribute("sessionCheckInfo")%>
->go to session,
-<% if (session != null) out.println("logout, ");%>
->check session,
->home.
- Sample is OK.
-
\ No newline at end of file
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/etc/resources/web/jsp/exceptionRsp.jsp b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/etc/resources/web/jsp/exceptionRsp.jsp
deleted file mode 100644
index 7b41603aa4ec39f088fc93259cf528ead306e8a7..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/etc/resources/web/jsp/exceptionRsp.jsp
+++ /dev/null
@@ -1,13 +0,0 @@
-<%@ page session="false" %>
-
-
-<%
-if (cookies != null) {
- for (int i=0; i < cookies.length;i++)
- out.println(cookies[i].getName()+ ": " + cookies[i].getValue() + " ");
- out.println(" If present, the JSESSIONID cookie will be obsoleted. ");
-} else {
- out.println("None.");
-}
-%>
-
-
->go to session,
->check session,
->home.
- Sample is OK.
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/etc/resources/web/jsp/sessionRsp.jsp b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/etc/resources/web/jsp/sessionRsp.jsp
deleted file mode 100644
index b89e30857399e5c5e07154f5a6a0c7719956f8e4..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/etc/resources/web/jsp/sessionRsp.jsp
+++ /dev/null
@@ -1,50 +0,0 @@
-<%@ page import="java.util.Enumeration" %>
-<%@ page import="java.util.Date" %>
-<%@ page import="javax.ejb.Handle" %>
-<%@ page import="org.ow2.jonas.examples.cluster.j2ee14.beans.samplecluster2.*" %>
-<%@ page import="javax.rmi.PortableRemoteObject" %>
-<%
- Date dc = new Date(session.getCreationTime());
- Date da = new Date(session.getLastAccessedTime());
-%>
-
SessionServlet Output
-
-
SessionServlet Output
-
getRequestURL <%=request.getRequestURL()%>
- for the <%=session.getAttribute("sessiontest.counter")%> times.
-from <%=request.getRemoteAddr()%>(user is <%=request.getRemoteUser()%>)
-To server <%=request.getServerName()%> on port <%=request.getServerPort()%>.
-
-
Request path:
-Servlet executed on JOnAS instance (<%=request.getAttribute("jonas.WEB.served.by")%>)
-Stateless EJB executed on JOnAS instance (<%=request.getAttribute("jonas.EJB.served.by")%>)
-
-
-Sample is OK.
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/etc/xml/ejb-jar.xml b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/etc/xml/ejb-jar.xml
deleted file mode 100644
index 85203bcc0979c111050733ee522dbf65df3cfdfe..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/etc/xml/ejb-jar.xml
+++ /dev/null
@@ -1,136 +0,0 @@
-
-
-
-
- Describe here the content of this file
- MyEjb1
-
-
-
-
- Describe here the session bean MyEjb1
-
- MyEjb1/MyEjb1SLR
- MyEjb1SLR
- org.ow2.jonas.examples.cluster.j2ee14.beans.samplecluster2.MyEjb1Home
- org.ow2.jonas.examples.cluster.j2ee14.beans.samplecluster2.MyEjb1
-
- org.ow2.jonas.examples.cluster.j2ee14.beans.samplecluster2.MyEjb1SLR
-
- Stateless
- Container
-
-
-
-
- Describe here the session bean MyStateful
-
- ejbs/MyStatefulSFR
- MyStatefulSFR
- org.ow2.jonas.examples.cluster.j2ee14.beans.samplecluster2.MyStatefulHome
- org.ow2.jonas.examples.cluster.j2ee14.beans.samplecluster2.MyStateful
-
- org.ow2.jonas.examples.cluster.j2ee14.beans.samplecluster2.MyStatefulSFR
-
- Stateful
- Container
-
-
-
-
- Describe here the session bean MyStateful
-
- ejbs/MyStatefulInner
- MyStatefulInner
-
- org.ow2.jonas.examples.cluster.j2ee14.beans.samplecluster2.MyStatefulInnerLocalHome
-
-
- org.ow2.jonas.examples.cluster.j2ee14.beans.samplecluster2.MyStatefulInnerLocal
-
-
- org.ow2.jonas.examples.cluster.j2ee14.beans.samplecluster2.MyStatefulInner
-
- Stateful
- Container
-
-
-
- Describe here the entity bean
-
- MyEntitySLR
-
- org.ow2.jonas.examples.cluster.j2ee14.beans.samplecluster2.MyEntityHome
-
-
- org.ow2.jonas.examples.cluster.j2ee14.beans.samplecluster2.MyEntityRemote
-
-
- org.ow2.jonas.examples.cluster.j2ee14.beans.samplecluster2.MyEntityLocalHome
-
-
- org.ow2.jonas.examples.cluster.j2ee14.beans.samplecluster2.MyEntityLocal
-
-
- org.ow2.jonas.examples.cluster.j2ee14.beans.samplecluster2.MyEntitySLR
-
- Container
- java.lang.Object
- false
- 2.x
- ClusterSchema
-
- number
-
-
- jOnASName
-
-
-
-
-
-
-
-
-
-
-
-
-
- MyEjb1SLR
- *
-
- Required
-
-
-
-
- MyStatefulSFR
- *
-
- Required
-
-
-
-
- MyStatefulInner
- *
-
- Required
-
-
-
-
- MyEntitySLR
- *
-
- Required
-
-
-
-
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/etc/xml/jonas-ejb-jar.ha.xml b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/etc/xml/jonas-ejb-jar.ha.xml
deleted file mode 100644
index 1da14e094ebba6353bd6f5dac7f17b1db02bbc6a..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/etc/xml/jonas-ejb-jar.ha.xml
+++ /dev/null
@@ -1,86 +0,0 @@
-
-
-
-
-
-
- MyEjb1SLR
- MyEjb1Home
- 3
- true
-
- jonas-cluster
- org.ow2.cmi.lb.policy.RoundRobin
- org.ow2.cmi.lb.strategy.LocalPreference
-
-
-
-
- true
-
-
- java.util.LinkedList
- java.util.ArrayList
-
-
- http://carol.ow2.org
-
-
-
- 10
- 15
- 2000
-
-
-
-
-
- MyStatefulSFR
- MyStatefulHome
- true
-
- jonas-cluster
- org.ow2.cmi.lb.policy.RoundRobin
- org.ow2.cmi.lb.strategy.LocalPreference
-
- 10
- 15
- 2000
-
-
- isModified
-
-
-
- MyStatefulInner
- MyStatefulInnerHome
- true
- isModified
-
-
-
- MyEntitySLR
- MyEntityHome
- true
-
- jonas-cluster
- org.ow2.cmi.lb.policy.RoundRobin
- org.ow2.cmi.lb.strategy.LocalPreference
-
- 10
- 15
- 2000
-
-
- true
-
- jdbc_1
-
- database
-
-
-
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/etc/xml/jonas-ejb-jar.lb.xml b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/etc/xml/jonas-ejb-jar.lb.xml
deleted file mode 100644
index d1da697f1f03ba194a01db2a7c2b216beb2965e4..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/etc/xml/jonas-ejb-jar.lb.xml
+++ /dev/null
@@ -1,96 +0,0 @@
-
-
-
-
-
-
- MyEjb1SLR
- MyEjb1Home
- 3
-
- jonas-cluster
- org.ow2.cmi.lb.policy.RoundRobin
- org.ow2.cmi.lb.strategy.LocalPreference
-
-
-
-
- true
-
-
- java.util.LinkedList
- java.util.ArrayList
-
-
- http://carol.ow2.org
-
-
-
- 10
- 15
- 2000
-
-
-
-
-
- MyStatefulSFR
- MyStatefulHome
-
- jonas-cluster
- org.ow2.cmi.lb.policy.RoundRobin
- org.ow2.cmi.lb.strategy.LocalPreference
-
-
-
-
- true
-
-
- java.util.LinkedList
- java.util.ArrayList
-
-
- http://carol.ow2.org
-
-
-
- 10
- 15
- 2000
-
-
- isModified
-
-
-
- MyStatefulInner
- MyStatefulInnerHome
- isModified
-
-
-
- MyEntitySLR
- MyEntityHome
-
- jonas-cluster
- org.ow2.cmi.lb.policy.RoundRobin
- org.ow2.cmi.lb.strategy.LocalPreference
-
- 10
- 15
- 2000
-
-
- true
-
- jdbc_1
-
- database
-
-
-
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/etc/xml/jonas-ejb-jar.xml b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/etc/xml/jonas-ejb-jar.xml
deleted file mode 100644
index d1da697f1f03ba194a01db2a7c2b216beb2965e4..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/etc/xml/jonas-ejb-jar.xml
+++ /dev/null
@@ -1,96 +0,0 @@
-
-
-
-
-
-
- MyEjb1SLR
- MyEjb1Home
- 3
-
- jonas-cluster
- org.ow2.cmi.lb.policy.RoundRobin
- org.ow2.cmi.lb.strategy.LocalPreference
-
-
-
-
- true
-
-
- java.util.LinkedList
- java.util.ArrayList
-
-
- http://carol.ow2.org
-
-
-
- 10
- 15
- 2000
-
-
-
-
-
- MyStatefulSFR
- MyStatefulHome
-
- jonas-cluster
- org.ow2.cmi.lb.policy.RoundRobin
- org.ow2.cmi.lb.strategy.LocalPreference
-
-
-
-
- true
-
-
- java.util.LinkedList
- java.util.ArrayList
-
-
- http://carol.ow2.org
-
-
-
- 10
- 15
- 2000
-
-
- isModified
-
-
-
- MyStatefulInner
- MyStatefulInnerHome
- isModified
-
-
-
- MyEntitySLR
- MyEntityHome
-
- jonas-cluster
- org.ow2.cmi.lb.policy.RoundRobin
- org.ow2.cmi.lb.strategy.LocalPreference
-
- 10
- 15
- 2000
-
-
- true
-
- jdbc_1
-
- database
-
-
-
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/etc/xml/transaction/ejb-jar.xml b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/etc/xml/transaction/ejb-jar.xml
deleted file mode 100644
index 9c34ef41b2813d3bbdf4fd4538c7587ebb9f3f37..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/etc/xml/transaction/ejb-jar.xml
+++ /dev/null
@@ -1,60 +0,0 @@
-
-
-
-
- Describe here the content of this file
- HaTransaction
-
-
-
- Describe here the entity bean
-
- HaTransactionSLR
-
- org.ow2.jonas.examples.cluster.j2ee14.beans.hatransactions.HaTransactionHome
-
-
- org.ow2.jonas.examples.cluster.j2ee14.beans.hatransactions.HaTransactionRemote
-
-
- org.ow2.jonas.examples.cluster.j2ee14.beans.hatransactions.HaTransactionLocalHome
-
-
- org.ow2.jonas.examples.cluster.j2ee14.beans.hatransactions.HaTransactionLocal
-
-
- org.ow2.jonas.examples.cluster.j2ee14.beans.hatransactions.HaTransactionSLR
-
- Container
- java.lang.String
- false
- 2.x
- HaTransaction
-
- txid
-
- txid
-
-
-
-
-
-
-
-
-
-
-
- HaTransactionSLR
- *
-
- Required
-
-
-
-
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/etc/xml/transaction/jonas-ejb-jar.xml b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/etc/xml/transaction/jonas-ejb-jar.xml
deleted file mode 100644
index 0ca371be20eed3a5f83029599ec43ad09d1c4f11..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/etc/xml/transaction/jonas-ejb-jar.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
-
-
-
-
- HaTransactionSLR
- HaTransactionHome
- false
- true
-
- jonas-cluster
- org.ow2.cmi.lb.policy.RoundRobin
- org.ow2.cmi.lb.strategy.LocalPreference
-
- 10
- 15
- 2000
-
-
-
- jdbc_1
- ha_transactions
-
- txid
- txid
- varchar(60)
-
-
- database
-
-
-
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/example-config/tomcat6-jk.conf b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/example-config/tomcat6-jk.conf
deleted file mode 100644
index 5c3e02fdf3fd7c9c730f94a921d799fd9885124f..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/example-config/tomcat6-jk.conf
+++ /dev/null
@@ -1,23 +0,0 @@
-
-LoadModule jk_module modules/mod_jk.so
-# Location of the worker file
-JkWorkersFile conf/jk\workers.properties
-# Location of the log file
-JkLogFile conf/jk\mod_jk.log
-# Log level : debug, info, error or emerg
-JkLogLevel emerg
-# Shared Memory Filename ( Only for Unix platform ) required by loadbalancer
-JkShmFile conf/jk\jk.shm
-# Assign specific URL to Tomcat workers
-JkMount /sampleCluster2 loadbalancer
-JkMount /sampleCluster2/* loadbalancer
-# A mount point to the status worker
-JkMount /jkmanager jkstatus
-JkMount /jkmanager/* jkstatus
-# Enable the Jk manager access only from localhost
-
- JkMount jkstatus
- Order deny,allow
- Deny from all
- Allow from 127.0.0.1
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/example-config/tomcat6-mod_jk.xml b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/example-config/tomcat6-mod_jk.xml
deleted file mode 100644
index c1060a8ca7c6ede6ec40a1c750977a4b658b48c0..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/example-config/tomcat6-mod_jk.xml
+++ /dev/null
@@ -1,184 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/example-config/workers.properties b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/example-config/workers.properties
deleted file mode 100644
index 9738a3a7773a3ccaa25e7676c75af43e06e883bb..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/example-config/workers.properties
+++ /dev/null
@@ -1,42 +0,0 @@
-
-# -----------------------
-# List the workers name
-# -----------------------
-worker.list=loadbalancer,jkstatus
-
-# -----------------------
-# worker1
-# -----------------------
-worker.worker1.port=9010
-worker.worker1.host=localhost
-worker.worker1.type=ajp13
-# Load balance factor
-worker.worker1.lbfactor=1
-# Define prefered failover node for worker1
-#worker.worker1.redirect=worker2
-# Disable worker1 for all requests except failover
-#worker.worker1.disabled=True
-
-# -----------------------
-# worker2
-# -----------------------
-worker.worker2.port=9011
-worker.worker2.host=localhost
-worker.worker2.type=ajp13
-# Load balance factor
-worker.worker2.lbfactor=1
-# Define prefered failover node for worker2
-#worker.worker2.redirect=worker2
-# Disable worker2 for all requests except failover
-#worker.worker2.disabled=True
-
-# -----------------------
-# Load Balancer worker
-# -----------------------
-worker.loadbalancer.type=lb
-worker.loadbalancer.balanced_workers=worker1,worker2
-worker.loadbalancer.sticky_session=false
-# -----------------------
-# jkstatus worker
-# -----------------------
-worker.jkstatus.type=status
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/application.xml b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/application.xml
deleted file mode 100644
index bbe4092921aa87f351a09bc386c0f111e2d5528e..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/application.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
- clusterapp-ear
- J2EE Application for a JOnAS Cluster
-
-
- ejbs.jar
-
-
-
-
- sampleCluster2.war
- sampleCluster2
-
-
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/applicationHA.xml b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/applicationHA.xml
deleted file mode 100644
index 685fa77536058e2b8d3898a8924098e174f596df..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/applicationHA.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
- hatransactions-ear
- J2EE Application for a JOnAS Cluster
-
-
- ejbsHA.jar
-
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/build.xml b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/build.xml
deleted file mode 100644
index f9855d713d8dd0deb7a3f44b3e68a9d64b09a3b1..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/build.xml
+++ /dev/null
@@ -1,189 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/beans/hatransactions/HaTransactionHome.java b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/beans/hatransactions/HaTransactionHome.java
deleted file mode 100644
index 331c0abf7bd0a8b480cf3e4af5a1cc8b73cdec82..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/beans/hatransactions/HaTransactionHome.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * JOnAS: Java(TM) Open Application Server
- * Copyright (C) 2005-2006 Bull S.A.S
- * Contact: jonas-team@objectweb.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- *
- * Initial developer(s):
- * --------------------------------------------------------------------------
- * $Id$
- * --------------------------------------------------------------------------
- */
-package org.ow2.jonas.examples.cluster.j2ee14.beans.hatransactions;
-
-/**
- * Local interface for the entity bean
- * @author goebelg
- */
-public interface HaTransactionHome extends javax.ejb.EJBHome {
-
- /**
- * Creation of the entity bean
- * @param txid the primary key
- * @return the entity bean
- * @throws javax.ejb.CreateException if creation fails
- */
- HaTransactionRemote create(String txid) throws javax.ejb.CreateException, java.rmi.RemoteException;
-
- /**
- * Search for a record with the primary key. Indicate the time of the creation as pk.
- * @param primaryKey the primary key to look for
- * @return the entity bean
- * @throws javax.ejb.FinderException if not existing
- */
- HaTransactionRemote findByPrimaryKey(Object primaryKey) throws javax.ejb.FinderException, java.rmi.RemoteException;
-
-}
\ No newline at end of file
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/beans/hatransactions/HaTransactionLocal.java b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/beans/hatransactions/HaTransactionLocal.java
deleted file mode 100644
index 0e8d7e109245552e4111204d26ff9d023f0fac8c..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/beans/hatransactions/HaTransactionLocal.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * JOnAS: Java(TM) Open Application Server
- * Copyright (C) 2005-2006 Bull S.A.S
- * Contact: jonas-team@objectweb.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- *
- * Initial developer(s):
- * --------------------------------------------------------------------------
- * $Id$
- * --------------------------------------------------------------------------
- */
-package org.ow2.jonas.examples.cluster.j2ee14.beans.hatransactions;
-
-/**
- * @author goebelg
- * Local interface for the entity bean
- */
-public interface HaTransactionLocal extends javax.ejb.EJBLocalObject {
-
- /**
- * Get the date formatted as string.
- * @return the date as string
- */
- String getTxid();
-
- /**
- * Set the date formatted as string
- * @param txid the date as string
- */
- void setTxid(String txid);
-
-}
\ No newline at end of file
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/beans/hatransactions/HaTransactionLocalHome.java b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/beans/hatransactions/HaTransactionLocalHome.java
deleted file mode 100644
index 3f5996c22254f4c52a0579c4abe1ee104d218278..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/beans/hatransactions/HaTransactionLocalHome.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * JOnAS: Java(TM) Open Application Server
- * Copyright (C) 2005-2006 Bull S.A.S
- * Contact: jonas-team@objectweb.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- *
- * Initial developer(s):
- * --------------------------------------------------------------------------
- * $Id$
- * --------------------------------------------------------------------------
- */
-package org.ow2.jonas.examples.cluster.j2ee14.beans.hatransactions;
-
-/**
- * Local interface for the entity bean
- * @author goebelg
- */
-public interface HaTransactionLocalHome extends javax.ejb.EJBLocalHome {
-
- /**
- * Creation of the entity bean
- * @param number the primary key
- * @return the entity bean
- * @throws javax.ejb.CreateException if creation fails
- */
- HaTransactionLocal create(String number) throws javax.ejb.CreateException;
-
- /**
- * Search for a record with the primary key. Indicate the time of the creation as pk.
- * @param primaryKey the primary key to look for
- * @return the entity bean
- * @throws javax.ejb.FinderException if not existing
- */
- HaTransactionLocal findByPrimaryKey(Object primaryKey) throws javax.ejb.FinderException;
-
-}
\ No newline at end of file
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/beans/hatransactions/HaTransactionRemote.java b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/beans/hatransactions/HaTransactionRemote.java
deleted file mode 100644
index 7ece262a72e628751aef0f063e952ffd8a1fb530..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/beans/hatransactions/HaTransactionRemote.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- * JOnAS: Java(TM) Open Application Server
- * Copyright (C) 2005-2006 Bull S.A.S
- * Contact: jonas-team@objectweb.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- *
- * Initial developer(s):
- * --------------------------------------------------------------------------
- * $Id$
- * --------------------------------------------------------------------------
- */
-package org.ow2.jonas.examples.cluster.j2ee14.beans.hatransactions;
-
-import java.rmi.RemoteException;
-
-/**
- * @author goebelg
- * Local interface for the entity bean
- */
-public interface HaTransactionRemote extends javax.ejb.EJBObject {
-
- /**
- * Get the date formatted as string.
- * @return the date as string
- */
- String getTxid() throws RemoteException;
-
- /**
- * Set the date formatted as string
- * @param txid the date as string
- */
- void setTxid(String txid) throws RemoteException;
-}
\ No newline at end of file
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/beans/hatransactions/HaTransactionSLR.java b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/beans/hatransactions/HaTransactionSLR.java
deleted file mode 100644
index 9711d23c0d623d3bc8931ed8a64c0d47b0077244..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/beans/hatransactions/HaTransactionSLR.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/**
- * JOnAS: Java(TM) Open Application Server
- * Copyright (C) 2005-2006 Bull S.A.S
- * Contact: jonas-team@objectweb.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- *
- * Initial developer(s):
- * --------------------------------------------------------------------------
- * $Id$
- * --------------------------------------------------------------------------
- */
-package org.ow2.jonas.examples.cluster.j2ee14.beans.hatransactions;
-
-import javax.ejb.CreateException;
-import javax.ejb.EntityContext;
-
-/**
- * Implementation of the entity bean
- * @author goebelg
- */
-public abstract class HaTransactionSLR implements javax.ejb.EntityBean {
-
- /**
- * Creation of the entity bean
- * @param txid the primary key -> date.getTime() as string of creation
- * @return the entity bean
- * @throws CreateException CreateException
- */
- public Object ejbCreate(String txid) throws CreateException {
- setTxid(txid);
- return null;
- }
-
- /**
- * Post create methode invoked after create methode
- * @param number the pk of the entity bean
- */
- public void ejbPostCreate(String txid) {
- }
-
- /**
- * ejbLoad
- */
- public void ejbLoad() {
- }
-
- /**
- * ejbStore
- */
- public void ejbStore() {
- }
-
- /**
- * Activation of the ejb
- */
- public void ejbActivate() {
- }
-
- /**
- * Passivate the ejb
- */
- public void ejbPassivate() {
- }
-
- /**
- * Removes the ejb
- */
- public void ejbRemove() {
- }
-
- /**
- * Set the EntityContext
- * @param ec entity context
- */
- public void setEntityContext(EntityContext ec) {
- }
-
- /**
- * Unsets the EntityContext
- */
- public void unsetEntityContext() {
- }
-
- /**
- * Returns the txid
- * @return The txid
- */
- public abstract String getTxid();
-
- /**
- * Sets the txid
- * @param txid The txid
- */
- public abstract void setTxid(String txid);
-}
\ No newline at end of file
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/beans/samplecluster2/MyEjb1.java b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/beans/samplecluster2/MyEjb1.java
deleted file mode 100644
index ea4e49030d0828a2936530e610b1fa4ea7c3c1cf..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/beans/samplecluster2/MyEjb1.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/**
- * JOnAS: Java(TM) Open Application Server
- * Copyright (C) 2005-2006 Bull S.A.S
- * Contact: jonas-team@objectweb.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- *
- * Initial developer(s):
- * --------------------------------------------------------------------------
- * $Id$
- * --------------------------------------------------------------------------
- */
-
-package org.ow2.jonas.examples.cluster.j2ee14.beans.samplecluster2;
-
-import java.rmi.RemoteException;
-import java.util.Properties;
-
-import javax.ejb.EJBObject;
-
-/**
- * MyEjb1 remote interface
- */
-public interface MyEjb1 extends EJBObject {
-
- /**
- * Access a property stored in the JOnAS instance executing the EJB
- * container.
- * @param prop Name of the property
- * @return The value of the property
- * @throws RemoteException if invocation failed
- */
- String getProperty(String prop) throws RemoteException;
-
- /**
- * Retreive some information of the JOnAS instance executing the EJB
- * container The names of the properties are : EJB server, EJB id, EJB
- * instance calls, EJB total calls - EJB server : name of the JOnAS instance -
- * EJB id : toString() of the MyEjb1 - EJB instance calls : number of calls
- * to this EJB instance - EJB total calls : number of calls to this EJB for
- * all instance of class MyEjb1
- * @return The Properties
- * @throws RemoteException if invocation failed
- */
- Properties getInfoProps() throws RemoteException;
-
- /**
- * Throw a MyException
- * @throws RemoteException remote exception
- * @throws MyException application exception
- */
- void throwMyException() throws RemoteException, MyException;
-
-}
\ No newline at end of file
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/beans/samplecluster2/MyEjb1Home.java b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/beans/samplecluster2/MyEjb1Home.java
deleted file mode 100644
index a89b9f8bcc4040f03e305b1f77ec656eb2531f27..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/beans/samplecluster2/MyEjb1Home.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * JOnAS: Java(TM) Open Application Server
- * Copyright (C) 2005-2006 Bull S.A.S
- * Contact: jonas-team@objectweb.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- *
- * Initial developer(s):
- * --------------------------------------------------------------------------
- * $Id$
- * --------------------------------------------------------------------------
- */
-
-package org.ow2.jonas.examples.cluster.j2ee14.beans.samplecluster2;
-
-import java.rmi.RemoteException;
-
-import javax.ejb.CreateException;
-import javax.ejb.EJBHome;
-
-/**
- * Home interface for the bean MyEjb1
- */
-public interface MyEjb1Home extends EJBHome {
-
- /**
- * Used to create a new EJB
- * @return the new EJB
- * @throws CreateException if creation failed
- * @throws RemoteException if invocation failed
- */
- MyEjb1 create() throws CreateException, RemoteException;
-}
\ No newline at end of file
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/beans/samplecluster2/MyEjb1SLR.java b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/beans/samplecluster2/MyEjb1SLR.java
deleted file mode 100644
index dd2dc8450a2f67319752bebab823e64dce12b209..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/beans/samplecluster2/MyEjb1SLR.java
+++ /dev/null
@@ -1,219 +0,0 @@
-/**
- * JOnAS: Java(TM) Open Application Server
- * Copyright (C) 2005-2006 Bull S.A.S
- * Contact: jonas-team@objectweb.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- *
- * --------------------------------------------------------------------------
- * $Id$
- * --------------------------------------------------------------------------
- */
-
-package org.ow2.jonas.examples.cluster.j2ee14.beans.samplecluster2;
-
-import java.util.Date;
-import java.util.Properties;
-
-import javax.ejb.CreateException;
-import javax.ejb.SessionBean;
-import javax.ejb.SessionContext;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-
-import org.ow2.jonas.lib.bootstrap.JProp;
-import org.ow2.jonas.lib.util.Log;
-
-import org.objectweb.util.monolog.api.BasicLevel;
-import org.objectweb.util.monolog.api.Logger;
-
-/**
- * @author goebelg
- * Implementation of a stateless session bean
- */
-public class MyEjb1SLR implements SessionBean {
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
-
-
- /**
- * After how many invokes an entity bean is created
- */
- private static final int DIV = 10;
- /**
- * Sets the session Context
- * @param ctx the session context
- */
- public void setSessionContext(SessionContext ctx) {
- if (logger == null) {
- logger = Log.getLogger("org.ow2.jonas_tests");
- }
- logger.log(BasicLevel.DEBUG, "");
- }
-
- /**
- * removes the ejb
- */
- public void ejbRemove() {
- logger.log(BasicLevel.DEBUG, "");
- }
-
- /**
- * creates the ejb
- */
- public void ejbCreate() {
-
- logger.log(BasicLevel.DEBUG, "");
- jonasInstanceName = "unknown";
-
- try {
- JProp jp = JProp.getInstance();
- jonasInstanceName = jp.getValue("jonas.name");
- } catch (Exception e) {
- logger.log(BasicLevel.FATAL, "Error while creating MyEjb1SLR : " + e.getMessage());
- }
-
- logger.log(BasicLevel.DEBUG, "ejbCreate()->" + this.toString());
- }
-
- /**
- * Passivate of the ejb
- */
- public void ejbPassivate() {
- logger.log(BasicLevel.DEBUG, "");
- }
-
- /**
- * Activation of the ejb
- */
- public void ejbActivate() {
- logger.log(BasicLevel.DEBUG, "");
- }
-
- /**
- * Access a property stored in the JOnAS instance executing the EJB
- * container.
- * @param prop Name of the property
- * @return The value of the property
- */
- public String getProperty(String prop) {
- String s = "unknown";
- try {
- JProp jp = JProp.getInstance();
- s = jp.getValue(prop);
- } catch (Exception e) {
- logger.log(BasicLevel.FATAL, "Error while getProperty : " + e.getMessage());
- }
- return s;
- }
-
- /**
- * Throw a MyException
- * @throws MyException application exception
- */
- public void throwMyException() throws MyException {
- throw new MyException("From EjbSLR1(" + jonasInstanceName + ")");
- }
-
- /**
- * Retreive some information of the JOnAS instance executing the EJB
- * container The names of the properties are : EJB server, EJB id, EJB
- * instance calls, EJB total calls - EJB server : name of the JOnAS instance -
- * EJB id : toString() of the MyEjb1 - EJB instance calls : number of calls
- * to this EJB instance - EJB total calls : number of calls to this EJB for
- * all instance of class MyEjb1
- * @return The Properties
- */
- public Properties getInfoProps() {
- updateStatistics();
- Properties p = new Properties();
- p.setProperty("EJB server", jonasInstanceName);
- p.setProperty("EJB id", this.toString());
- p.setProperty("EJB total calls", (new Integer(allInstancesTotalCallsCount)).toString());
- p.setProperty("EJB server entity created", entityJonasInstanceName);
- return p;
- }
-
- /**
- * Updates the properties described above
- */
- private void updateStatistics() {
- allInstancesTotalCallsCount++;
-
- // create an entity bean every 10 times
- if ((allInstancesTotalCallsCount % DIV) == 0) {
- // creating a new entity bean
- logger.log(BasicLevel.INFO, "Trying to create the entity");
- Date date = new Date();
- MyEntityLocal entity = createEntity(Long.toString(date.getTime()));
- logger.log(BasicLevel.INFO, "Finished to create the entity");
- entityJonasInstanceName = entity.getJOnASName();
- } else {
- entityJonasInstanceName = "No entity Bean created";
- }
-
- logger.log(BasicLevel.INFO, "JOnAS=" + jonasInstanceName + " ; ejb=" + this.toString() + " ; total calls="
- + allInstancesTotalCallsCount + " ; entity created on=" + entityJonasInstanceName);
- }
-
- /**
- * Creates a new Entity bean with the time as parameter
- * @param valeur The current time as string
- * @return A new Entity Bean
- */
- private MyEntityLocal createEntity(String valeur) {
- InitialContext cntx;
- MyEntityLocal result = null;
- try {
- cntx = new InitialContext();
- MyEntityLocalHome entityHome = (MyEntityLocalHome) cntx.lookup("MyEntityHome_L");
- result = entityHome.create(valeur);
- } catch (NamingException e) {
- logger.log(BasicLevel.FATAL, "Naming exception : " + e.getMessage());
- } catch (CreateException e) {
- logger.log(BasicLevel.FATAL, "Create exception : " + e.getMessage());
- }
- return result;
- }
-
- /**
- * The logger
- */
- private static Logger logger = null;
-
-
- /**
- * the node name of the jonas instance where an
- * entity bean has bean created
- */
- private String entityJonasInstanceName = "unknown";
-
- /**
- * the node name of the jonas instance where the
- * session bean is executed
- */
- private String jonasInstanceName = "unknown";
-
- /**
- * counts all the instances created of this class in
- * that JVM
- */
- private static int allInstancesTotalCallsCount = 0;
-}
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/beans/samplecluster2/MyEntityHome.java b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/beans/samplecluster2/MyEntityHome.java
deleted file mode 100644
index 20274b6d2a2e30c384c11745f7ddecc935fd3e2d..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/beans/samplecluster2/MyEntityHome.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * JOnAS: Java(TM) Open Application Server
- * Copyright (C) 2005-2006 Bull S.A.S
- * Contact: jonas-team@objectweb.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- *
- * Initial developer(s):
- * --------------------------------------------------------------------------
- * $Id$
- * --------------------------------------------------------------------------
- */
-package org.ow2.jonas.examples.cluster.j2ee14.beans.samplecluster2;
-
-/**
- * Local interface for the entity bean
- * @author goebelg
- */
-public interface MyEntityHome extends javax.ejb.EJBHome {
-
- /**
- * Creation of the entity bean
- * @param number the primary key -> date.getTime() as string of creation
- * @return the entity bean
- * @throws javax.ejb.CreateException if creation fails
- */
- MyEntityRemote create(String number) throws javax.ejb.CreateException, java.rmi.RemoteException;
-
- /**
- * Search for a record with the primary key. Indicate the time of the creation as pk.
- * @param primaryKey the primary key to look for
- * @return the entity bean
- * @throws javax.ejb.FinderException if not existing
- */
- MyEntityRemote findByPrimaryKey(Object primaryKey) throws javax.ejb.FinderException, java.rmi.RemoteException;
-
-}
\ No newline at end of file
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/beans/samplecluster2/MyEntityLocal.java b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/beans/samplecluster2/MyEntityLocal.java
deleted file mode 100644
index 57c31c3272b3405a0ac69525904731e983d09562..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/beans/samplecluster2/MyEntityLocal.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * JOnAS: Java(TM) Open Application Server
- * Copyright (C) 2005-2006 Bull S.A.S
- * Contact: jonas-team@objectweb.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- *
- * Initial developer(s):
- * --------------------------------------------------------------------------
- * $Id$
- * --------------------------------------------------------------------------
- */
-package org.ow2.jonas.examples.cluster.j2ee14.beans.samplecluster2;
-
-/**
- * @author goebelg
- * Local interface for the entity bean
- */
-public interface MyEntityLocal extends javax.ejb.EJBLocalObject {
-
- /**
- * Get the date formatted as string.
- * @return the date as string
- */
- String getNumber();
-
- /**
- * Set the date formatted as string
- * @param number the date as string
- */
- void setNumber(String number);
-
- /**
- * The JOnAS node name where the entity bean is created
- * @return JOnAS node name
- */
- String getJOnASName();
-
- /**
- * Get the JOnAS node name of the entity bean
- * @param number JOnAS node name
- */
- void setJOnASName(String name);
-}
\ No newline at end of file
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/beans/samplecluster2/MyEntityLocalHome.java b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/beans/samplecluster2/MyEntityLocalHome.java
deleted file mode 100644
index 5c27e0e38c0e65b02c0f9d2ea59c4d7f9ab34614..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/beans/samplecluster2/MyEntityLocalHome.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * JOnAS: Java(TM) Open Application Server
- * Copyright (C) 2005-2006 Bull S.A.S
- * Contact: jonas-team@objectweb.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- *
- * Initial developer(s):
- * --------------------------------------------------------------------------
- * $Id$
- * --------------------------------------------------------------------------
- */
-package org.ow2.jonas.examples.cluster.j2ee14.beans.samplecluster2;
-
-/**
- * Local interface for the entity bean
- * @author goebelg
- */
-public interface MyEntityLocalHome extends javax.ejb.EJBLocalHome {
-
- /**
- * Creation of the entity bean
- * @param number the primary key -> date.getTime() as string of creation
- * @return the entity bean
- * @throws javax.ejb.CreateException if creation fails
- */
- MyEntityLocal create(String number) throws javax.ejb.CreateException;
-
- /**
- * Search for a record with the primary key. Indicate the time of the creation as pk.
- * @param primaryKey the primary key to look for
- * @return the entity bean
- * @throws javax.ejb.FinderException if not existing
- */
- MyEntityLocal findByPrimaryKey(Object primaryKey) throws javax.ejb.FinderException;
-
-}
\ No newline at end of file
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/beans/samplecluster2/MyEntityRemote.java b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/beans/samplecluster2/MyEntityRemote.java
deleted file mode 100644
index 10dc9d59c8d201f94deeea81473c9d226e6d94e0..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/beans/samplecluster2/MyEntityRemote.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * JOnAS: Java(TM) Open Application Server
- * Copyright (C) 2005-2006 Bull S.A.S
- * Contact: jonas-team@objectweb.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- *
- * Initial developer(s):
- * --------------------------------------------------------------------------
- * $Id$
- * --------------------------------------------------------------------------
- */
-package org.ow2.jonas.examples.cluster.j2ee14.beans.samplecluster2;
-
-import java.rmi.RemoteException;
-
-/**
- * @author goebelg
- * Local interface for the entity bean
- */
-public interface MyEntityRemote extends javax.ejb.EJBObject {
-
- /**
- * Get the date formatted as string.
- * @return the date as string
- */
- String getNumber() throws RemoteException;
-
- /**
- * Set the date formatted as string
- * @param number the date as string
- */
- void setNumber(String number) throws RemoteException;
-
- /**
- * The JOnAS node name where the entity bean is created
- * @return JOnAS node name
- */
- String getJOnASName() throws RemoteException;
-
- /**
- * Get the JOnAS node name of the entity bean
- * @param number JOnAS node name
- */
- void setJOnASName(String name) throws RemoteException;
-}
\ No newline at end of file
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/beans/samplecluster2/MyEntitySLR.java b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/beans/samplecluster2/MyEntitySLR.java
deleted file mode 100644
index dcabdb34e7261f9224c38036e79367f3ddcb9bd4..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/beans/samplecluster2/MyEntitySLR.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/**
- * JOnAS: Java(TM) Open Application Server
- * Copyright (C) 2005-2006 Bull S.A.S
- * Contact: jonas-team@objectweb.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- *
- * Initial developer(s):
- * --------------------------------------------------------------------------
- * $Id$
- * --------------------------------------------------------------------------
- */
-package org.ow2.jonas.examples.cluster.j2ee14.beans.samplecluster2;
-
-import javax.ejb.CreateException;
-import javax.ejb.EntityContext;
-
-import org.ow2.jonas.lib.bootstrap.JProp;
-
-/**
- * Implementation of the entity bean
- * @author goebelg
- */
-public abstract class MyEntitySLR implements javax.ejb.EntityBean {
-
- /**
- * The JOnAS instance name where the bean is executed
- */
- private String jonasInstanceName = "unknown";
-
- /**
- * Creation of the entity bean
- * @param number the primary key -> date.getTime() as string of creation
- * @return the entity bean
- * @throws CreateException CreateException
- */
- public Object ejbCreate(String number) throws CreateException {
-
- jonasInstanceName = "unknown";
-
- try {
- JProp jp = JProp.getInstance();
- jonasInstanceName = jp.getValue("jonas.name");
- } catch (Exception e) {
- System.out.println("Error while creating ejb : " + e.getMessage());
- }
-
- setNumber(number);
- setJOnASName(jonasInstanceName);
- return null;
- }
-
- /**
- * Post create methode invoked after create methode
- * @param number the pk of the entity bean
- */
- public void ejbPostCreate(String number) {
- }
-
- /**
- * ejbLoad
- */
- public void ejbLoad() {
- }
-
- /**
- * ejbStore
- */
- public void ejbStore() {
- }
-
- /**
- * Activation of the ejb
- */
- public void ejbActivate() {
- }
-
- /**
- * Passivate the ejb
- */
- public void ejbPassivate() {
- }
-
- /**
- * Removes the ejb
- */
- public void ejbRemove() {
- }
-
- /**
- * Set the EntityContext
- * @param ec entity context
- */
- public void setEntityContext(EntityContext ec) {
- }
-
- /**
- * Unsets the EntityContext
- */
- public void unsetEntityContext() {
- }
-
- /**
- * Returns the time when the bean was created
- * @return The time when the bean was created
- */
- public abstract String getNumber();
-
- /**
- * Sets the time when the bean was created
- * @param number The time when the bean was created
- */
- public abstract void setNumber(String number);
-
- /**
- * Returns the name of the JOnAS instance
- * @return Name of the JOnAS instance where the entity bean was created
- */
- public abstract String getJOnASName();
-
- /**
- * sets the name of the JOnAS instance
- * @param name Name of the JOnAS instance where the entity bean was created
- */
- public abstract void setJOnASName(String name);
-}
\ No newline at end of file
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/beans/samplecluster2/MyException.java b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/beans/samplecluster2/MyException.java
deleted file mode 100644
index b974638aff088abd1773c0a4c282324f40fb156d..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/beans/samplecluster2/MyException.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * JOnAS: Java(TM) Open Application Server
- * Copyright (C) 2006 Bull S.A.S
- * Contact: jonas-team@objectweb.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- *
- * --------------------------------------------------------------------------
- * $Id$
- * --------------------------------------------------------------------------
- */
-
-package org.ow2.jonas.examples.cluster.j2ee14.beans.samplecluster2;
-
-
-/**
- * @author
- * application exception
- */
-public class MyException extends Exception {
-
- /**
- * UID
- */
- private static final long serialVersionUID = 110L;
-
-
- /**
- * Default Constructor
- *
- */
- public MyException() {
- super();
- }
-
- /**
- * Constructor
- * @param msg message associated with the exception
- */
- public MyException(String msg) {
- super(msg);
- }
-
-}
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/beans/samplecluster2/MyStateful.java b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/beans/samplecluster2/MyStateful.java
deleted file mode 100644
index c8f2c5a0b2334ea27504ac28e9fa7ea84b69d580..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/beans/samplecluster2/MyStateful.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/**
- * JOnAS: Java(TM) Open Application Server
- * Copyright (C) 2005-2006 Bull S.A.S
- * Contact: jonas-team@objectweb.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- *
- * Initial developer(s):
- * --------------------------------------------------------------------------
- * $Id$
- * --------------------------------------------------------------------------
- */
-
-package org.ow2.jonas.examples.cluster.j2ee14.beans.samplecluster2;
-
-import java.rmi.RemoteException;
-
-import javax.ejb.EJBObject;
-
-/**
- * MyStateful remote interface
- */
-public interface MyStateful extends EJBObject {
-
- /**
- * Initializes the inner beans
- * @throws RemoteException fi invocation fails
- */
- void initialize() throws RemoteException;
-
- /**
- * Keep the parameter in a list. Note : the parameter represents a line in
- * the "session servlet output" screen
- * @param s The string to keep.
- * @throws RemoteException if invocation fails
- */
- void log(java.lang.String s) throws RemoteException;
-
- /**
- * Keep the parameter in a list keeping track of the JOnAS instance
- * @param s The string to keep.
- * @throws RemoteException if invocation fails
- */
- void logWithJOnASInstance(java.lang.String s) throws RemoteException;
-
- /**
- * Retreive all the data in the log table Note : The return value is the
- * data shown in the "session servlet output" screen
- * @return All the logged data
- * @throws RemoteException if invocation fails
- */
- java.lang.StringBuffer getLogDump() throws RemoteException;
-
- /**
- * Retreive all the data in the log table Note : The return value is the
- * text format (calls from the java client)
- * @return All the logged data
- * @throws RemoteException if invocation fails
- */
- java.lang.StringBuffer getLogTextDump() throws RemoteException;
-
-
- /**
- * Set the http sessionid of the caller.
- * @param s The sessionid of the caller.
- * @throws RemoteException if invocation fails
- */
- void setHTTPSessionId(java.lang.String s) throws RemoteException;
-
- /**
- * Get the stored http sessionid of the caller.
- * @return The stored sessionid.
- * @throws RemoteException if invocation fails
- */
- java.lang.String getHTTPSessionId() throws RemoteException;
-
-}
\ No newline at end of file
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/beans/samplecluster2/MyStatefulHome.java b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/beans/samplecluster2/MyStatefulHome.java
deleted file mode 100644
index cacc4a409c2e62206c9871c39143f8a8110ec034..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/beans/samplecluster2/MyStatefulHome.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * JOnAS: Java(TM) Open Application Server
- * Copyright (C) 2005-2006 Bull S.A.S
- * Contact: jonas-team@objectweb.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- *
- * Initial developer(s):
- * --------------------------------------------------------------------------
- * $Id$
- * --------------------------------------------------------------------------
- */
-
-package org.ow2.jonas.examples.cluster.j2ee14.beans.samplecluster2;
-
-import java.rmi.RemoteException;
-
-import javax.ejb.CreateException;
-import javax.ejb.EJBHome;
-
-/**
- * Home interface for the bean MyStateful
- */
-public interface MyStatefulHome extends EJBHome {
-
- /**
- * Creation of the Stateful session bean
- * @return the stateful session bean
- * @throws CreateException if creation fails
- * @throws RemoteException if invocation fails
- */
- MyStateful create() throws CreateException, RemoteException;
-}
\ No newline at end of file
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/beans/samplecluster2/MyStatefulInner.java b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/beans/samplecluster2/MyStatefulInner.java
deleted file mode 100644
index 6a5802632a7f6cb6e27f36d39481320d5e73c121..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/beans/samplecluster2/MyStatefulInner.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/**
- * JOnAS: Java(TM) Open Application Server
- * Copyright (C) 2005-2006 Bull S.A.S
- * Contact: jonas-team@objectweb.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- *
- * Initial developer(s):
- * --------------------------------------------------------------------------
- * $Id$
- * --------------------------------------------------------------------------
- */
-
-package org.ow2.jonas.examples.cluster.j2ee14.beans.samplecluster2;
-
-
-import javax.ejb.SessionBean;
-import javax.ejb.SessionContext;
-import javax.ejb.SessionSynchronization;
-
-import org.ow2.jonas.lib.util.Log;
-import org.objectweb.util.monolog.api.BasicLevel;
-import org.objectweb.util.monolog.api.Logger;
-
-/**
- *
- */
-public class MyStatefulInner implements SessionBean, SessionSynchronization {
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
-
- /**
- * After the transaction begun
- */
- public void afterBegin() {
- logger.log(BasicLevel.DEBUG, "afterBegin");
- }
-
- /**
- * before the commit is executed
- */
- public void beforeCompletion() {
- logger.log(BasicLevel.DEBUG, "beforeCompletion");
- }
-
- /**
- * after the commit or rollback
- * @param committed true -> commit, false -> rollback
- */
- public void afterCompletion(boolean committed) {
- logger.log(BasicLevel.DEBUG, "afterCompletion: " + committed);
- }
-
- /**
- * Set the session context
- * @param ctx the session context
- */
- public void setSessionContext(SessionContext ctx) {
- if (logger == null) {
- logger = Log.getLogger("org.ow2.jonas_tests");
- }
- logger.log(BasicLevel.DEBUG, "setSessionContext");
- }
-
- /**
- * removes the ejb
- */
- public void ejbRemove() {
- logger.log(BasicLevel.DEBUG, "ejbRemove");
- }
-
- /**
- * creation of the ejb
- */
- public void ejbCreate() {
- logger.log(BasicLevel.DEBUG, "ejbCreate()->" + this.toString());
- }
-
- /**
- * Passivate of the ejb
- */
- public void ejbPassivate() {
- logger.log(BasicLevel.DEBUG, "ejbPassivate");
- }
-
- /**
- * activation of the ejb
- */
- public void ejbActivate() {
- logger.log(BasicLevel.DEBUG, "ejbActivate");
- }
-
- private int count = 0;
-
- private transient boolean isModified = true;
-
- public void increment() {
- count++;
- isModified = true;
- }
-
- public int getCount() {
- return count;
- }
-
- /**
- * The logger
- */
- private static Logger logger = null;
-
- public boolean isModified() {
- boolean result = isModified;
- isModified = false;
-
- return result;
- }
-}
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/beans/samplecluster2/MyStatefulInnerLocal.java b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/beans/samplecluster2/MyStatefulInnerLocal.java
deleted file mode 100644
index 4634af867fabdb6dfbbb0e54ab974e9eb6e19e75..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/beans/samplecluster2/MyStatefulInnerLocal.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- * JOnAS: Java(TM) Open Application Server
- * Copyright (C) 2005-2006 Bull S.A.S
- * Contact: jonas-team@objectweb.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- *
- * Initial developer(s):
- * --------------------------------------------------------------------------
- * $Id$
- * --------------------------------------------------------------------------
- */
-
-package org.ow2.jonas.examples.cluster.j2ee14.beans.samplecluster2;
-
-import javax.ejb.EJBLocalObject;
-
-/**
- * MyStateful local interface
- */
-public interface MyStatefulInnerLocal extends EJBLocalObject {
- void increment();
- int getCount();
-}
\ No newline at end of file
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/beans/samplecluster2/MyStatefulInnerLocalHome.java b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/beans/samplecluster2/MyStatefulInnerLocalHome.java
deleted file mode 100644
index cb238e174c7f3494ab0399405817adf2f87b8cb7..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/beans/samplecluster2/MyStatefulInnerLocalHome.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * JOnAS: Java(TM) Open Application Server
- * Copyright (C) 2005-2006 Bull S.A.S
- * Contact: jonas-team@objectweb.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- *
- * Initial developer(s):
- * --------------------------------------------------------------------------
- * $Id$
- * --------------------------------------------------------------------------
- */
-
-package org.ow2.jonas.examples.cluster.j2ee14.beans.samplecluster2;
-
-import java.rmi.RemoteException;
-
-import javax.ejb.CreateException;
-import javax.ejb.EJBLocalHome;
-
-/**
- * Home interface for the bean MyStateful
- */
-public interface MyStatefulInnerLocalHome extends EJBLocalHome {
-
- /**
- * Creation of the Stateful session bean
- * @return the stateful session bean
- * @throws CreateException if creation fails
- * @throws RemoteException if invocation fails
- */
- MyStatefulInnerLocal create() throws CreateException;
-}
\ No newline at end of file
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/beans/samplecluster2/MyStatefulSFR.java b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/beans/samplecluster2/MyStatefulSFR.java
deleted file mode 100644
index 8df78b53fdfcdf070c2b7acbe9b83466bbd1d0bc..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/beans/samplecluster2/MyStatefulSFR.java
+++ /dev/null
@@ -1,389 +0,0 @@
-/**
- * JOnAS: Java(TM) Open Application Server
- * Copyright (C) 2005-2006 Bull S.A.S
- * Contact: jonas-team@objectweb.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- *
- * Initial developer(s):
- * --------------------------------------------------------------------------
- * $Id$
- * --------------------------------------------------------------------------
- */
-
-package org.ow2.jonas.examples.cluster.j2ee14.beans.samplecluster2;
-
-
-import java.rmi.RemoteException;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.Iterator;
-
-import javax.ejb.CreateException;
-import javax.ejb.SessionBean;
-import javax.ejb.SessionContext;
-import javax.ejb.SessionSynchronization;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-
-import org.ow2.jonas.lib.bootstrap.JProp;
-import org.ow2.jonas.lib.util.Log;
-import org.objectweb.util.monolog.api.BasicLevel;
-import org.objectweb.util.monolog.api.Logger;
-
-/**
- *
- */
-public class MyStatefulSFR implements SessionBean, SessionSynchronization {
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
-
- /**
- * After the transaction begun
- */
- public void afterBegin() {
- logger.log(BasicLevel.DEBUG, "");
- }
-
- /**
- * before the commit is executed
- */
- public void beforeCompletion() {
- logger.log(BasicLevel.DEBUG, "");
- }
-
- /**
- * after the commit or rollback
- * @param committed true -> commit, false -> rollback
- */
- public void afterCompletion(boolean committed) {
- logger.log(BasicLevel.DEBUG, "");
- }
-
- /**
- * Set the session context
- * @param ctx the session context
- */
- public void setSessionContext(SessionContext ctx) {
- if (logger == null) {
- logger = Log.getLogger("org.ow2.jonas_tests");
- }
- logger.log(BasicLevel.DEBUG, "");
- }
-
- /**
- * removes the ejb
- */
- public void ejbRemove() {
- logger.log(BasicLevel.DEBUG, "");
- }
-
- /**
- * creation of the ejb
- */
- public void ejbCreate() {
- logger.log(BasicLevel.DEBUG, "");
- creatorJonasInstanceName = "unknown";
-
- try {
- JProp jp = JProp.getInstance();
- creatorJonasInstanceName = jp.getValue("jonas.name");
- } catch (Exception e) {
- logger.log(BasicLevel.FATAL, e.getMessage());
- }
-
- log = new ArrayList(MAXSIZE);
-
- logger.log(BasicLevel.DEBUG, "ejbCreate()->" + this.toString());
- isModified = true;
- }
-
- /**
- * Passivate of the ejb
- */
- public void ejbPassivate() {
- logger.log(BasicLevel.DEBUG, "");
- }
-
- /**
- * activation of the ejb
- */
- public void ejbActivate() {
- logger.log(BasicLevel.DEBUG, "");
- }
-
- /**
- * Initializes the inner beans
- */
- public void initialize() {
- logger.log(BasicLevel.DEBUG, "");
-
- localStateful = createLocalStateful();
- Date date = new Date();
- localEntity = createEntity(Long.toString(date.getTime()));
- isModified = true;
- }
-
- /**
- * Keep the parameter in a list. Note : the parameter represents a line in
- * the "session servlet output" screen
- * @param s The string to keep.
- * @throws RemoteException
- */
- public void log(java.lang.String s) {
- logger.log(BasicLevel.DEBUG, "");
-
- if (log.size() == MAXSIZE) {
- Iterator iter = log.iterator();
- iter.next();
- iter.remove();
- }
-
- log.add(s);
-
- // Call local stateful
- getLocalStateful().increment();
-
- isModified = true;
- }
-
- /**
- * Keep the parameter in a list with the source node
- * @param s The string to keep.
- * @throws RemoteException
- */
- public void logWithJOnASInstance(java.lang.String s) {
- logger.log(BasicLevel.DEBUG, "");
-
- if (log.size() == MAXSIZE) {
- Iterator iter = log.iterator();
- iter.next();
- iter.remove();
- }
-
- log.add("JOnAS instance=" + creatorJonasInstanceName + " - " + s);
-
- // Call local stateful
- getLocalStateful().increment();
-
- isModified = true;
- }
- /**
- * Retreive all the data in the log table Note : The return value is the
- * data shown in the "session servlet output" screen
- * @return All the logged data
- */
- public java.lang.StringBuffer getLogDump() {
- logger.log(BasicLevel.DEBUG, "");
-
- StringBuffer sb = new StringBuffer();
- sb.append("JOnAS instance=");
- sb.append(creatorJonasInstanceName);
- sb.append(" ; EJB=");
- sb.append(this.toString());
- sb.append("\n");
- sb.append("Owner: ");
- sb.append(callerHTTPSessionId);
- sb.append("\n");
-
- sb.append("Inner count: ");
- sb.append(getLocalStateful().getCount());
- sb.append("\n");
-
- sb.append("Local entity: ");
- sb.append(getLocalEntity().getNumber());
- sb.append("\n");
-
- Iterator iter = log.iterator();
-
- sb.append("
");
-
- logger.log(BasicLevel.INFO, sb.toString());
- return sb;
- }
-
- /**
- * Retreive all the data in the log table Note : The return value is the
- * text format (calls from the java client)
- * @return All the logged data
- */
- public java.lang.StringBuffer getLogTextDump() {
- logger.log(BasicLevel.DEBUG, "");
-
- StringBuffer sb = new StringBuffer();
- sb.append("JOnAS instance=");
- sb.append(creatorJonasInstanceName);
- sb.append(" ; EJB=");
- sb.append(this.toString());
- sb.append("\n");
-
- sb.append("Inner count: ");
- sb.append(getLocalStateful().getCount());
- sb.append("\n");
-
- sb.append("Local entity: ");
- sb.append(getLocalEntity().getNumber());
- sb.append("\n");
-
- Iterator iter = log.iterator();
- int i = 1;
- sb.append("Log entries -> \n");
- while (iter.hasNext()) {
- sb.append(" " + i + " : ");
- sb.append((String) iter.next());
- sb.append("\n");
- i++;
- }
- sb.append("End\n");
-
- logger.log(BasicLevel.INFO, sb.toString());
- return sb;
- }
-
- /**
- * Set the http sessionid of the caller.
- * @param s The sessionid of the caller.
- * @throws RemoteException
- */
- public void setHTTPSessionId(java.lang.String s) {
- logger.log(BasicLevel.DEBUG, "");
- callerHTTPSessionId = s;
-
- isModified = true;
- }
-
- /**
- * Get the stored http sessionid of the caller.
- * @return The stored sessionid.
- * @throws RemoteException
- */
- public java.lang.String getHTTPSessionId() {
- logger.log(BasicLevel.DEBUG, "");
- return callerHTTPSessionId;
- }
-
- /**
- * The JOnAS node name where the bean is executed
- * the field is transient because we don't want to passivate or replicate it
- */
- private transient String creatorJonasInstanceName = "unknown";
-
- /**
- * The logger
- */
- private static Logger logger = null;
-
-
- /**
- * The maximum number of values to conserve
- */
- private static final int MAXSIZE = 20;
-
- /**
- * The log output
- */
- private ArrayList log = null;
-
- /**
- * caller http session id
- */
- private String callerHTTPSessionId = null;
-
- private MyStatefulInnerLocal localStateful = null;
-
- private MyEntityLocal localEntity = null;
-
- private transient boolean isModified = true;
-
- /**
- * Creates a new Entity bean with the time as parameter
- * @param valeur The current time as string
- * @return A new Entity Bean
- */
- private MyStatefulInnerLocal createLocalStateful() {
- InitialContext cntx;
- MyStatefulInnerLocal result = null;
- try {
- cntx = new InitialContext();
- MyStatefulInnerLocalHome statefulHome = (MyStatefulInnerLocalHome) cntx.lookup("MyStatefulInnerHome_L");
- result = statefulHome.create();
- } catch (NamingException e) {
- logger.log(BasicLevel.FATAL, "Naming exception : " + e.getMessage());
- } catch (CreateException e) {
- logger.log(BasicLevel.FATAL, "Create exception : " + e.getMessage());
-}
- return result;
- }
-
- /**
- * Returns the local stateful bean
- * @return the local stateful bean
- */
- private MyStatefulInnerLocal getLocalStateful() {
- if (localStateful == null) {
- localStateful = createLocalStateful();
- isModified = true;
- }
-
- return localStateful;
- }
- /**
- * Creates a new Entity bean with the time as parameter
- * @param valeur The current time as string
- * @return A new Entity Bean
- */
- private MyEntityLocal createEntity(String valeur) {
- InitialContext cntx;
- MyEntityLocal result = null;
- try {
- cntx = new InitialContext();
- MyEntityLocalHome entityHome = (MyEntityLocalHome) cntx.lookup("MyEntityHome_L");
- result = entityHome.create(valeur);
- } catch (NamingException e) {
- logger.log(BasicLevel.FATAL, "Naming exception : " + e.getMessage());
- } catch (CreateException e) {
- logger.log(BasicLevel.FATAL, "Create exception : " + e.getMessage());
- }
- return result;
- }
-
- /**
- * Returns the local entity bean
- * @return the local entity bean
- */
- private MyEntityLocal getLocalEntity() {
- if (localEntity == null) {
- Date date = new Date();
- localEntity = createEntity(Long.toString(date.getTime()));
- isModified = true;
- }
- return localEntity;
- }
-
- public boolean isModified() {
- boolean result = isModified;
- isModified = false;
- return result;
- }
-}
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/client/ClientException.java b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/client/ClientException.java
deleted file mode 100644
index c339d18648d0cd25afff2a26a45c2ca28fa96c94..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/client/ClientException.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/**
- * JOnAS: Java(TM) Open Application Server
- * Copyright (C) 2006 Bull S.A.S
- * Contact: jonas-team@objectweb.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- *
- * Initial developer(s):
- * --------------------------------------------------------------------------
- * $Id$
- * --------------------------------------------------------------------------
- */
-
-package org.ow2.jonas.examples.cluster.j2ee14.client;
-
-import java.util.Properties;
-
-import org.ow2.jonas.examples.cluster.j2ee14.beans.samplecluster2.MyEjb1;
-import org.ow2.jonas.examples.cluster.j2ee14.beans.samplecluster2.MyEjb1Home;
-import org.ow2.jonas.examples.cluster.j2ee14.beans.samplecluster2.MyException;
-
-
-/**
- * Fat client :
- * - get an exception
- */
-public class ClientException {
-
- /**
- * Private constructor for utility class
- *
- */
- private ClientException() {
- }
-
- /**
- * Main method
- * @param args arguments of the client
- */
- public static int main(final String[] args) {
-
- String jonasEJBServer = null;
- String ejbTotalCallsCount = null;
- String ejbEntityCreated = null;
- Properties prop = null;
-
- MyEjb1Home home = ClientUtility.getMyEjb1Home();
- System.out.println("Home retrieved -> " + home);
- MyEjb1 bean = ClientUtility.getMyEjb1Bean(home);
- System.out.println("Bean created -> " + bean);
-
-
- try {
- System.out.println("Throw an exception at the server side");
- bean.throwMyException();
- } catch (MyException e) {
- System.out.println("MyException caught : " + e);
- } catch (Exception e) {
- System.out.println("Exception caught : " + e);
- }
-
- System.out.println("Client OK. Exiting.");
- return 0;
- }
-}
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/client/ClientFOSFSB.java b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/client/ClientFOSFSB.java
deleted file mode 100644
index fa9f4a4256e3132177e2b36fa3fa0c3899024408..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/client/ClientFOSFSB.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/**
- * JOnAS: Java(TM) Open Application Server
- * Copyright (C) 2005-2006 Bull S.A.S
- * Contact: jonas-team@objectweb.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- *
- * Initial developer(s):
- * --------------------------------------------------------------------------
- * $Id$
- * --------------------------------------------------------------------------
- */
-
-package org.ow2.jonas.examples.cluster.j2ee14.client;
-
-import java.util.Properties;
-
-import org.ow2.jonas.examples.cluster.j2ee14.beans.samplecluster2.MyStateful;
-import org.ow2.jonas.examples.cluster.j2ee14.beans.samplecluster2.MyStatefulHome;
-
-
-/**
- * Fat client :
- * - test Fail Over of the SFSB
- */
-public class ClientFOSFSB {
-
- /**
- * Iteration number
- */
- private static final int ITERATION_NB = 50;
-
- /**
- * Main method
- * @param args arguments of the client
- */
- public static int main(final String[] args) {
-
- String jonasEJBServer = null;
- String ejbTotalCallsCount = null;
- String ejbEntityCreated = null;
- Properties prop = null;
-
- // get home
- MyStatefulHome home = ClientUtility.getMyStatefulHome();
- System.out.println("Home retrieved -> " + home);
-
- // get primary remote
- MyStateful bean = ClientUtility.getMyStatefulBean(home);
- System.out.println("Bean created -> " + bean);
-
- for (int i = 1; i < ITERATION_NB + 1; i++) {
- try {
-
- String l = "log entry " + i;
- // add in the bean state
- bean.logWithJOnASInstance(l);
-
- System.out.println("Add " + l);
-
- if (0 == i % 10) {
- System.out.println("------------------------------------------");
- System.out.println("Get the log entries from the bean state");
- System.out.println("------------------------------------------");
- StringBuffer sb = bean.getLogTextDump();
- System.out.println(sb);
-
- System.out.println("------------------------------------------");
- System.out.println("Sleep 10s");
- System.out.println("------------------------------------------");
- try {
- Thread.sleep(10000);
- } catch (Exception e) {
- e.printStackTrace();
- return -1;
- }
- }
-
- } catch (Exception e) {
- e.printStackTrace();
- return -1;
- }
- }
- try {
- bean.remove();
- } catch (Exception e) {
- e.printStackTrace();
- return -1;
- }
- System.out.println("Client OK. Exiting.");
- return 0;
- }
-}
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/client/ClientLBHome.java b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/client/ClientLBHome.java
deleted file mode 100644
index 1a796acce099d2d74424fc8fcbb583f3e7b71d4f..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/client/ClientLBHome.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/**
- * JOnAS: Java(TM) Open Application Server
- * Copyright (C) 2005-2006 Bull S.A.S
- * Contact: jonas-team@objectweb.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- *
- * Initial developer(s):
- * --------------------------------------------------------------------------
- * $Id$
- * --------------------------------------------------------------------------
- */
-
-package org.ow2.jonas.examples.cluster.j2ee14.client;
-
-import java.util.Properties;
-
-import org.ow2.jonas.examples.cluster.j2ee14.beans.samplecluster2.MyEjb1;
-import org.ow2.jonas.examples.cluster.j2ee14.beans.samplecluster2.MyEjb1Home;
-
-
-/**
- * Fat client :
- * - access to a SSB
- * - LB at the home, remote
- */
-public class ClientLBHome {
-
- /**
- * Iteration number
- */
- private static final int ITERATION_NB = 20;
-
- /**
- * Main method
- * @param args arguments of the client
- */
- public static int main(final String[] args) {
-
- String jonasEJBServer = null;
- String ejbTotalCallsCount = null;
- String ejbEntityCreated = null;
- Properties prop = null;
-
- System.out.println("Trying to retieve Home");
- MyEjb1Home home = ClientUtility.getMyEjb1Home();
- System.out.println("Home retrieved -> " + home);
-
- for (int i = 1; i < ITERATION_NB + 1; i++) {
- try {
- MyEjb1 bean = ClientUtility.getMyEjb1Bean(home);
- System.out.println("Bean created -> " + bean);
-
- //prop = bean.getInfoProps();
- //System.out.println("Bean invoked");
-
- //jonasEJBServer = prop.getProperty("EJB server");
- //ejbTotalCallsCount = prop.getProperty("EJB total calls");
- //ejbEntityCreated = prop.getProperty("EJB server entity created");
-
- // Comments the remove() call to avoid confusing in the LB algo
- // Indeed, the remove is equilibrated too
- //bean.remove();
-
- } catch (Exception e) {
- e.printStackTrace();
- return -1;
- }
- System.out.println("\n");
- System.out.println("Iteration=" + i + " - EJB served by jonas=" + jonasEJBServer + " - EJB total calls=" + ejbTotalCallsCount + " - ejbEntityCreated=" + ejbEntityCreated);
- }
-
- System.out.println("Client OK. Exiting.");
- return 0;
- }
-}
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/client/ClientLBLookup.java b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/client/ClientLBLookup.java
deleted file mode 100644
index 22b017a49341e28c7f648f7c5ddeddd8a040c59f..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/client/ClientLBLookup.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/**
- * JOnAS: Java(TM) Open Application Server
- * Copyright (C) 2005-2006 Bull S.A.S
- * Contact: jonas-team@objectweb.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- *
- * Initial developer(s):
- * --------------------------------------------------------------------------
- * $Id$
- * --------------------------------------------------------------------------
- */
-
-package org.ow2.jonas.examples.cluster.j2ee14.client;
-
-import java.util.Properties;
-
-import org.ow2.jonas.examples.cluster.j2ee14.beans.samplecluster2.MyEjb1Home;
-
-
-/**
- * Fat client :
- * - access to a SSB
- * - LB at the lookup, home, remote
- */
-public class ClientLBLookup {
-
- /**
- * Iteration number
- */
- private static final int ITERATION_NB = 20;
-
- /**
- * Main method
- * @param args arguments of the client
- */
- public static int main(final String[] args) {
-
- String jonasEJBServer = null;
- String ejbTotalCallsCount = null;
- String ejbEntityCreated = null;
- Properties prop = null;
-
- for (int i = 1; i < ITERATION_NB + 1; i++) {
- try {
-
- MyEjb1Home home = ClientUtility.getMyEjb1Home();
- System.out.println("Home retrieved -> " + home);
- //MyEjb1 bean = ClientUtility.getMyEjb1Bean(home);
- //System.out.println("Bean created -> " + bean);
-
- //prop = bean.getInfoProps();
- //System.out.println("Bean invoked");
-
- //jonasEJBServer = prop.getProperty("EJB server");
- //ejbTotalCallsCount = prop.getProperty("EJB total calls");
- //ejbEntityCreated = prop.getProperty("EJB server entity created");
-
- // Comments the remove() call to avoid confusing in the LB algo
- // Indeed, the remove is equilibrated too
- //bean.remove();
-
- } catch (Exception e) {
- e.printStackTrace();
- return -1;
- }
- System.out.println("\n");
- System.out.println("Iteration=" + i + " - EJB served by jonas=" + jonasEJBServer + " - EJB total calls=" + ejbTotalCallsCount + " - ejbEntityCreated=" + ejbEntityCreated);
- }
-
- System.out.println("Client OK. Exiting.");
- return 0;
- }
-}
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/client/ClientLBRemote.java b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/client/ClientLBRemote.java
deleted file mode 100644
index 7ba642d3f8d266267e0c9cf32c1586c116ac7dab..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/client/ClientLBRemote.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/**
- * JOnAS: Java(TM) Open Application Server
- * Copyright (C) 2005-2006 Bull S.A.S
- * Contact: jonas-team@objectweb.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- *
- * Initial developer(s):
- * --------------------------------------------------------------------------
- * $Id$
- * --------------------------------------------------------------------------
- */
-
-package org.ow2.jonas.examples.cluster.j2ee14.client;
-
-import java.util.Properties;
-
-import org.ow2.jonas.examples.cluster.j2ee14.beans.samplecluster2.MyEjb1;
-import org.ow2.jonas.examples.cluster.j2ee14.beans.samplecluster2.MyEjb1Home;
-
-
-/**
- * Fat client :
- * - access to a SSB
- * - LB at the remote
- */
-public class ClientLBRemote {
-
- /**
- * Iteration number
- */
- private static final int ITERATION_NB = 50;
-
-
- /**
- * Main method
- * @param args arguments of the client
- */
- public static int main(final String[] args) {
-
-
- String jonasEJBServer = null;
- String ejbTotalCallsCount = null;
- String ejbEntityCreated = null;
- Properties prop = null;
-
- MyEjb1Home home = ClientUtility.getMyEjb1Home();
- System.out.println("Home retrieved -> " + home);
- MyEjb1 bean = ClientUtility.getMyEjb1Bean(home);
- System.out.println("Bean created -> " + bean);
-
- for (int i = 1; i < ITERATION_NB + 1; i++) {
- try {
-
- prop = bean.getInfoProps();
- System.out.println("Bean invoked");
-
- jonasEJBServer = prop.getProperty("EJB server");
- ejbTotalCallsCount = prop.getProperty("EJB total calls");
- ejbEntityCreated = prop.getProperty("EJB server entity created");
- } catch (Exception e) {
- e.printStackTrace();
- return -1;
- }
-
- System.out.println("\n");
- System.out.println("Calls=" + i + " - EJB served by jonas=" + jonasEJBServer + " - EJB total calls=" + ejbTotalCallsCount + " - ejbEntityCreated=" + ejbEntityCreated);
- if (0 == i % 10) {
- System.out.println("Sleep 10s");
- try {
- Thread.sleep(10000);
- } catch (Exception e) {
- e.printStackTrace();
- return -1;
- }
- }
- }
- try {
- bean.remove();
- } catch (Exception e) {
- e.printStackTrace();
- return -1;
- }
- System.out.println("Client OK. Exiting.");
- return 0;
- }
-}
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/client/ClientUtility.java b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/client/ClientUtility.java
deleted file mode 100644
index 3cca7fd279105b5ca102b4d1787c988c275a6fb5..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/client/ClientUtility.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/**
- * JOnAS: Java(TM) Open Application Server
- * Copyright (C) 2005-2006 Bull S.A.S
- * Contact: jonas-team@objectweb.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- *
- * Initial developer(s):
- * --------------------------------------------------------------------------
- * $Id$
- * --------------------------------------------------------------------------
- */
-
-package org.ow2.jonas.examples.cluster.j2ee14.client;
-
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-import javax.rmi.PortableRemoteObject;
-
-import org.ow2.jonas.examples.cluster.j2ee14.beans.samplecluster2.MyEjb1;
-import org.ow2.jonas.examples.cluster.j2ee14.beans.samplecluster2.MyEjb1Home;
-import org.ow2.jonas.examples.cluster.j2ee14.beans.samplecluster2.MyStateful;
-import org.ow2.jonas.examples.cluster.j2ee14.beans.samplecluster2.MyStatefulHome;
-
-
-/**
- * Fat client : generic methods
- */
-public class ClientUtility {
-
- /**
- * Constructor. Hide constructor as it is an utility class
- */
- private ClientUtility() {
- }
-
- /**
- * @return MyEjb1 home object
- */
- protected static MyEjb1Home getMyEjb1Home() {
-
- MyEjb1Home home = null;
- Context ctx = null;
-
- try {
- ctx = new InitialContext();
- } catch (NamingException e) {
- e.printStackTrace();
- }
-
- // Lookup bean home
- String bName = "MyEjb1Home";
- try {
- home = (MyEjb1Home) PortableRemoteObject.narrow(ctx.lookup(bName), MyEjb1Home.class);
- } catch (Exception e) {
- e.printStackTrace();
- System.exit(2);
- }
- return home;
- }
- /**
- * @param home home object
- * @return MyEjb1 remote object
- */
- protected static MyEjb1 getMyEjb1Bean(MyEjb1Home home) {
-
- MyEjb1 bean = null;
-
- try {
- bean = home.create();
- } catch (Exception e) {
- e.printStackTrace();
- System.exit(2);
- }
- return bean;
- }
-
- /**
- * @return MyStateful home object
- */
- protected static MyStatefulHome getMyStatefulHome() {
-
- MyStatefulHome home = null;
- Context ctx = null;
-
- try {
- ctx = new InitialContext();
- } catch (NamingException e) {
- e.printStackTrace();
- }
-
- // Lookup bean home
- String bName = "MyStatefulHome";
- try {
- home = (MyStatefulHome) PortableRemoteObject.narrow(ctx.lookup(bName), MyStatefulHome.class);
- } catch (Exception e) {
- e.printStackTrace();
- System.exit(2);
- }
- return home;
- }
- /**
- * @param home home object
- * @return MyStateful remote object
- */
- protected static MyStateful getMyStatefulBean(MyStatefulHome home) {
-
- MyStateful bean = null;
-
- try {
- bean = home.create();
- } catch (Exception e) {
- e.printStackTrace();
- System.exit(2);
- }
- return bean;
- }
-}
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/client/README b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/client/README
deleted file mode 100644
index 4dc3e0c5ff2182268b172af588f6ca4a3f139cb2..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/client/README
+++ /dev/null
@@ -1,40 +0,0 @@
- ===============================
-| SampleCluster2 |
- ===============================
-
-Date: 06/03/2006
-Version: v1.1
-
-CMI client
-----------
-Examples of a rich java client using the CMI protocol.
-
-Running
---------
-1) cd $JONAS_ROOT/examples/cluster-j2ee14
-2) create the directory './clientConfig'
-3) copy $JONAS_ROOT/conf/carol.properties to '/clientConfig'
-4) configure a carol.properties file pointing to a registry within a cluster in ./clientConfig/carol.properties.
- For instance :
-
-carol.protocols=cmi
-carol.cmi.url=cmi://dhcp0521:2032,dhcp0521:2043
-carol.cmi.multicast.address=224.0.0.35:35467
-carol.cmi.multicast.groupname=G1
-carol.cmi.rr.factor=100
-carol.cmi.stub.debug=false
-
-5) run the clients with the following commands :
-# for testing the load-balancing at the lookup
-src/client/clientLBLookup.sh
-
-# for testing the load-balancing at the home interface
-src/client/clientLBHome.sh
-
-# for testing the load-balancing at the remote interface
-src/client/clientLBRemote.sh
-
-# for testing the exception retrieving
-src/client/clientException.sh
-
-=================================================================================
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/servlets/AbstractServlet.java b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/servlets/AbstractServlet.java
deleted file mode 100644
index 22e820fec00b38cd1c2bf0bf6c8cebf902b68888..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/servlets/AbstractServlet.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/**
- * JOnAS: Java(TM) Open Application Server
- * Copyright (C) 2005 Bull S.A.
- * Contact: jonas-team@objectweb.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- *
- * --------------------------------------------------------------------------
- * $Id:AbstractServlet.java 14651 2008-07-28 11:50:13Z eyindanga $
- * --------------------------------------------------------------------------
- */
-package org.ow2.jonas.examples.cluster.j2ee14.servlets;
-
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-import javax.rmi.PortableRemoteObject;
-import javax.servlet.http.HttpServlet;
-
-import org.objectweb.util.monolog.api.BasicLevel;
-import org.objectweb.util.monolog.api.Logger;
-import org.ow2.jonas.examples.cluster.j2ee14.beans.samplecluster2.MyEjb1;
-import org.ow2.jonas.examples.cluster.j2ee14.beans.samplecluster2.MyEjb1Home;
-import org.ow2.jonas.examples.cluster.j2ee14.beans.samplecluster2.MyStateful;
-import org.ow2.jonas.examples.cluster.j2ee14.beans.samplecluster2.MyStatefulHome;
-import org.ow2.jonas.lib.bootstrap.JProp;
-import org.ow2.jonas.lib.util.Log;
-
-/**
- * @author goebelg
- *
- * Servlet super class
- */
-public abstract class AbstractServlet extends HttpServlet {
-
- /**
- * Servlet initialization
- */
- @Override
- public void init() {
-
- if (logger == null) {
- logger = Log.getLogger("org.ow2.jonas_tests");
- }
- logger.log(BasicLevel.DEBUG, "");
- }
-
- /**
- * Creates a new Statefull session bean.
- * @return A new session bean
- */
- public MyStateful createStatefulEJB() {
- Context ctx = null;
- MyStatefulHome home = null;
- MyStateful bean = null;
-
- try {
- ctx = new InitialContext();
- } catch (NamingException e) {
- e.printStackTrace();
- }
-
- // Lookup bean home
- String bName = "java:comp/env/ejb/MyStatefulHome";
- try {
- home = (MyStatefulHome) PortableRemoteObject.narrow(ctx.lookup(bName), MyStatefulHome.class);
- bean = home.create();
- bean.initialize();
- } catch (Exception e) {
- e.printStackTrace();
- }
- return bean;
- }
-
- /**
- * Creates a new stateless session bean.
- * @return a new stateless session bean
- */
- public MyEjb1 theEJB() {
- Context ctx = null;
- MyEjb1Home home = null;
- MyEjb1 bean = null;
-
- try {
- ctx = new InitialContext();
- } catch (NamingException e) {
- e.printStackTrace();
- }
-
- // Lookup bean home
- String bName = "java:comp/env/ejb/MyEjb1Home";
- try {
- home = (MyEjb1Home) PortableRemoteObject.narrow(ctx.lookup(bName), MyEjb1Home.class);
- bean = home.create();
- } catch (Exception e) {
- e.printStackTrace();
- }
- return bean;
- }
-
- /**
- * Retrieve the name of the JOnAS node where the servlet is executed.
- * @return The JOnAS node name where the servlet is executed.
- */
- public static String getMyJonasInstanceName() {
-
- String s = "unknown";
- try {
- JProp jp = JProp.getInstance();
- s = jp.getValue("jonas.name");
- } catch (Exception e) {
- e.printStackTrace();
- }
- return s;
- }
-
- /**
- * Get the logger
- * @return the logger
- */
- public Logger getLogger() {
- return logger;
- }
-
- /**
- * The logger
- */
- private static Logger logger = null;
-}
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/servlets/CheckServlet.java b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/servlets/CheckServlet.java
deleted file mode 100644
index f169de7b30b398af812bacf4309438daec461264..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/servlets/CheckServlet.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/**
- * JOnAS: Java(TM) Open Application Server
- * Copyright (C) 2005 Bull S.A.
- * Contact: jonas-team@objectweb.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- *
- * --------------------------------------------------------------------------
- * $Id:CheckServlet.java 14651 2008-07-28 11:50:13Z eyindanga $
- * --------------------------------------------------------------------------
- */
-
-package org.ow2.jonas.examples.cluster.j2ee14.servlets;
-
-import java.io.IOException;
-
-import javax.servlet.RequestDispatcher;
-import javax.servlet.ServletException;
-import javax.servlet.http.Cookie;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import javax.servlet.http.HttpSession;
-
-import org.objectweb.util.monolog.api.BasicLevel;
-
-/**
- * @author goebelg
- *
- * Servlet which checks the HTTP session
- */
-public class CheckServlet extends AbstractServlet {
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
-
- /**
- * doGet methode of the servlet
- * @param req http servlet request
- * @param res http servlet response
- * @throws ServletException servlet exception
- * @throws IOException io exception
- */
- public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
-
- HttpSession session = req.getSession(false);
-
- String sessionCheckInfo = "JSESSIONID cookie absent.";
- Cookie[] cookies = req.getCookies();
- if (cookies != null) {
- for (int i = 0; i < cookies.length; i++) {
- if (cookies[i].getName().equals("JSESSIONID")) {
- sessionCheckInfo = "JSESSIONID cookie present.";
- }
- }
- }
-
- getLogger().log(BasicLevel.INFO, sessionCheckInfo);
- req.setAttribute("sessionCheckInfo", sessionCheckInfo);
-
- // --------------
- // Write response
- // --------------
- RequestDispatcher disp = req.getRequestDispatcher("../jsp/checkRsp.jsp");
- disp.forward(req, res);
-
- return;
- }
-}
\ No newline at end of file
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/servlets/ExceptionServlet.java b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/servlets/ExceptionServlet.java
deleted file mode 100644
index baef42ac1cbb24d55b5dcbe28f4008a4fb221813..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/servlets/ExceptionServlet.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/**
- * JOnAS: Java(TM) Open Application Server
- * Copyright (C) 2006 Bull S.A.S
- * Contact: jonas-team@objectweb.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- *
- * --------------------------------------------------------------------------
- * $Id:ExceptionServlet.java 14651 2008-07-28 11:50:13Z eyindanga $
- * --------------------------------------------------------------------------
- */
-
-package org.ow2.jonas.examples.cluster.j2ee14.servlets;
-
-import java.io.IOException;
-
-import javax.servlet.RequestDispatcher;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.ow2.jonas.examples.cluster.j2ee14.beans.samplecluster2.MyEjb1;
-import org.ow2.jonas.examples.cluster.j2ee14.beans.samplecluster2.MyException;
-
-
-
-/**
- * @author goebelg Release an http session servlet
- */
-public class ExceptionServlet extends AbstractServlet {
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
-
- /**
- * doGet methode of the servlet
- * @param req http servlet request
- * @param res http servlet response
- * @throws ServletException servlet exception
- * @throws IOException io exception
- */
- @Override
- public void doGet(final HttpServletRequest req, final HttpServletResponse res) throws ServletException, IOException {
-
- // creating a new stateless EJB -> EJBCreate
- MyEjb1 bean = theEJB();
- try {
- bean.throwMyException();
- } catch (MyException e) {
- System.out.println("My Exception caught" + e);
- e.printStackTrace();
- req.setAttribute("expectedException", "OK");
- req.setAttribute("exception", e);
- } catch (Exception e) {
- System.out.println("Exception caught" + e);
- e.printStackTrace();
- req.setAttribute("expectedException", "KO");
- req.setAttribute("exception", e);
- }
-
- RequestDispatcher disp = req.getRequestDispatcher("../jsp/exceptionRsp.jsp");
- disp.forward(req, res);
-
- return;
- }
-}
\ No newline at end of file
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/servlets/ReleaseServlet.java b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/servlets/ReleaseServlet.java
deleted file mode 100644
index c1cafa1510bc319a6cf5b69cdff164714bd4aa32..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/servlets/ReleaseServlet.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/**
- * JOnAS: Java(TM) Open Application Server
- * Copyright (C) 2005 Bull S.A.
- * Contact: jonas-team@objectweb.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- *
- * --------------------------------------------------------------------------
- * $Id:ReleaseServlet.java 14651 2008-07-28 11:50:13Z eyindanga $
- * --------------------------------------------------------------------------
- */
-
-package org.ow2.jonas.examples.cluster.j2ee14.servlets;
-
-import java.io.IOException;
-import java.rmi.RemoteException;
-
-import javax.ejb.Handle;
-import javax.ejb.RemoveException;
-import javax.rmi.PortableRemoteObject;
-import javax.servlet.RequestDispatcher;
-import javax.servlet.ServletException;
-import javax.servlet.http.Cookie;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import javax.servlet.http.HttpSession;
-
-import org.objectweb.util.monolog.api.BasicLevel;
-import org.ow2.jonas.examples.cluster.j2ee14.beans.samplecluster2.MyStateful;
-
-/**
- * @author goebelg Release an http session servlet
- */
-public class ReleaseServlet extends AbstractServlet {
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
-
- /**
- * doGet methode of the servlet
- * @param req http servlet request
- * @param res http servlet response
- * @throws ServletException servlet exception
- * @throws IOException io exception
- */
- @Override
- public void doGet(final HttpServletRequest req, final HttpServletResponse res) throws ServletException, IOException {
-
- // Get the session object to invalidate it
-
- HttpSession session = req.getSession(false);
- String sessionToReleaseInfo = "no session to invalidate";
- if (session != null) {
- sessionToReleaseInfo = "session=" + session.getId() + " invalidated";
- // Remove the SFSB if present
- // Retrieve or create the Stateful EJB to log history
- Handle h = (Handle) session.getAttribute("myStateful");
- if (h != null) {
- MyStateful statefulBean = (MyStateful) PortableRemoteObject.narrow(h.getEJBObject(), MyStateful.class);
- try {
- statefulBean.remove();
- } catch (RemoteException e) {
- e.printStackTrace();
- } catch (RemoveException e) {
- e.printStackTrace();
- }
- }
-
- session.invalidate();
- }
- getLogger().log(BasicLevel.INFO, sessionToReleaseInfo);
- req.setAttribute("sessionToReleaseInfo", sessionToReleaseInfo);
-
- Cookie[] cookies = req.getCookies();
- if (cookies != null) {
- Cookie ck = null;
- for (int i = 0; i < cookies.length; i++) {
- if (cookies[i].getName().equals("JSESSIONID")) {
- ck = (Cookie) cookies[i].clone();
- ck.setMaxAge(0);
- res.addCookie(ck);
- }
- }
- }
-
- // --------------
- // Write response
- // --------------
-
- RequestDispatcher disp = req.getRequestDispatcher("../jsp/releaseRsp.jsp");
- disp.forward(req, res);
-
- return;
- }
-}
\ No newline at end of file
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/servlets/SessionServlet.java b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/servlets/SessionServlet.java
deleted file mode 100644
index 813a46e89d6017f666d3f6118eb6fad7c433456b..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-j2ee14/src/java/org/ow2/jonas/examples/cluster/j2ee14/servlets/SessionServlet.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/**
- * JOnAS: Java(TM) Open Application Server
- * Copyright (C) 2005 Bull S.A.
- * Contact: jonas-team@objectweb.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- *
- * --------------------------------------------------------------------------
- * $Id:SessionServlet.java 14651 2008-07-28 11:50:13Z eyindanga $
- * --------------------------------------------------------------------------
- */
-
-package org.ow2.jonas.examples.cluster.j2ee14.servlets;
-
-import java.io.IOException;
-import java.util.Properties;
-
-import javax.ejb.Handle;
-import javax.rmi.PortableRemoteObject;
-import javax.servlet.RequestDispatcher;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import javax.servlet.http.HttpSession;
-
-import org.objectweb.util.monolog.api.BasicLevel;
-import org.ow2.jonas.examples.cluster.j2ee14.beans.samplecluster2.MyEjb1;
-import org.ow2.jonas.examples.cluster.j2ee14.beans.samplecluster2.MyStateful;
-
-/**
- * @author goebelg
- *
- * servlet which manages the different instantiations of the ejbs
- */
-public class SessionServlet extends AbstractServlet {
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
-
- /**
- * doGet methode of the servlet
- * @param req http servlet request
- * @param res http servlet response
- * @throws ServletException servlet exception
- * @throws IOException io exception
- */
- @Override
- public void doGet(final HttpServletRequest req, final HttpServletResponse res) throws ServletException, IOException {
- String jonasEJBServer = null;
- String ejbId = null;
- String ejbTotalCallsCount = null;
- String ejbEntityCreated = null;
- Properties prop = null;
-
- /*
- * ---------------------------------------- Update the session context -
- * sessiontest.counter : number of times this servlet has been called -
- * sessiontest.jonas. : counts the number of time the EJB was
- * served by JOnAS instance
- * -----------------------------------------
- */
- HttpSession session = req.getSession(true);
-
- // update sessiontest.counter
-
- Integer ival = (Integer) session.getAttribute("sessiontest.counter");
- if (ival == null) { // If counter is not in session, then create it
- ival = new Integer(1);
- } else {
- ival = new Integer(ival.intValue() + 1);
- }
- session.setAttribute("sessiontest.counter", ival);
-
- // Call EJB then update sessiontest.jonas.x
-
- // creating a new stateless EJB -> EJBCreate
- MyEjb1 bean = theEJB();
- try {
- prop = bean.getInfoProps();
- jonasEJBServer = prop.getProperty("EJB server");
- ejbId = prop.getProperty("EJB id");
- ejbTotalCallsCount = prop.getProperty("EJB total calls");
- ejbEntityCreated = prop.getProperty("EJB server entity created");
- } catch (Exception e) {
- e.printStackTrace();
- }
-
- // Retrieve or create the Stateful EJB to log history
- Handle h = (Handle) session.getAttribute("myStateful");
- MyStateful statefulBean = null;
- if (h == null) {
-
- statefulBean = createStatefulEJB();
- if (statefulBean != null) {
- h = statefulBean.getHandle();
- session.setAttribute("myStateful", h);
- statefulBean.setHTTPSessionId(session.getId());
- }
- } else {
- statefulBean = (MyStateful) PortableRemoteObject.narrow(h.getEJBObject(), MyStateful.class);
- }
-
- if (!session.isNew()) {
- session.setAttribute("sessiontest.old.EJB", session.getAttribute("sessiontest.EJB"));
- session.setAttribute("sessiontest.old.WEB", session.getAttribute("sessiontest.WEB"));
- }
- session.setAttribute("sessiontest.EJB", jonasEJBServer);
- session.setAttribute("sessiontest.WEB", getMyJonasInstanceName());
-
- req.setAttribute("jonas.EJB.served.by", jonasEJBServer);
- req.setAttribute("jonas.WEB.served.by", getMyJonasInstanceName());
-
- session.setAttribute("sessiontest.jonas.EJB_Server", jonasEJBServer);
- session.setAttribute("sessiontest.jonas.EJB_id", ejbId);
- session.setAttribute("sessiontest.jonas.nb_EJB_totalCalls", ejbTotalCallsCount);
-
- // Log information
-
- getLogger().log(BasicLevel.INFO, "session=" + session.getId() + " on jonas=" + getMyJonasInstanceName()
- + " - calls=" + ival + " - EJB served by jonas=" + jonasEJBServer + " - EJB total calls="
- + ejbTotalCallsCount);
-
- if (statefulBean != null) {
- try {
- statefulBean.log("
" + "
" + getMyJonasInstanceName() + "
" + "
" + jonasEJBServer
- + "
" + "
" + ejbTotalCallsCount + "
" + "
" + ejbEntityCreated + "
"
- + "
");
- } catch (Exception e) {
- getLogger().log(BasicLevel.INFO, "session=" + session.getId()
- + " : Exception when calling MyStateful EJB (" + e.getMessage() + ")");
- session.removeAttribute("myStateful");
- }
- }
- // --------------
- // Write response
- // --------------
-
- RequestDispatcher disp = req.getRequestDispatcher("../jsp/sessionRsp.jsp");
- disp.forward(req, res);
-
- return;
- }
-}
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/PortConfiguration.txt b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/PortConfiguration.txt
deleted file mode 100644
index 100bcb273ba331fe32d1e4981e85c00532739ea7..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/PortConfiguration.txt
+++ /dev/null
@@ -1,48 +0,0 @@
-Date : 03/31/2005
-Version : 1.2
-
-This file shows a configuration of 4 JOnAS instances running on the same machine. The table below lists a possible configuration of all the ports used by the 4 JOnAS instances.
-In the following configuration we will deploy the entity beans on node2 and node3. The Web application is deployed on node0 and node1.
-
- __--- Node1 --- Node3 ---__
-Apache with mod_jk ---__ x __--- DB
- --- Node0 --- Node2 ---
-
- Web Ejb
- Container Container
-
-Note :
-- You have to activate the AJP Connector (server.xml) for node0 and node1 inorder to be able to communicate with the mod_jk module. Two different ports (for example 9009 and 9010) must be choosen. Configure the mod_jk to use the 2 instances. For further information please consult http://jonas.objectweb.org/current/doc/howto/Clustering.html in the section -Load balancing at web level with mod_jk-
-
-- Please note that the database used to store the data of the entity beans has to be the same on both nodes where the ejb's are deployed. In this example we use the database HSQL mapped to the JNDI name jdbc_1. We will use the database started by node2, therefore we must change the port in the HSQL.properties file of node3. It has to be the same file as on node2. In this example, you have to start the node2 before the node3 because node2 starts automatically the database. But it would be preferable to install an independant database and use that one as jdbc_1 (change jonas.properties)
-
-- Inorder to see when the different nodes are accessed, you have to start the instances with different names : for example -> jonas start -n node0
-
-FILENAME PROPERTY NODE0 NODE1 NODE2 NODE3
--------- -------- ----- ----- ----- -----
-
-
-jonas.properties
- jonas.service.db.port 9001 9002 9003 9004
- jonas.service.discovery.multicast.port 9080 9082 9083 9084
-
-HSQL.properties
- datasource.url 9001 9002 9003 9003 #port 9003 : specifies unique database
-
-server.xml
- /sampleCluster3
-
- 4) stop JOnAS:
- jonas stop -n node0
-
-B. for more JOnAS instances:
-
- Remark: X is the number of the node in the cluster
-
- 1) start each JOnAS instance:
- jonas start -n nodeX -Ddomain.name=sampleCluster2Domain
-
- 2) deploy the wevApp and the EJBs on the JOnAS instances
- jonas admin -a sample-cluster2.ear -n nodeX
-
- 3) test the application
- use your webbrowser
- url: http:///sampleCluster3
-
- 4) stop each JOnAS instance:
- jonas stop -n nodeX
-
----------------------------
-Good luck!!
-=================================================================================
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/bin-client/clientConfig/carol.properties b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/bin-client/clientConfig/carol.properties
deleted file mode 100644
index 5bf3512cd0c5439b02638a82fbfac75bdfe8ff36..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/bin-client/clientConfig/carol.properties
+++ /dev/null
@@ -1,101 +0,0 @@
-# Copyright (C) 2002-2007 ObjectWeb
-#
-# CAROL: Common Architecture for RMI ObjectWeb Layer
-#
-# This library is developed inside the ObjectWeb Consortium,
-# http://www.ow2.org
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
-# USA
-#
-# --------------------------------------------------------------------------
-# $Id$
-# --------------------------------------------------------------------------
-
-# jonas rmi activation (iiop, irmi, jrmp)
-carol.protocols=jrmp
-
-# RMI IRMI URL
-carol.irmi.url=rmi://localhost:1099
-
-# RMI JRMP URL
-carol.jrmp.url=rmi://localhost:2032
-
-# RMI IIOP URL
-carol.iiop.url=iiop://localhost:1099
-
-######################################################################
-# Advanced Configuration for IRMI
-######################################################################
-# Exported objects will listen on this port for remote method
-# invocations.
-#A value of 0 will cause a random port to be selected.
-# This is the default value.
-# Warning : if the port is set (not 0) with the value 'n', be aware that
-# the port 'n + 1' will be used by the JMX server.
-# So, for the firewall configuration, you have to open the port numbers 'n'
-# and 'n+1'.
-carol.irmi.server.port=0
-
-# Use only a single interface when creating the registry
-# (specified in carol.irmi.url property)
-# Use all interfaces available [default configuration = false]
-carol.irmi.interfaces.bind.single=false
-
-######################################################################
-# Advanced Configuration for JRMP
-######################################################################
-# If true, local call with jrmp are optimized. If you get "ClassCastException
-# with 2 beans in different jars, you should set it at "false".
-carol.jvm.rmi.local.call=false
-
-# If true a local Naming context is used (to be used only with a collocated registry)
-carol.jvm.rmi.local.registry=true
-
-# The value of this port is used to set the port of the objects listener.
-# This allow to use this port for a firewall configuration.
-# If registry and server are on same host, the two ports to open are the following and the registry port.
-# 0 means random port [default configuration = 0]
-carol.jrmp.server.port=0
-
-# Use only a single interface when creating the registry
-# (specified in carol.jrmp.url property)
-# Use all interfaces available [default configuration = false]
-carol.jrmp.interfaces.bind.single=false
-
-
-######################################################################
-# Advanced Configuration for IIOP
-######################################################################
-# The value of this port is used to set the port of the objects listener.
-# This allow to use this port for a firewall configuration.
-# If registry and server are on same host, the two ports to open are the following and the registry port.
-# 0 means random port [default configuration = 0]
-carol.iiop.server.port=0
-
-# The value of this port is used to set the SSL port of the objects listener.
-# Note that this port musn't not be set to 0 as it is used for CsiV2.
-# but this port is used only if SSL mode is enable.
-# So by default, there is no listener on this port
-# [default configuration = not used]
-carol.iiop.server.sslport=2003
-
-# Delegate used by JOnAS for rmi-iiop protocol
-carol.iiop.PortableRemoteObjectClass=org.ow2.jonas.registry.carol.delegate.JacORBPRODelegate
-
-######################################################################
-# Advanced JNDI Configuration
-######################################################################
-carol.jndi.java.naming.factory.url.pkgs=org.ow2.jonas.lib.naming
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/bin-client/clientConfig/cmi-config.xml b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/bin-client/clientConfig/cmi-config.xml
deleted file mode 100644
index 771a2ea092601c429128676491bcf63d9be87eb6..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/bin-client/clientConfig/cmi-config.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-
-
-
-
-
-
-
- rmi://localhost:2032
- rmi://localhost:2043
-
-
-
-
-
-
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/bin-client/clientConfig/traceclient.properties b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/bin-client/clientConfig/traceclient.properties
deleted file mode 100644
index c7bb2c21359c289d2600c50846b5cf44d9daada8..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/bin-client/clientConfig/traceclient.properties
+++ /dev/null
@@ -1,43 +0,0 @@
-# -----------------------------------------------------------------------
-# This is a default configuration file for monolog.
-#
-# Patterns for each handler may include these possible values :
-# %h the thread name
-# %O{1} the Class name (basename only)
-# %M the method name
-# %L the line number
-# %d the date
-# %l the level
-# %m the message itself
-# %n a new line
-#
-# Each logger inherits from its parent for properties not defined.
-# The root logger is "root". It must always be defined.
-#
-# Each logger is associated with a level that can be one of :
-# ERROR | WARN | INFO | DEBUG
-#
-# -> More info on http://www.objectweb.org/monolog/doc.html
-# -----------------------------------------------------------------------
-#
-# Define which wrapper to use (= javaLog)
-# -----------------------------------------------------------------------
-# For Log4j you need to add log4j.jar
-# log.config.classname org.objectweb.util.monolog.wrapper.log4j.MonologLoggerFactory
-log.config.classname org.objectweb.util.monolog.wrapper.javaLog.LoggerFactory
-
-# -----------------------------------------------------------------------
-# tty : console handler
-# -----------------------------------------------------------------------
-handler.tty.type Console
-handler.tty.output System.out
-handler.tty.pattern %O{1}.%M : %m%n
-
-# -----------------------------------------------------------------------
-# logger definitions
-# -----------------------------------------------------------------------
-logger.root.handler.0 tty
-
-logger.root.level ERROR
-#logger.org.ow2.carol.level DEBUG
-#logger.org.ow2.jonas.level DEBUG
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/bin-client/clientException.bat b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/bin-client/clientException.bat
deleted file mode 100644
index 7a89a4d0f06e69af5b052b5a605042e977b92c3c..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/bin-client/clientException.bat
+++ /dev/null
@@ -1,3 +0,0 @@
-REM set JAVA_OPTS=-Dcmi.conf.url=clientConfig\cmi-config.xml
-REM set JAVA_OPTS=-Dcmi.disabled=true
-jclient %JONAS_BASE%\deploy\sampleCluster3.ear -jarClient clientexception.jar -carolFile clientConfig\carol.properties -traceFile clientConfig\traceclient.properties
\ No newline at end of file
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/bin-client/clientException.sh b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/bin-client/clientException.sh
deleted file mode 100755
index af351049695215a861c6d6f50f42e19c4ecab900..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/bin-client/clientException.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#export JAVA_OPTS=-Dcmi.conf.url=clientConfig/cmi-config.xml
-#export JAVA_OPTS=-Dcmi.disabled=true
-jclient $JONAS_BASE/deploy/sampleCluster3.ear -jarClient clientexception.jar -carolFile clientConfig/carol.properties -traceFile clientConfig/traceclient.properties
\ No newline at end of file
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/bin-client/clientFOSFSB.bat b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/bin-client/clientFOSFSB.bat
deleted file mode 100644
index 24b2acc05cb65c86e98e3dc88d75378121dd5575..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/bin-client/clientFOSFSB.bat
+++ /dev/null
@@ -1,3 +0,0 @@
-REM set JAVA_OPTS=-Dcmi.conf.url=clientConfig\cmi-config.xml
-REM set JAVA_OPTS=-Dcmi.disabled=true
-jclient %JONAS_BASE%\deploy\sampleCluster3.ear -jarClient clientfosfsb.jar -carolFile clientConfig\carol.properties -traceFile clientConfig\traceclient.properties
\ No newline at end of file
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/bin-client/clientFOSFSB.sh b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/bin-client/clientFOSFSB.sh
deleted file mode 100755
index e7da982925da88e4b2d110980cf29bd9f119d12a..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/bin-client/clientFOSFSB.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#export JAVA_OPTS=-Dcmi.conf.url=clientConfig/cmi-config.xml
-#export JAVA_OPTS=-Dcmi.disabled=true
-jclient $JONAS_BASE/deploy/sampleCluster3.ear -jarClient clientfosfsb.jar -carolFile clientConfig/carol.properties -traceFile clientConfig/traceclient.properties
\ No newline at end of file
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/bin-client/clientLBRemote.bat b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/bin-client/clientLBRemote.bat
deleted file mode 100755
index 00f91813c822f18ae743b5cafa3a4e971164bcdd..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/bin-client/clientLBRemote.bat
+++ /dev/null
@@ -1,3 +0,0 @@
-REM set JAVA_OPTS=-Dcmi.conf.url=clientConfig\cmi-config.xml
-REM set JAVA_OPTS=-Dcmi.disabled=true
-jclient %JONAS_BASE%\deploy\sampleCluster3.ear -jarClient clientlbremote.jar -carolFile clientConfig\carol.properties -traceFile clientConfig\traceclient.properties
\ No newline at end of file
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/bin-client/clientLBRemote.sh b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/bin-client/clientLBRemote.sh
deleted file mode 100755
index d1997fa728bb3045bccae77c2fc35ab6015d4faf..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/bin-client/clientLBRemote.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#export JAVA_OPTS=-Dcmi.conf.url=clientConfig/cmi-config.xml
-#export JAVA_OPTS=-Dcmi.disabled=true
-jclient $JONAS_BASE/deploy/sampleCluster3.ear -jarClient clientlbremote.jar -carolFile clientConfig/carol.properties -traceFile clientConfig/traceclient.properties
\ No newline at end of file
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/build.properties b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/build.properties
deleted file mode 100644
index 82d2e3800c22553bf922ac41a97daa837451de97..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/build.properties
+++ /dev/null
@@ -1,31 +0,0 @@
-# ---------------------------------------------------------------------------
-# JOnAS: Java(TM) Open Application Server
-# Copyright (C) 2008 Bull S.A.S
-# Contact: jonas-team@objectweb.org
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
-# USA
-#
-# Initial developer(s): ____________________________________.
-# Contributor(s): ______________________________________.
-#
-# ---------------------------------------------------------------------------
-# $Id$
-# ---------------------------------------------------------------------------
-
-# Properties defined in this file could be customized
-
-# protocols for Carol (jrmp,iiop,cmi)
-protocols.names=jrmp,iiop
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/build.xml b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/build.xml
deleted file mode 100644
index c1e6b7cca7fc022526fc9656e791ad3599f71eb0..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/build.xml
+++ /dev/null
@@ -1,173 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/etc/resources/WEB-INF/web.xml b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/etc/resources/WEB-INF/web.xml
deleted file mode 100644
index 3ba61bffaba25f2ad234f927cc3e7b15e5e1d7fb..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/etc/resources/WEB-INF/web.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-
-
-
-
-
-
-
- sessionServlet
- org.ow2.jonas.examples.cluster.javaee5.servlets.SessionServlet
-
-
-
- releaseSessionServlet
- org.ow2.jonas.examples.cluster.javaee5.servlets.ReleaseServlet
-
-
-
- checkSessionServlet
- org.ow2.jonas.examples.cluster.javaee5.servlets.CheckServlet
-
-
-
- exceptionServlet
- org.ow2.jonas.examples.cluster.javaee5.servlets.ExceptionServlet
-
-
-
- exceptionServlet
- /servlet/exception
-
-
-
- sessionServlet
- /servlet/session
-
-
-
- releaseSessionServlet
- /servlet/release
-
-
-
- checkSessionServlet
- /servlet/check
-
-
-
- /index.html
-
-
-
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/etc/resources/application.xml b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/etc/resources/application.xml
deleted file mode 100644
index ec946539cab2cb5f568b8e74bcec3f24a89d3734..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/etc/resources/application.xml
+++ /dev/null
@@ -1,73 +0,0 @@
-
-
-
-
-
-
- Cluster Java EE Sample
- Cluster Java EE Sample
-
-
-
- clientlbremote.jar
-
-
-
- clientfosfsb.jar
-
-
-
- clientexception.jar
-
-
-
-
- ejb3.jar
-
-
-
-
-
- sampleCluster3.war
- sampleCluster3
-
-
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/etc/resources/client.xml b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/etc/resources/client.xml
deleted file mode 100644
index c3eb0b02bbe974fd5aec701e4d1d3698841ca7a5..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/etc/resources/client.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
-
-
-
- OW2 JOnAS :: Cluster Java EE example
-
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/etc/resources/jonas-client.xml b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/etc/resources/jonas-client.xml
deleted file mode 100644
index 86b086555ef28e562953aebc06b37fae0d3a9f3f..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/etc/resources/jonas-client.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
-
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/etc/resources/persistence.xml b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/etc/resources/persistence.xml
deleted file mode 100644
index 051059f7763aeb41dbe857d79fea3bcf6c3bddd0..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/etc/resources/persistence.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
-
-
-
- jdbc_1
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/etc/resources/policy/round-robin-policy.xml b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/etc/resources/policy/round-robin-policy.xml
deleted file mode 100644
index 307e577c18505facf2aef5d58cabd663fa3bdebb..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/etc/resources/policy/round-robin-policy.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-
-
-
-
-
- org.ow2.cmi.lb.policy.RoundRobin
-
-
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/etc/resources/web/index.html b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/etc/resources/web/index.html
deleted file mode 100644
index 09bf411d3c7505e3ba05f221a798f4a4b5e954bb..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/etc/resources/web/index.html
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
-
- sampleCluster3
-
-
-
-
Test the exception propagation from the server side to the client side : click here
-(exception servlet)
-
-
-
-
-
-
- Sample is OK.
-
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/etc/resources/web/jsp/checkRsp.jsp b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/etc/resources/web/jsp/checkRsp.jsp
deleted file mode 100644
index 33b3d2578ad0e8ce2c25e98b2fcc4283114c6aa4..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/etc/resources/web/jsp/checkRsp.jsp
+++ /dev/null
@@ -1,22 +0,0 @@
-<%@ page session="false" %>
-<%
-Cookie[] cookies = request.getCookies();
-HttpSession session = request.getSession(false);
-%>
-
-
Check session
-
-
check Servlet output
-<%= (session != null ? "
Logged in.
Session ID: " + session.getId() + "
" : "
No session.
") %>
-<%
- if ( cookies != null)
- for (int i=0; i < cookies.length;i++)
- out.println(cookies[i].getName()+ ": " + cookies[i].getValue() + " ");
-%>
- <%=request.getAttribute("sessionCheckInfo")%>
->go to session,
-<% if (session != null) out.println("logout, ");%>
->check session,
->home.
- Sample is OK.
-
\ No newline at end of file
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/etc/resources/web/jsp/exceptionRsp.jsp b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/etc/resources/web/jsp/exceptionRsp.jsp
deleted file mode 100644
index 7b41603aa4ec39f088fc93259cf528ead306e8a7..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/etc/resources/web/jsp/exceptionRsp.jsp
+++ /dev/null
@@ -1,13 +0,0 @@
-<%@ page session="false" %>
-
-
-<%
-if (cookies != null) {
- for (int i=0; i < cookies.length;i++)
- out.println(cookies[i].getName()+ ": " + cookies[i].getValue() + " ");
- out.println(" If present, the JSESSIONID cookie will be obsoleted. ");
-} else {
- out.println("None.");
-}
-%>
-
-
->go to session,
->check session,
->home.
- Sample is OK.
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/etc/resources/web/jsp/sessionRsp.jsp b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/etc/resources/web/jsp/sessionRsp.jsp
deleted file mode 100644
index bd62ca78aca58e807ea1e053e559757a14f1362a..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/etc/resources/web/jsp/sessionRsp.jsp
+++ /dev/null
@@ -1,64 +0,0 @@
-<%@ page import="java.util.Enumeration" %>
-<%@ page import="java.util.Date" %>
-<%@ page import="javax.ejb.Handle" %>
-<%@ page import="org.ow2.jonas.examples.cluster.javaee5.beans.samplecluster3.*" %>
-<%@ page import="javax.rmi.PortableRemoteObject" %>
-<%
- Date dc = new Date(session.getCreationTime());
- Date da = new Date(session.getLastAccessedTime());
-%>
-
SessionServlet Output
-
-
SessionServlet Output
-
getRequestURL <%=request.getRequestURL()%>
- for the <%=session.getAttribute("sessiontest.counter")%> times.
-from <%=request.getRemoteAddr()%>(user is <%=request.getRemoteUser()%>)
-To server <%=request.getServerName()%> on port <%=request.getServerPort()%>.
-
-
Request path:
-Servlet executed on JOnAS instance (<%=request.getAttribute("jonas.WEB.served.by")%>)
-Stateless EJB executed on JOnAS instance (<%=request.getAttribute("jonas.EJB.served.by")%>)
-
-
-Sample is OK.
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/etc/xml/easybeans.xml b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/etc/xml/easybeans.xml
deleted file mode 100644
index bc7e849d105b35ccb19803a6f0fcd3eda6f5ccce..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/etc/xml/easybeans.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
-
-
-
- MyStatelessBean
- MyStatelessHome
- 3
-
- org.ow2.cmi.lb.policy.FirstAvailable
- org.ow2.cmi.lb.strategy.LocalPreference
-
-
-
-
- MyStatefulBean
- MyStatefulHome
-
- org.ow2.cmi.lb.policy.FirstAvailable
- org.ow2.cmi.lb.strategy.LocalPreference
-
- isModified
-
-
-
- MyStatefulInnerBean
- MyStatefulInnerHome
- true
- isModified
-
-
-
-
\ No newline at end of file
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/etc/xml/ejb-jar.xml b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/etc/xml/ejb-jar.xml
deleted file mode 100644
index fbae4a493f9f776f79f3f5b36ff2429f80432d8c..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/etc/xml/ejb-jar.xml
+++ /dev/null
@@ -1,62 +0,0 @@
-
-
-
-
-
-
-
- Describe here the session bean MyStatelessHome
- MyStatelessHome
- MyStatelessBean
- org.ow2.jonas.examples.cluster.javaee5.beans.samplecluster3.MyStateless
- org.ow2.jonas.examples.cluster.javaee5.beans.samplecluster3.MyStatelessBean
- Stateless
- Container
-
-
-
- Describe here the session bean MyStatefulHome
- MyStatefulHome
- MyStatefulBean
- org.ow2.jonas.examples.cluster.j2ee14.beans.samplecluster2.MyStateful
- org.ow2.jonas.examples.cluster.javaee5.beans.samplecluster3.MyStatefulBean
- Stateful
- Container
-
-
-
- Describe here the session bean MyStatefulInnerHome
- MyStatefulInnerHome
- MyStatefulInnerBean
- org.ow2.jonas.examples.cluster.j2ee14.beans.samplecluster2.MyStatefulInner
- org.ow2.jonas.examples.cluster.javaee5.beans.samplecluster3.MyStatefulInnerBean
- Stateful
- Container
-
-
-
\ No newline at end of file
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/example-config/tomcat6-jk.conf b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/example-config/tomcat6-jk.conf
deleted file mode 100644
index 9e58496394904b06b6623becb5d4185b903ab662..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/example-config/tomcat6-jk.conf
+++ /dev/null
@@ -1,23 +0,0 @@
-
-LoadModule jk_module modules/mod_jk.so
-# Location of the worker file
-JkWorkersFile conf/jk\workers.properties
-# Location of the log file
-JkLogFile conf/jk\mod_jk.log
-# Log level : debug, info, error or emerg
-JkLogLevel emerg
-# Shared Memory Filename ( Only for Unix platform ) required by loadbalancer
-JkShmFile conf/jk\jk.shm
-# Assign specific URL to Tomcat workers
-JkMount /sampleCluster3 loadbalancer
-JkMount /sampleCluster3/* loadbalancer
-# A mount point to the status worker
-JkMount /jkmanager jkstatus
-JkMount /jkmanager/* jkstatus
-# Enable the Jk manager access only from localhost
-
- JkMount jkstatus
- Order deny,allow
- Deny from all
- Allow from 127.0.0.1
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/example-config/tomcat6-mod_jk.xml b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/example-config/tomcat6-mod_jk.xml
deleted file mode 100644
index c1060a8ca7c6ede6ec40a1c750977a4b658b48c0..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/example-config/tomcat6-mod_jk.xml
+++ /dev/null
@@ -1,184 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/example-config/workers.properties b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/example-config/workers.properties
deleted file mode 100644
index 9738a3a7773a3ccaa25e7676c75af43e06e883bb..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/example-config/workers.properties
+++ /dev/null
@@ -1,42 +0,0 @@
-
-# -----------------------
-# List the workers name
-# -----------------------
-worker.list=loadbalancer,jkstatus
-
-# -----------------------
-# worker1
-# -----------------------
-worker.worker1.port=9010
-worker.worker1.host=localhost
-worker.worker1.type=ajp13
-# Load balance factor
-worker.worker1.lbfactor=1
-# Define prefered failover node for worker1
-#worker.worker1.redirect=worker2
-# Disable worker1 for all requests except failover
-#worker.worker1.disabled=True
-
-# -----------------------
-# worker2
-# -----------------------
-worker.worker2.port=9011
-worker.worker2.host=localhost
-worker.worker2.type=ajp13
-# Load balance factor
-worker.worker2.lbfactor=1
-# Define prefered failover node for worker2
-#worker.worker2.redirect=worker2
-# Disable worker2 for all requests except failover
-#worker.worker2.disabled=True
-
-# -----------------------
-# Load Balancer worker
-# -----------------------
-worker.loadbalancer.type=lb
-worker.loadbalancer.balanced_workers=worker1,worker2
-worker.loadbalancer.sticky_session=false
-# -----------------------
-# jkstatus worker
-# -----------------------
-worker.jkstatus.type=status
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/src/java/org/ow2/jonas/examples/cluster/javaee5/beans/samplecluster3/MyException.java b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/src/java/org/ow2/jonas/examples/cluster/javaee5/beans/samplecluster3/MyException.java
deleted file mode 100644
index 0b1643149ccd2e8b53b862f1728d1fd8d54a7c04..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/src/java/org/ow2/jonas/examples/cluster/javaee5/beans/samplecluster3/MyException.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * JOnAS: Java(TM) Open Application Server
- * Copyright (C) 2008 Bull S.A.S
- * Contact: jonas-team@objectweb.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- *
- * Initial developer(s):
- * --------------------------------------------------------------------------
- * $Id$
- * --------------------------------------------------------------------------
- */
-package org.ow2.jonas.examples.cluster.javaee5.beans.samplecluster3;
-
-
-/**
- * @author
- * application exception
- */
-public class MyException extends Exception {
-
- /**
- * UID
- */
- private static final long serialVersionUID = 110L;
-
-
- /**
- * Default Constructor
- *
- */
- public MyException() {
- super();
- }
-
- /**
- * Constructor
- * @param msg message associated with the exception
- */
- public MyException(final String msg) {
- super(msg);
- }
-
-}
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/src/java/org/ow2/jonas/examples/cluster/javaee5/beans/samplecluster3/MyStateful.java b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/src/java/org/ow2/jonas/examples/cluster/javaee5/beans/samplecluster3/MyStateful.java
deleted file mode 100644
index b6357044b76cbe9d3090f3e3bd19d758a4060846..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/src/java/org/ow2/jonas/examples/cluster/javaee5/beans/samplecluster3/MyStateful.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/**
- * JOnAS: Java(TM) Open Application Server
- * Copyright (C) 2008 Bull S.A.S.
- * Contact: jonas-team@ow2.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- *
- * --------------------------------------------------------------------------
- * $Id$
- * --------------------------------------------------------------------------
- */
-
-package org.ow2.jonas.examples.cluster.javaee5.beans.samplecluster3;
-
-import javax.ejb.Handle;
-
-
-/**
- * MyStateful remote interface
- */
-public interface MyStateful {
-
- /**
- * Initializes the inner beans
- */
- void initialize();
-
- /**
- * Keep the parameter in a list. Note : the parameter represents a line in
- * the "session servlet output" screen
- * @param s The string to keep.
- */
- void log(java.lang.String s);
-
- /**
- * Keep the parameter in a list keeping track of the JOnAS instance
- * @param s The string to keep.
- */
- void logWithJOnASInstance(java.lang.String s);
-
- /**
- * Retreive all the data in the log table Note : The return value is the
- * data shown in the "session servlet output" screen
- * @return All the logged data
- */
- java.lang.StringBuffer getLogDump();
-
- /**
- * Retreive all the data in the log table Note : The return value is the
- * text format (calls from the java client)
- * @return All the logged data
- */
- java.lang.StringBuffer getLogTextDump();
-
-
- /**
- * Set the http sessionid of the caller.
- * @param s The sessionid of the caller.
- */
- void setHTTPSessionId(java.lang.String s);
-
- /**
- * Get the stored http sessionid of the caller.
- * @return The stored sessionid.
- */
- java.lang.String getHTTPSessionId();
-
- /**
- *
- * @return handle on the SFSB
- */
- Handle getMyHandle();
-
- /**
- * Cleanup/Remove
- */
- void cleanup();
-
-
-}
\ No newline at end of file
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/src/java/org/ow2/jonas/examples/cluster/javaee5/beans/samplecluster3/MyStatefulBean.java b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/src/java/org/ow2/jonas/examples/cluster/javaee5/beans/samplecluster3/MyStatefulBean.java
deleted file mode 100644
index 4b46aa0750cdc616c00e521263ff26cbeb352e24..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/src/java/org/ow2/jonas/examples/cluster/javaee5/beans/samplecluster3/MyStatefulBean.java
+++ /dev/null
@@ -1,375 +0,0 @@
-/**
- * JOnAS: Java(TM) Open Application Server
- * Copyright (C) 2008 Bull S.A.S.
- * Contact: jonas-team@ow2.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- *
- * --------------------------------------------------------------------------
- * $Id$
- * --------------------------------------------------------------------------
- */
-
-package org.ow2.jonas.examples.cluster.javaee5.beans.samplecluster3;
-
-
-import java.rmi.RemoteException;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.Iterator;
-
-import javax.annotation.PostConstruct;
-import javax.annotation.Resource;
-import javax.ejb.EJB;
-import javax.ejb.Handle;
-import javax.ejb.Remote;
-import javax.ejb.Remove;
-import javax.ejb.SessionContext;
-import javax.ejb.SessionSynchronization;
-import javax.ejb.Stateful;
-import javax.persistence.EntityManager;
-import javax.persistence.PersistenceContext;
-
-import org.ow2.cmi.annotation.Cluster;
-import org.ow2.cmi.annotation.Policy;
-import org.ow2.cmi.annotation.Strategy;
-import org.ow2.cmi.lb.policy.RoundRobin;
-import org.ow2.cmi.lb.strategy.LocalPreference;
-import org.ow2.jonas.lib.bootstrap.JProp;
-import org.ow2.util.log.Log;
-import org.ow2.util.log.LogFactory;
-
-/**
- *
- */
-@Stateful
-@Remote(MyStateful.class)
-@Cluster(name="sampleCluster3", isReplicated=false)
-@Policy(RoundRobin.class)
-@Strategy(LocalPreference.class)
-public class MyStatefulBean implements SessionSynchronization,MyStateful {
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
-
- /**
- * Entity manager used by this bean.
- */
- @PersistenceContext
- private EntityManager entityManager = null;
-
- /**
- * Session context
- */
- @Resource
- private SessionContext sessionContext = null;
- /**
- * The logger.
- */
- private Log logger = LogFactory.getLog(MyStatefulBean.class);
-
- /**
- * The JOnAS node name where the bean is executed
- * the field is transient because we don't want to passivate or replicate it
- */
- private transient String creatorJonasInstanceName = "unknown";
-
- /**
- * The maximum number of values to conserve
- */
- private static final int MAXSIZE = 20;
-
- /**
- * The log output
- */
- private ArrayList log = null;
-
- /**
- * caller http session id
- */
- private String callerHTTPSessionId = null;
-
- @EJB
- private MyStatefulInner localStateful = null;
-
- private Node localEntity = null;
-
- private transient boolean isModified = true;
-
- /**
- * After the transaction begun
- */
- public void afterBegin() {
- logger.debug("");
- }
-
- /**
- * before the commit is executed
- */
- public void beforeCompletion() {
- logger.debug("");
- }
-
- /**
- * after the commit or rollback
- * @param committed true -> commit, false -> rollback
- */
- public void afterCompletion(final boolean committed) {
- logger.debug("");
- }
-
- /**
- * Init
- */
- @PostConstruct
- public void init() {
- creatorJonasInstanceName = "unknown";
- try {
- JProp jp = JProp.getInstance();
- creatorJonasInstanceName = jp.getValue("jonas.name");
- } catch (Exception e) {
- logger.fatal(e.getMessage(), e);
- }
-
- log = new ArrayList(MAXSIZE);
- logger.debug("->" + this.toString());
- isModified = true;
- }
-
- /**
- * Initializes the inner beans
- */
- public void initialize() {
- logger.debug("");
- Date date = new Date();
- isModified = true;
- }
-
- /**
- * Keep the parameter in a list. Note : the parameter represents a line in
- * the "session servlet output" screen
- * @param s The string to keep.
- */
- public void log(final java.lang.String s) {
- logger.debug("");
-
- if (log.size() == MAXSIZE) {
- Iterator iter = log.iterator();
- iter.next();
- iter.remove();
- }
-
- log.add(s);
-
- // Call local stateful
- getLocalStateful().increment();
-
- isModified = true;
- }
-
- /**
- * Keep the parameter in a list with the source node
- * @param s The string to keep.
- * @throws RemoteException
- */
- public void logWithJOnASInstance(final java.lang.String s) {
- logger.debug("");
-
- if (log.size() == MAXSIZE) {
- Iterator iter = log.iterator();
- iter.next();
- iter.remove();
- }
-
- log.add("JOnAS instance=" + creatorJonasInstanceName + " - " + s);
-
- // Call local stateful
- getLocalStateful().increment();
-
- isModified = true;
- }
- /**
- * Retreive all the data in the log table Note : The return value is the
- * data shown in the "session servlet output" screen
- * @return All the logged data
- */
- public java.lang.StringBuffer getLogDump() {
- logger.debug("");
-
- StringBuffer sb = new StringBuffer();
- sb.append("JOnAS instance=");
- sb.append(creatorJonasInstanceName);
- sb.append(" ; EJB=");
- sb.append(this.toString());
- sb.append("\n");
- sb.append("Owner: ");
- sb.append(callerHTTPSessionId);
- sb.append("\n");
-
- sb.append("Inner count: ");
- sb.append(getLocalStateful().getCount());
- sb.append("\n");
-
- sb.append("Local entity: ");
- sb.append(getLocalEntity().getName());
- sb.append("\n");
-
- Iterator iter = log.iterator();
-
- sb.append("
");
-
- logger.info(sb.toString());
- return sb;
- }
-
- /**
- * Retreive all the data in the log table Note : The return value is the
- * text format (calls from the java client)
- * @return All the logged data
- */
- public java.lang.StringBuffer getLogTextDump() {
- logger.debug("");
-
- StringBuffer sb = new StringBuffer();
- sb.append("JOnAS instance=");
- sb.append(creatorJonasInstanceName);
- sb.append(" ; EJB=");
- sb.append(this.toString());
- sb.append("\n");
-
- sb.append("Inner count: ");
- sb.append(getLocalStateful().getCount());
- sb.append("\n");
-
- sb.append("Local entity: ");
- sb.append(getLocalEntity().getName());
- sb.append("\n");
-
- Iterator iter = log.iterator();
- int i = 1;
- sb.append("Log entries -> \n");
- while (iter.hasNext()) {
- sb.append(" " + i + " : ");
- sb.append(iter.next());
- sb.append("\n");
- i++;
- }
- sb.append("End\n");
-
- logger.info(sb.toString());
- return sb;
- }
-
- /**
- * Set the http sessionid of the caller.
- * @param s The sessionid of the caller.
- * @throws RemoteException
- */
- public void setHTTPSessionId(final java.lang.String s) {
- logger.debug("");
- callerHTTPSessionId = s;
- isModified = true;
- }
-
- /**
- * Get the stored http sessionid of the caller.
- * @return The stored sessionid.
- * @throws RemoteException
- */
- public java.lang.String getHTTPSessionId() {
- logger.debug("");
- return callerHTTPSessionId;
- }
-
- /**
- *
- * @return the local stateful bean
- */
- private MyStatefulInner getLocalStateful() {
- return localStateful;
- }
-
- /**
- * Creates a new Entity bean with the time as parameter
- * @param valeur The current time as string
- * @return A new Entity Bean
- */
- private Node createEntity(final String valeur) {
-
- Node node = new Node() ;
- node.setName(valeur);
- node.setInvocationNumber(1);
-
- entityManager.persist(node);
-
- logger.info("node.name=", valeur );
-
- return node;
- }
-
- /**
- * Returns the local entity bean
- * @return the local entity bean
- */
- private Node getLocalEntity() {
- if (localEntity == null) {
- Date date = new Date();
- localEntity = createEntity("SFSB_" + creatorJonasInstanceName + "_" + Long.toString(date.getTime()));
- isModified = true;
- }
- return localEntity;
- }
-
- public boolean isModified() {
- boolean result = isModified;
- isModified = false;
- return result;
- }
-
- /**
- * @return handle on the stateful
- */
- public Handle getMyHandle() {
- Handle handle = null;
- try {
- handle = sessionContext.getEJBObject().getHandle();
- } catch (RemoteException e) {
- logger.error("Unable to get SFSB handle", e);
- } catch (IllegalStateException e) {
- logger.error("Unable to get SFSB handle", e);
- }
- return handle;
- }
-
-
- /**
- * cleanup all fields
- */
- @Remove
- public void cleanup() {
- logger.debug("cleanup all fields");
- this.localEntity = null;
- this.log = null;
- this.callerHTTPSessionId = null;
- }
-}
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/src/java/org/ow2/jonas/examples/cluster/javaee5/beans/samplecluster3/MyStatefulInner.java b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/src/java/org/ow2/jonas/examples/cluster/javaee5/beans/samplecluster3/MyStatefulInner.java
deleted file mode 100644
index 353a8befef6cc4d12df73586659f807ee978fde8..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/src/java/org/ow2/jonas/examples/cluster/javaee5/beans/samplecluster3/MyStatefulInner.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * JOnAS: Java(TM) Open Application Server
- * Copyright (C) 2008 Bull S.A.S
- * Contact: jonas-team@objectweb.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- *
- * Initial developer(s):
- * --------------------------------------------------------------------------
- * $Id$
- * --------------------------------------------------------------------------
- */
-package org.ow2.jonas.examples.cluster.javaee5.beans.samplecluster3;
-
-/**
- * @author pelletib
- * MyStateful local interface
- */
-public interface MyStatefulInner {
- void increment();
- int getCount();
-}
\ No newline at end of file
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/src/java/org/ow2/jonas/examples/cluster/javaee5/beans/samplecluster3/MyStatefulInnerBean.java b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/src/java/org/ow2/jonas/examples/cluster/javaee5/beans/samplecluster3/MyStatefulInnerBean.java
deleted file mode 100644
index 296ec00700a797c64eadaefe8cec2ea063de91e7..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/src/java/org/ow2/jonas/examples/cluster/javaee5/beans/samplecluster3/MyStatefulInnerBean.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/**
- * JOnAS: Java(TM) Open Application Server
- * Copyright (C) 2008 Bull S.A.S
- * Contact: jonas-team@objectweb.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- *
- * Initial developer(s):
- * --------------------------------------------------------------------------
- * $Id$
- * --------------------------------------------------------------------------
- */
-package org.ow2.jonas.examples.cluster.javaee5.beans.samplecluster3;
-
-
-import javax.ejb.Local;
-import javax.ejb.SessionSynchronization;
-import javax.ejb.Stateful;
-
-import org.ow2.util.log.Log;
-import org.ow2.util.log.LogFactory;
-
-/**
- * Inner statefull
- * @author pelletib
- */
-@Stateful
-@Local(MyStatefulInner.class)
-public class MyStatefulInnerBean implements SessionSynchronization,MyStatefulInner {
-
- /**
- * The logger.
- */
- private Log logger = LogFactory.getLog(MyStatefulInnerBean.class);
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
-
- /**
- * counter
- */
- private int count = 0;
-
- /**
- * Modifier flag
- */
- private transient boolean isModified = true;
-
- /**
- * After the transaction begun
- */
- public void afterBegin() {
- logger.debug("afterBegin");
- }
-
- /**
- * before the commit is executed
- */
- public void beforeCompletion() {
- logger.debug("beforeCompletion");
- }
-
- /**
- * after the commit or rollback
- * @param committed true -> commit, false -> rollback
- */
- public void afterCompletion(final boolean committed) {
- logger.debug("afterCompletion: " + committed);
- }
-
-
- /**
- * increment the local counter
- */
- public void increment() {
- count++;
- isModified = true;
- }
-
- /**
- * @return local counter
- */
- public int getCount() {
- return count;
- }
-
- /**
- *
- * @return true if the counter is modified
- */
- public boolean isModified() {
- boolean result = isModified;
- isModified = false;
- return result;
- }
-}
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/src/java/org/ow2/jonas/examples/cluster/javaee5/beans/samplecluster3/MyStateless.java b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/src/java/org/ow2/jonas/examples/cluster/javaee5/beans/samplecluster3/MyStateless.java
deleted file mode 100644
index 4aa585f6ed96ebd601f5fba9046f2f49aea78129..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/src/java/org/ow2/jonas/examples/cluster/javaee5/beans/samplecluster3/MyStateless.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/**
- * JOnAS: Java(TM) Open Application Server
- * Copyright (C) 2008 Bull S.A.S
- * Contact: jonas-team@objectweb.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- *
- * Initial developer(s):
- * --------------------------------------------------------------------------
- * $Id$
- * --------------------------------------------------------------------------
- */
-
-package org.ow2.jonas.examples.cluster.javaee5.beans.samplecluster3;
-
-import java.util.Properties;
-
-/**
- * MyStateless interface
- */
-public interface MyStateless {
-
- /**
- * Access a property stored in the JOnAS instance executing the EJB
- * container.
- * @param prop Name of the property
- * @return The value of the property
- */
- String getProperty(String prop);
-
- /**
- * Retreive some information of the JOnAS instance executing the EJB
- * container The names of the properties are : EJB server, EJB id, EJB
- * instance calls, EJB total calls - EJB server : name of the JOnAS instance -
- * EJB id : toString() of the MyEjb1 - EJB instance calls : number of calls
- * to this EJB instance - EJB total calls : number of calls to this EJB for
- * all instance of class MyEjb1
- * @return The Properties
- */
- Properties getInfoProps();
-
- /**
- * Throw a MyException
- * @throws RemoteException remote exception
- * @throws MyException application exception
- */
- void throwMyException() throws MyException;
-
-}
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/src/java/org/ow2/jonas/examples/cluster/javaee5/beans/samplecluster3/MyStatelessBean.java b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/src/java/org/ow2/jonas/examples/cluster/javaee5/beans/samplecluster3/MyStatelessBean.java
deleted file mode 100644
index 2282501b639eeeb269c2c8ff924ef24aa2b5673d..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/src/java/org/ow2/jonas/examples/cluster/javaee5/beans/samplecluster3/MyStatelessBean.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/**
- * JOnAS: Java(TM) Open Application Server
- * Copyright (C) 2008 Bull S.A.S.
- * Contact: jonas-team@ow2.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- *
- * --------------------------------------------------------------------------
- * $Id$
- * --------------------------------------------------------------------------
- */
-
-package org.ow2.jonas.examples.cluster.javaee5.beans.samplecluster3;
-
-import static org.ow2.jonas.examples.cluster.javaee5.beans.samplecluster3.Node.QN.FIND_NODE;
-
-import java.util.List;
-import java.util.Properties;
-
-import javax.ejb.Remote;
-import javax.ejb.Stateless;
-import javax.persistence.EntityManager;
-import javax.persistence.PersistenceContext;
-import javax.persistence.Query;
-
-import org.ow2.cmi.annotation.Cluster;
-import org.ow2.cmi.annotation.Policy;
-import org.ow2.cmi.annotation.Strategy;
-import org.ow2.cmi.lb.policy.RoundRobin;
-import org.ow2.cmi.lb.strategy.LocalPreference;
-import org.ow2.jonas.lib.bootstrap.JProp;
-import org.ow2.util.log.Log;
-import org.ow2.util.log.LogFactory;
-
-/**
- * This is an example of Session Bean, stateless
- * @author pelletib
- */
-@Stateless
-@Remote(MyStateless.class)
-@Cluster(name="sampleCluster3")
-@Policy(RoundRobin.class)
-@Strategy(LocalPreference.class)
-public class MyStatelessBean implements MyStateless {
-
- /**
- * Entity manager used by this bean.
- */
- @PersistenceContext
- private EntityManager entityManager = null;
-
- /**
- * The logger.
- */
- private Log logger = LogFactory.getLog(MyStatelessBean.class);
-
-
- /**
- * Find a given {@link Node} using it's name as a key.
- * @param name {@link Node}'s name.
- * @return the first {@link Node} that matches the given name.
- */
- @SuppressWarnings("unchecked")
- private Node findNode(final String name) {
- Query query = entityManager.createNamedQuery(FIND_NODE);
- query.setParameter("name", name);
- List nodes = query.getResultList();
- if (nodes != null && nodes.size() > 0) {
- return nodes.get(0);
- }
- return null;
- }
-
- /**
- *
- * @return the JOnAS instance name
- * @throws Exception if the property is not present
- */
- private String getName() throws Exception {
-
- try {
- JProp jp = JProp.getInstance();
- return jp.getValue("jonas.name");
- } catch (Exception e) {
- logger.error("Error while getting 'jonas.name' property", e);
- throw e;
- }
- }
-
- /**
- * Updates the properties described above
- * @param name JOnAS instance name
- */
- private int updateStatistics(final String name) {
-
- Node node = findNode(name);
- if (node == null) {
- node = new Node() ;
- node.setName(name);
- node.setInvocationNumber(1);
- } else {
- node.setInvocationNumber(node.getInvocationNumber() + 1);
- }
- entityManager.persist(node);
-
- logger.info("JOnAS={0} ; ejb={1} ; total calls={3}", name, this.toString(), node.getInvocationNumber() );
- return node.getInvocationNumber();
- }
-
-
- /**
- * @return get properties about processing node
- */
- public Properties getInfoProps() {
- String name;
- try {
- name = getName();
- } catch (Exception e) {
- e.printStackTrace();
- return null;
- }
- int in = updateStatistics(name);
- Properties p = new Properties();
- p.setProperty("EJB server", name);
- p.setProperty("EJB id", this.toString());
- p.setProperty("EJB total calls", (new Integer(in)).toString());
- return p;
- }
-
- /**
- * @return get a property value
- */
- public String getProperty(final String prop) {
- String s = "unknown";
- try {
- JProp jp = JProp.getInstance();
- s = jp.getValue(prop);
- } catch (Exception e) {
- logger.fatal("Error while getProperty)(", e);
- return null;
- }
- return s;
-
- }
-
- /**
- * @throws MyException generates an exception
- */
- public void throwMyException() throws MyException {
- String name = "";
- try {
- name = getName();
- } catch (Exception e) {
- e.printStackTrace();
- }
- throw new MyException("From MyStateless(" + name + ")");
-
- }
-
-}
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/src/java/org/ow2/jonas/examples/cluster/javaee5/beans/samplecluster3/Node.java b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/src/java/org/ow2/jonas/examples/cluster/javaee5/beans/samplecluster3/Node.java
deleted file mode 100644
index 05ffec728d65e49a01654219e8297380d9b614cf..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/src/java/org/ow2/jonas/examples/cluster/javaee5/beans/samplecluster3/Node.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/**
- * JOnAS: Java(TM) Open Application Server
- * Copyright (C) 2008 Bull S.A.S.
- * Contact: jonas-team@ow2.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- *
- * --------------------------------------------------------------------------
- * $Id$
- * --------------------------------------------------------------------------
- */
-
-
-package org.ow2.jonas.examples.cluster.javaee5.beans.samplecluster3;
-
-import static org.ow2.jonas.examples.cluster.javaee5.beans.samplecluster3.Node.QN.ALL_NODES;
-import static org.ow2.jonas.examples.cluster.javaee5.beans.samplecluster3.Node.QN.FIND_NODE;
-
-import java.io.Serializable;
-
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.NamedQueries;
-import javax.persistence.NamedQuery;
-
-/**
- * Node
- * @author pelletib
- */
-@Entity
-@NamedQueries({@NamedQuery(name=ALL_NODES, query="select o FROM Node o"),
- @NamedQuery(name=FIND_NODE, query="select o FROM Node o WHERE name = :name")})
-public class Node implements Serializable {
- /**
- * Store Query names.
- */
- public static interface QN {
- /**
- * Search all authors.
- */
- String ALL_NODES = "Node.allNodes";
-
- /**
- * Search a named author.
- */
- String FIND_NODE = "Node.findNode";
- }
-
- /**
- * Serial Version UID.
- */
- private static final long serialVersionUID = 0L;
-
- /**
- * Primary key (will be auto generated).
- */
- private long id;
-
- /**
- * Name of the node.
- */
- private String name = null;
-
- /**
- * Creating time of the bean.
- */
- private int invocationNumber = 0;
-
-
- /**
- * Default constructor.
- */
- public Node() {
- }
-
- /**
- * Constructor with a given node name.
- * @param name - the name of the node
- */
- public Node(final String name) {
- this();
- setName(name);
- }
-
- /**
- * @return name of the node
- */
- public String getName() {
- return name;
- }
-
- /**
- * Sets the name of the node.
- * @param name - the name of this node
- */
- public void setName(final String name) {
- this.name = name;
- }
-
- /**
- * @return creating time of the bean
- */
- public int getInvocationNumber() {
- return invocationNumber;
- }
-
- /**
- * Sets the creating time of the bean.
- * @param number - the creating time of the bean
- */
- public void setInvocationNumber(final int invocationNumber) {
- this.invocationNumber = invocationNumber;
- }
-
- /**
- * @return an id for this object (incremented automatically)
- */
- @Id
- @GeneratedValue(strategy=GenerationType.AUTO)
- public long getId() {
- return this.id;
- }
-
- /**
- * Sets the id of this node object.
- * @param id the given id of this node
- */
- public void setId(final long id) {
- this.id = id;
- }
-
- /**
- * @return String representation of this entity object.
- */
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder(this.getClass().getName());
- sb.append("[id=");
- sb.append(getId());
- sb.append(", name=");
- sb.append(getName());
- sb.append(", invocationNumber=");
- sb.append(Integer.valueOf(getInvocationNumber()).toString());
- sb.append("]");
- return sb.toString();
- }
-}
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/src/java/org/ow2/jonas/examples/cluster/javaee5/client/ClientException.java b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/src/java/org/ow2/jonas/examples/cluster/javaee5/client/ClientException.java
deleted file mode 100644
index f818383eca8c96f3402c30818e597d2bf1a328ce..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/src/java/org/ow2/jonas/examples/cluster/javaee5/client/ClientException.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/**
- * JOnAS: Java(TM) Open Application Server
- * Copyright (C) 2006 Bull S.A.S
- * Contact: jonas-team@objectweb.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- *
- * Initial developer(s):
- * --------------------------------------------------------------------------
- * $Id$
- * --------------------------------------------------------------------------
- */
-
-package org.ow2.jonas.examples.cluster.javaee5.client;
-
-import java.util.Properties;
-
-import javax.ejb.EJB;
-
-import org.ow2.jonas.examples.cluster.javaee5.beans.samplecluster3.MyException;
-import org.ow2.jonas.examples.cluster.javaee5.beans.samplecluster3.MyStateless;
-
-
-/**
- * Fat client :
- * - get an exception
- */
-public class ClientException {
-
- /**
- * Link to the SSB.
- */
- @EJB
- private static MyStateless myStateless = null;
-
- /**
- * Private constructor for utility class
- *
- */
- private ClientException() {
- }
-
- /**
- * Main method
- * @param args arguments of the client
- */
- public static int main(final String[] args) {
-
- Properties prop = null;
-
- System.out.println("Bean created -> " + myStateless);
-
- try {
- System.out.println("Throw an exception at the server side");
- myStateless.throwMyException();
- } catch (MyException e) {
- System.out.println("MyException caught : " + e);
- } catch (Exception e) {
- System.out.println("Exception caught : " + e);
- }
-
- System.out.println("Client OK. Exiting.");
- return 0;
- }
-}
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/src/java/org/ow2/jonas/examples/cluster/javaee5/client/ClientFOSFSB.java b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/src/java/org/ow2/jonas/examples/cluster/javaee5/client/ClientFOSFSB.java
deleted file mode 100644
index 130577590d33e9762b6d45088a2963cf3e04c439..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/src/java/org/ow2/jonas/examples/cluster/javaee5/client/ClientFOSFSB.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/**
- * JOnAS: Java(TM) Open Application Server
- * Copyright (C) 2005-2006 Bull S.A.S
- * Contact: jonas-team@objectweb.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- *
- * Initial developer(s):
- * --------------------------------------------------------------------------
- * $Id$
- * --------------------------------------------------------------------------
- */
-
-package org.ow2.jonas.examples.cluster.javaee5.client;
-
-import javax.ejb.EJB;
-
-import org.ow2.jonas.examples.cluster.javaee5.beans.samplecluster3.MyStateful;
-
-
-/**
- * Fat client :
- * - test Fail Over of the SFSB
- */
-public class ClientFOSFSB {
-
- /**
- * Link to the SFSB.
- */
- @EJB
- private static MyStateful myStateful = null;
-
- /**
- * Iteration number
- */
- private static final int ITERATION_NB = 50;
-
- /**
- * Main method
- * @param args arguments of the client
- */
- public static int main(final String[] args) {
-
- System.out.println("Bean created -> " + myStateful);
-
- for (int i = 1; i < ITERATION_NB + 1; i++) {
- try {
-
- String l = "log entry " + i;
- // add in the bean state
- myStateful.logWithJOnASInstance(l);
-
- System.out.println("Add " + l);
-
- if (0 == i % 10) {
- System.out.println("------------------------------------------");
- System.out.println("Get the log entries from the bean state");
- System.out.println("------------------------------------------");
- StringBuffer sb = myStateful.getLogTextDump();
- System.out.println(sb);
-
- System.out.println("------------------------------------------");
- System.out.println("Sleep 10s");
- System.out.println("------------------------------------------");
- try {
- Thread.sleep(10000);
- } catch (Exception e) {
- e.printStackTrace();
- return -1;
- }
- }
-
- } catch (Exception e) {
- e.printStackTrace();
- return -1;
- }
- }
- myStateful.cleanup();
-
- System.out.println("Client OK. Exiting.");
- return 0;
- }
-}
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/src/java/org/ow2/jonas/examples/cluster/javaee5/client/ClientLBRemote.java b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/src/java/org/ow2/jonas/examples/cluster/javaee5/client/ClientLBRemote.java
deleted file mode 100644
index 67504ef20c5a74e0c86272c1a57031090a9a90a6..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/src/java/org/ow2/jonas/examples/cluster/javaee5/client/ClientLBRemote.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/**
- * JOnAS: Java(TM) Open Application Server
- * Copyright (C) 2005-2006 Bull S.A.S
- * Contact: jonas-team@objectweb.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- *
- * Initial developer(s):
- * --------------------------------------------------------------------------
- * $Id$
- * --------------------------------------------------------------------------
- */
-
-package org.ow2.jonas.examples.cluster.javaee5.client;
-
-import java.util.Properties;
-
-import javax.ejb.EJB;
-
-import org.ow2.jonas.examples.cluster.javaee5.beans.samplecluster3.MyStateless;
-
-
-/**
- * Fat client :
- * - access to a SSB
- * - LB at the remote
- */
-public class ClientLBRemote {
-
- /**
- * Link to the SSB.
- */
- @EJB
- private static MyStateless myStateless = null;
-
- /**
- * Iteration number
- */
- private static final int ITERATION_NB = 50;
-
-
- /**
- * Main method
- * @param args arguments of the client
- */
- public static int main(final String[] args) {
-
-
- String jonasEJBServer = null;
- String ejbTotalCallsCount = null;
- Properties prop = null;
-
- //try {
- //Context ctx = new InitialContext();
- //myStateless = (MyStateless) ctx.lookup("org.ow2.jonas.examples.cluster.javaee5.beans.samplecluster3.MyStatelessBean"
- // + "_" + MyStateless.class.getName() + "@Remote");
- //} catch (NamingException e) {
- // e.printStackTrace();
- // }
-
-
- System.out.println("Bean created -> " + myStateless);
-
- for (int i = 1; i < ITERATION_NB + 1; i++) {
- try {
-
- prop = myStateless.getInfoProps();
- System.out.println("Bean invoked");
-
- jonasEJBServer = prop.getProperty("EJB server");
- ejbTotalCallsCount = prop.getProperty("EJB total calls");
- } catch (Exception e) {
- e.printStackTrace();
- return -1;
- }
-
- System.out.println("\n");
- System.out.println("Calls=" + i + " - EJB served by jonas=" + jonasEJBServer + " - EJB total calls=" + ejbTotalCallsCount);
- if (0 == i % 10) {
- System.out.println("Sleep 10s");
- try {
- Thread.sleep(10000);
- } catch (Exception e) {
- e.printStackTrace();
- return -1;
- }
- }
- }
-
- System.out.println("Client OK. Exiting.");
- return 0;
- }
-}
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/src/java/org/ow2/jonas/examples/cluster/javaee5/client/README b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/src/java/org/ow2/jonas/examples/cluster/javaee5/client/README
deleted file mode 100644
index 75c9991036b035555b399fa2b1bfa01c7e26eece..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/src/java/org/ow2/jonas/examples/cluster/javaee5/client/README
+++ /dev/null
@@ -1,36 +0,0 @@
- ===============================
-| SampleCluster3 |
- ===============================
-
-Date: 14/10/2008
-Version: v1.1
-
-CMI client
-----------
-Examples of a rich java client using the CMI protocol.
-
-Running
---------
-1) cd $JONAS_ROOT/examples/cluster-javaee5
-2) create the directory './clientConfig'
-3) copy $JONAS_ROOT/conf/carol.properties to '/clientConfig'
-4) configure a carol.properties file pointing to a registry within a cluster in ./clientConfig/carol.properties.
- For instance :
-
-carol.protocols=jrmp
-carol.jrmp.url=rmi://localhost:1099
-
-5) run the clients with the following commands :
-# for testing the load-balancing at the lookup
-..../client/clientLBLookup.sh
-
-# for testing the load-balancing at the home interface
-..../client/clientLBHome.sh
-
-# for testing the load-balancing at the remote interface
-..../client/clientLBRemote.sh
-
-# for testing the exception retrieving
-..../client/clientException.sh
-
-=================================================================================
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/src/java/org/ow2/jonas/examples/cluster/javaee5/servlets/AbstractServlet.java b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/src/java/org/ow2/jonas/examples/cluster/javaee5/servlets/AbstractServlet.java
deleted file mode 100644
index a30c2a1e205ee76e0ec42d79e750fb06d865fb52..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/src/java/org/ow2/jonas/examples/cluster/javaee5/servlets/AbstractServlet.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/**
- * JOnAS: Java(TM) Open Application Server
- * Copyright (C) 2008 Bull S.A.S
- * Contact: jonas-team@objectweb.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- *
- * Initial developer(s):
- * --------------------------------------------------------------------------
- * $Id$
- * --------------------------------------------------------------------------
- */
-package org.ow2.jonas.examples.cluster.javaee5.servlets;
-
-import javax.ejb.EJB;
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-import javax.servlet.http.HttpServlet;
-
-import org.ow2.jonas.examples.cluster.javaee5.beans.samplecluster3.MyStateful;
-import org.ow2.jonas.examples.cluster.javaee5.beans.samplecluster3.MyStateless;
-import org.ow2.jonas.lib.bootstrap.JProp;
-import org.ow2.util.log.Log;
-import org.ow2.util.log.LogFactory;
-
-/**
- * @author pelletib
- *
- * Servlet super class
- */
-public abstract class AbstractServlet extends HttpServlet {
-
- /**
- * Link to the SSB.
- */
- // @EJB
- private MyStateless myStateless = null;
-
- /**
- * Link to the SFSB.
- */
- private MyStateful myStateful = null;
-
- /**
- * Logger
- */
- private Log logger = LogFactory.getLog(AbstractServlet.class);
-
-
- /**
- * Servlet initialization
- */
- @Override
- public void init() {
-
- logger.debug("");
- }
-
- /**
- * Creates a new Stateful session bean.
- * @return A new session bean
- */
- public MyStateful getMyStateful() {
- try {
- Context ctx = new InitialContext();
- myStateful = (MyStateful) ctx.lookup("org.ow2.jonas.examples.cluster.javaee5.beans.samplecluster3.MyStatefulBean"
- + "_" + MyStateful.class.getName() + "@Remote");
- } catch (NamingException e) {
- e.printStackTrace();
- }
- myStateful.initialize();
- return myStateful;
- }
-
- /**
- * Creates a new stateless session bean.
- * @return a new stateless session bean
- */
- public MyStateless getMyStateless() {
- try {
- Context ctx = new InitialContext();
- myStateless = (MyStateless) ctx.lookup("org.ow2.jonas.examples.cluster.javaee5.beans.samplecluster3.MyStatelessBean"
- + "_" + MyStateless.class.getName() + "@Remote");
- } catch (NamingException e) {
- e.printStackTrace();
- }
- return myStateless;
- }
-
- /**
- * Retrieve the name of the JOnAS node where the servlet is executed.
- * @return The JOnAS node name where the servlet is executed.
- */
- public static String getMyJonasInstanceName() {
-
- String s = "unknown";
- try {
- JProp jp = JProp.getInstance();
- s = jp.getValue("jonas.name");
- } catch (Exception e) {
- e.printStackTrace();
- }
- return s;
- }
-
- /**
- * Get the logger
- * @return the logger
- */
- public Log getLogger() {
- return logger;
- }
-
-
-}
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/src/java/org/ow2/jonas/examples/cluster/javaee5/servlets/CheckServlet.java b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/src/java/org/ow2/jonas/examples/cluster/javaee5/servlets/CheckServlet.java
deleted file mode 100644
index 56e40acfe93f2472058f6ace05316a412938ae05..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/src/java/org/ow2/jonas/examples/cluster/javaee5/servlets/CheckServlet.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/**
- * JOnAS: Java(TM) Open Application Server
- * Copyright (C) 2008 Bull S.A.S
- * Contact: jonas-team@objectweb.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- *
- * Initial developer(s):
- * --------------------------------------------------------------------------
- * $Id$
- * --------------------------------------------------------------------------
- */
-package org.ow2.jonas.examples.cluster.javaee5.servlets;
-
-import java.io.IOException;
-
-import javax.servlet.RequestDispatcher;
-import javax.servlet.ServletException;
-import javax.servlet.http.Cookie;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import javax.servlet.http.HttpSession;
-
-/**
- * @author pelletib
- *
- * Servlet which checks the HTTP session
- */
-public class CheckServlet extends AbstractServlet {
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
-
- /**
- * doGet methode of the servlet
- * @param req http servlet request
- * @param res http servlet response
- * @throws ServletException servlet exception
- * @throws IOException io exception
- */
- @Override
- public void doGet(final HttpServletRequest req, final HttpServletResponse res) throws ServletException, IOException {
-
- HttpSession session = req.getSession(false);
-
- String sessionCheckInfo = "JSESSIONID cookie absent.";
- Cookie[] cookies = req.getCookies();
- if (cookies != null) {
- for (int i = 0; i < cookies.length; i++) {
- if (cookies[i].getName().equals("JSESSIONID")) {
- sessionCheckInfo = "JSESSIONID cookie present.";
- }
- }
- }
-
- getLogger().info(sessionCheckInfo);
- req.setAttribute("sessionCheckInfo", sessionCheckInfo);
-
- // --------------
- // Write response
- // --------------
- RequestDispatcher disp = req.getRequestDispatcher("../jsp/checkRsp.jsp");
- disp.forward(req, res);
-
- return;
- }
-}
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/src/java/org/ow2/jonas/examples/cluster/javaee5/servlets/ExceptionServlet.java b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/src/java/org/ow2/jonas/examples/cluster/javaee5/servlets/ExceptionServlet.java
deleted file mode 100644
index 2c8128cae5881da63daca34d42073d52fa6f7d3f..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/src/java/org/ow2/jonas/examples/cluster/javaee5/servlets/ExceptionServlet.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/**
- * JOnAS: Java(TM) Open Application Server
- * Copyright (C) 2008 Bull S.A.S
- * Contact: jonas-team@objectweb.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- *
- * Initial developer(s):
- * --------------------------------------------------------------------------
- * $Id$
- * --------------------------------------------------------------------------
- */
-package org.ow2.jonas.examples.cluster.javaee5.servlets;
-
-import java.io.IOException;
-
-import javax.servlet.RequestDispatcher;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.ow2.jonas.examples.cluster.javaee5.beans.samplecluster3.MyException;
-import org.ow2.jonas.examples.cluster.javaee5.beans.samplecluster3.MyStateless;
-
-
-
-/**
- * @author pelletib
- * Release an http session servlet
- */
-public class ExceptionServlet extends AbstractServlet {
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
-
- /**
- * doGet methode of the servlet
- * @param req http servlet request
- * @param res http servlet response
- * @throws ServletException servlet exception
- * @throws IOException io exception
- */
- @Override
- public void doGet(final HttpServletRequest req, final HttpServletResponse res) throws ServletException, IOException {
-
- MyStateless bean = getMyStateless();
- try {
- bean.throwMyException();
- } catch (MyException e) {
- getLogger().info("My Exception caught" + e);
- e.printStackTrace();
- req.setAttribute("expectedException", "OK");
- req.setAttribute("exception", e);
- } catch (Exception e) {
- getLogger().info("Exception caught" + e);
- e.printStackTrace();
- req.setAttribute("expectedException", "KO");
- req.setAttribute("exception", e);
- }
-
- RequestDispatcher disp = req.getRequestDispatcher("../jsp/exceptionRsp.jsp");
- disp.forward(req, res);
-
- return;
- }
-}
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/src/java/org/ow2/jonas/examples/cluster/javaee5/servlets/ReleaseServlet.java b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/src/java/org/ow2/jonas/examples/cluster/javaee5/servlets/ReleaseServlet.java
deleted file mode 100644
index 6daa0e44f167c54bb2280b8a547bfc6b2bb60c8d..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/src/java/org/ow2/jonas/examples/cluster/javaee5/servlets/ReleaseServlet.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/**
- * JOnAS: Java(TM) Open Application Server
- * Copyright (C) 2008 Bull S.A.S
- * Contact: jonas-team@objectweb.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- *
- * Initial developer(s):
- * --------------------------------------------------------------------------
- * $Id$
- * --------------------------------------------------------------------------
- */
-package org.ow2.jonas.examples.cluster.javaee5.servlets;
-
-import java.io.IOException;
-
-import javax.servlet.RequestDispatcher;
-import javax.servlet.ServletException;
-import javax.servlet.http.Cookie;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import javax.servlet.http.HttpSession;
-
-import org.ow2.jonas.examples.cluster.javaee5.beans.samplecluster3.MyStateful;
-
-/**
- * @author pelletib
- * Release an http session servlet
- */
-public class ReleaseServlet extends AbstractServlet {
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
-
- /**
- * doGet methode of the servlet
- * @param req http servlet request
- * @param res http servlet response
- * @throws ServletException servlet exception
- * @throws IOException io exception
- */
- @Override
- public void doGet(final HttpServletRequest req, final HttpServletResponse res) throws ServletException, IOException {
-
- // Get the session object to invalidate it
-
- HttpSession session = req.getSession(false);
- String sessionToReleaseInfo = "no session to invalidate";
- if (session != null) {
- // invalidate the SFSB
- MyStateful myStateful = (MyStateful) session.getAttribute("myStateful");
- myStateful.cleanup();
-
- // invalidate the HTTP session
- sessionToReleaseInfo = "session=" + session.getId() + " invalidated";
- session.setAttribute("myStateful", null);
- session.invalidate();
- }
- getLogger().info(sessionToReleaseInfo);
- req.setAttribute("sessionToReleaseInfo", sessionToReleaseInfo);
-
- Cookie[] cookies = req.getCookies();
- if (cookies != null) {
- Cookie ck = null;
- for (int i = 0; i < cookies.length; i++) {
- if (cookies[i].getName().equals("JSESSIONID")) {
- ck = (Cookie) cookies[i].clone();
- ck.setMaxAge(0);
- res.addCookie(ck);
- }
- }
- }
-
- // --------------
- // Write response
- // --------------
-
- RequestDispatcher disp = req.getRequestDispatcher("../jsp/releaseRsp.jsp");
- disp.forward(req, res);
-
- return;
- }
-}
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/src/java/org/ow2/jonas/examples/cluster/javaee5/servlets/SessionServlet.java b/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/src/java/org/ow2/jonas/examples/cluster/javaee5/servlets/SessionServlet.java
deleted file mode 100644
index 6dc5c0e29a4d6aec42076203126811693e395bc7..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/cluster-javaee5/src/java/org/ow2/jonas/examples/cluster/javaee5/servlets/SessionServlet.java
+++ /dev/null
@@ -1,168 +0,0 @@
-/**
- * JOnAS: Java(TM) Open Application Server
- * Copyright (C) 2005 Bull S.A.
- * Contact: jonas-team@objectweb.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- *
- * --------------------------------------------------------------------------
- * $Id:SessionServlet.java 14651 2008-07-28 11:50:13Z eyindanga $
- * --------------------------------------------------------------------------
- */
-
-package org.ow2.jonas.examples.cluster.javaee5.servlets;
-
-import java.io.IOException;
-import java.util.Properties;
-
-import javax.servlet.RequestDispatcher;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import javax.servlet.http.HttpSession;
-
-import org.ow2.jonas.examples.cluster.javaee5.beans.samplecluster3.MyStateful;
-
-/**
- * @author goebelg
- *
- * servlet which manages the different instantiations of the ejbs
- */
-public class SessionServlet extends AbstractServlet {
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
-
- /**
- * doGet methode of the servlet
- * @param req http servlet request
- * @param res http servlet response
- * @throws ServletException servlet exception
- * @throws IOException io exception
- */
- @Override
- public void doGet(final HttpServletRequest req, final HttpServletResponse res) throws ServletException, IOException {
- String jonasEJBServer = null;
- String ejbId = null;
- String ejbTotalCallsCount = null;
- String ejbEntityCreated = null;
- Properties prop = null;
-
- /*
- * ---------------------------------------- Update the session context -
- * sessiontest.counter : number of times this servlet has been called -
- * sessiontest.jonas. : counts the number of time the EJB was
- * served by JOnAS instance
- * -----------------------------------------
- */
- HttpSession session = req.getSession(true);
-
- // update sessiontest.counter
-
- Integer ival = (Integer) session.getAttribute("sessiontest.counter");
- if (ival == null) { // If counter is not in session, then create it
- ival = new Integer(1);
- } else {
- ival = new Integer(ival.intValue() + 1);
- }
- session.setAttribute("sessiontest.counter", ival);
-
- // Call EJB then update sessiontest.jonas.x
-
- try {
- prop = getMyStateless().getInfoProps();
- jonasEJBServer = prop.getProperty("EJB server");
- ejbId = prop.getProperty("EJB id");
- ejbTotalCallsCount = prop.getProperty("EJB total calls");
- } catch (Exception e) {
- e.printStackTrace();
- }
-
- // Retrieve or create the Stateful EJB to log history
-
- /*
- * getHandle() doesn't work
- * see bug http://jira.easybeans.org/browse/EZB-314
- *
- Handle h = (Handle) session.getAttribute("myStateful");
- MyStateful statefulBean = null;
- if (h == null) {
-
- statefulBean = getMyStateful();
- if (statefulBean != null) {
-
- h = statefulBean.getMyHandle();
- session.setAttribute("myStateful", h);
- statefulBean.setHTTPSessionId(session.getId());
- }
- } else {
- statefulBean = (MyStateful) PortableRemoteObject.narrow(h.getEJBObject(), MyStateful.class);
- } */
-
- MyStateful statefulBean = (MyStateful) session.getAttribute("myStateful");
- if (statefulBean == null) {
- getLogger().info("create new stateful");
- statefulBean = getMyStateful();
- if (statefulBean != null) {
- session.setAttribute("myStateful", statefulBean);
- statefulBean.setHTTPSessionId(session.getId());
- }
- }
-
- if (!session.isNew()) {
- session.setAttribute("sessiontest.old.EJB", session.getAttribute("sessiontest.EJB"));
- session.setAttribute("sessiontest.old.WEB", session.getAttribute("sessiontest.WEB"));
- }
- session.setAttribute("sessiontest.EJB", jonasEJBServer);
- session.setAttribute("sessiontest.WEB", getMyJonasInstanceName());
-
- req.setAttribute("jonas.EJB.served.by", jonasEJBServer);
- req.setAttribute("jonas.WEB.served.by", getMyJonasInstanceName());
-
- session.setAttribute("sessiontest.jonas.EJB_Server", jonasEJBServer);
- session.setAttribute("sessiontest.jonas.EJB_id", ejbId);
- session.setAttribute("sessiontest.jonas.nb_EJB_totalCalls", ejbTotalCallsCount);
-
- // Log information
-
- getLogger().info("session=" + session.getId() + " on jonas=" + getMyJonasInstanceName()
- + " - calls=" + ival + " - EJB served by jonas=" + jonasEJBServer + " - EJB total calls="
- + ejbTotalCallsCount);
-
- if (statefulBean != null) {
- try {
- statefulBean.log("
" + "
" + getMyJonasInstanceName() + "
" + "
" + jonasEJBServer
- + "
" + "
" + ejbTotalCallsCount + "
"
- + "
");
- } catch (Exception e) {
- getLogger().info("session=" + session.getId()
- + " : Exception when calling MyStateful EJB (" + e.getMessage() + ")");
- session.removeAttribute("myStateful");
- }
- }
- // --------------
- // Write response
- // --------------
-
- RequestDispatcher disp = req.getRequestDispatcher("../jsp/sessionRsp.jsp");
- disp.forward(req, res);
-
- return;
- }
-}
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/README b/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/README
deleted file mode 100644
index fa5397178bb2961cb204ec4b926dfc50b643a25f..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/README
+++ /dev/null
@@ -1,84 +0,0 @@
-J2EE 1.4 Example Overview:
------------------
-
-This example shows how to access an EJB deployed in a JOnAS EJB container, from
- - a servlet deployed in a Tomcat/Jetty container (thin client)
- - a client running inside the client container (heavy client)
-
-It also shows how to use security in Tomcat or Jetty to authentificate the user and in JOnAS
-to authorize the user to access the EJB methods. This aspect is described in details
-in the "Use Security in JOnAS with TOMCAT" howto of the JOnAS documentation.
-
-Besides, this example shows the uniform naming resource access supported in JOnAS.
-The servlet gets a javax.transaction.UserTransaction object reference from the JNDI
-using the "java:comp/UserTransaction" name. Moreover, it gets a reference on the
-bean's home using an environment entry: "java:comp/env/ejb/".
-
-This sample contains an example of using ejb-link which allows to link the EJB to the
-servlet. It is used in the web.xml file for both the ejb-ref and
-ejb-local-ref tags. It implies that when the servlet performs a lookup on the bean,
-the web classloader has got the visibility of the ejb class.
-This is due to the classloader hierarchy between the ear classloader, ejb
-classloader and the web classloader.
-
-Finally, this example shows how to add a resource adapter in an ear.
-
-The "src" directory contains
- - An EJB that is a stateful session Bean.
- - The servlet source of ServletOp.
- - The source of a client which run inside the client container with uniform naming available
- - The resource adapter source.
-
-The "etc" directory contains
- - the "xml" directory which contains all the deployment descriptors used for this example :
- * application.xml (ear file)
- * ejb-jar.xml and jonas-ejb-jar.xml (jar file)
- * web.xml, jonas-web.xml (war file)
- * ra.xml (rar file)
- * application-client.xml, jonas-client1.xml and jonas-client2.xml (two clients jar file)
- - the "resources" directory which contains all the resources for this application
- * "web" directory contains all resources used by the servlet
-
-
-Compiling this example creates an .ear file that represents an application including :
- - a session bean used by the web application
- - a web application that will be used by Tomcat or Jetty to run the servlet.
- - a resource adapter.
-
-Prerequisites
--------------
-First, you must have installed a web container (ie : Catalina or Jetty)
-as the web container service or you will use the heavy client
-
-Compiling and installing this example:
---------------------------------------
- ant install
-
-Running this example:
---------------------
-Commands are given for an Unix system.
-(Similar commands can be done on Windows)
-
-1) Run a JOnAS server:
- jonas start
-
-2a) Run your web browser (e.g., netscape):
- netscape http://:/j2ee-1.4
- where is the name of your machine (localhost by default)
- and the port number (9000 by default)
-
-2b) You can also lookup the Bean by using one of the client of the ear
-
- Use the default client (first found)
- java -jar $JONAS_ROOT/lib/client.jar ($JONAS_ROOT |$JONAS_BASE)/deploy/j2ee-1.4.ear -carolFile ($JONAS_ROOT |$JONAS_BASE)/conf/carol.properties
-
- Use a specific client
- java -jar $JONAS_ROOT/lib/client.jar ($JONAS_ROOT |$JONAS_BASE)/deploy/j2ee-1.4.ear -jarClient client2.jar -carolFile ($JONAS_ROOT |$JONAS_BASE)/conf/carol.properties
-
-
-Notes :
- the argument -carolFile is useless if you have rebuilt this example because in this
- case the carol.properties of your environment is inserted in earsample.ear
-
-3) Halt the JOnAS server
- jonas halt
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/build.xml b/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/build.xml
deleted file mode 100644
index 62009465bc352dbb5b3ac7328ea054077bb3745d..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/build.xml
+++ /dev/null
@@ -1,204 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/etc/resources/jaas/jaas.config b/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/etc/resources/jaas/jaas.config
deleted file mode 100644
index 73bdc1497ffaf765cd1546992894dddd1f954ed7..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/etc/resources/jaas/jaas.config
+++ /dev/null
@@ -1,13 +0,0 @@
-earsample {
- // Login Module to use for the example earsample.
-
- //First, use a LoginModule for the authentication
- // Use the resource memrlm_1
- org.ow2.jonas.security.auth.spi.JResourceLoginModule required
- resourceName="memrlm_1"
- ;
-
- // Use the login module to propagate security to the JOnAS server
- org.ow2.jonas.security.auth.spi.ClientLoginModule required
- ;
-};
\ No newline at end of file
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/etc/resources/web/img/jetty.gif b/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/etc/resources/web/img/jetty.gif
deleted file mode 100644
index 01f44a87f6801b200f142513d0d02b12cea0fb46..0000000000000000000000000000000000000000
Binary files a/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/etc/resources/web/img/jetty.gif and /dev/null differ
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/etc/resources/web/img/logoOW2.png b/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/etc/resources/web/img/logoOW2.png
deleted file mode 100644
index 71a185b68ed53e228e23c82c4ea0aa47b7556959..0000000000000000000000000000000000000000
Binary files a/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/etc/resources/web/img/logoOW2.png and /dev/null differ
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/etc/resources/web/img/ow_jonas_logo.gif b/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/etc/resources/web/img/ow_jonas_logo.gif
deleted file mode 100644
index 1b56943a721f82a8cb81776030567772265433f2..0000000000000000000000000000000000000000
Binary files a/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/etc/resources/web/img/ow_jonas_logo.gif and /dev/null differ
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/etc/resources/web/img/tomcat.gif b/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/etc/resources/web/img/tomcat.gif
deleted file mode 100644
index 61756736b82350f64b5ea1b2bfc31ac57e30a3d3..0000000000000000000000000000000000000000
Binary files a/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/etc/resources/web/img/tomcat.gif and /dev/null differ
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/etc/resources/web/img/valid-xhtml11.png b/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/etc/resources/web/img/valid-xhtml11.png
deleted file mode 100644
index 2c63d93f8868d574b9e69eda2727b7e7bf7fc8ec..0000000000000000000000000000000000000000
Binary files a/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/etc/resources/web/img/valid-xhtml11.png and /dev/null differ
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/etc/resources/web/img/vcss.png b/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/etc/resources/web/img/vcss.png
deleted file mode 100644
index 9b2f596e016533327216d98a0a927738fe17384f..0000000000000000000000000000000000000000
Binary files a/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/etc/resources/web/img/vcss.png and /dev/null differ
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/etc/resources/web/index.html b/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/etc/resources/web/index.html
deleted file mode 100644
index 48abd6db03f1926adf3fc0409bc5098032068444..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/etc/resources/web/index.html
+++ /dev/null
@@ -1,52 +0,0 @@
-
-
-
-
-
-
- J2EE 1.4 Example
-
-
-
-
-
-
-
-
-
-
-
- J2EE 1.4 Example : Servlet accessing a protected EJB
-
-
-
- This web application is packaged as an "ear".
- When you will click to access the servlet, your web browser will open a dialog box
- asking you a user ID and a password.
-
- Use : jonas for the user ID and jonas for the
- password
-
-
-
-
-
-
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/etc/resources/web/ow2_jonas.css b/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/etc/resources/web/ow2_jonas.css
deleted file mode 100644
index 9902f9b13e947e5818ae5e6216287363674d8cd4..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/etc/resources/web/ow2_jonas.css
+++ /dev/null
@@ -1,183 +0,0 @@
-/*
- Context Root css. based on css from http://jonas.objectweb.org
- XHTML by Florent BENOIT
-*/
-
-
-body
-{
- top: 10px;
- margin-top:10px;
- background-color: #FFF;
- color: #000000;
- }
-
-
-img {
- margin: 5px;
- border:0;
-}
-
-
-
-div.logos {
- top: 5px;
- width: 99%;
- text-align: right;
-}
-
-
-div.links {
- font-size: 14px;
- margin-top : 40px;
- margin-left : 100px;
-}
-
-
-div.titlepage {
- margin-left: 200px;
- font-family: Arial, Helvetica, sans-serif;
- font-size: 1.5em;
- line-height: 1.5em;
- border-bottom: 1px solid #0099cc;
- color : #ff6600;
- font-weight : bold;
-}
-
-
-div.footer {
- margin-top : 50px;
- color: #FFFFFF;
- font-size: 8pt;
- text-align: center;
-}
-
-
-/*HTML elements */
-
-
-
-ul, ol, dl
-{
- color: black;
- font-family: Arial,Helvetica, sans-serif;
- font-size: 12px;
- line-height: 16px;
- font-weight: normal;
-}
-
-li
-{
- color: black;
- font-family: Arial, Helvetica, sans-serif;
- font-size: 14px;
- font-weight: normal;
- margin: 10px 0px 5px 0px;
-
-}
-a
-{
- color: #3F3975;
- background-color: transparent;
- text-decoration: underline;
-}
-
-a:visited
-{
- color: #9898CB;
- background-color: transparent;
- text-decoration: underline;
-}
-
-a:hover
-{
- color: #E06611;
- background-color: transparent;
- text-decoration: underline;
-}
-
-
-a:active
-{
- color: #FFFFFF;
- background-color: #E06611;
- text-decoration: underline;
-}
-
-
-
-
-.h1, .h2, .h3, .h4, .h5 {
- color: #000;
- background-color: inherit;
- padding: 0;
-}
-
-.h1 {
- margin-top: 5px;
- font-size: 2em;
- line-height: 1.5em;
- margin: 30px 0 30px 0;
- border-bottom: 1px solid #0099cc;
- color : #ff6600;
- font-weight : bold;
-}
-
-.h2 {
- margin: 20px 0 15px 0;
- border-bottom: 1px solid #0099cc;
- font-weight:normal;
- font-style: normal;
- font-size: 1.6em;
- line-height: 1.4em;
- color : #0099cc
-}
-
-.h3 {
- font-weight: normal;
- font-size: 1.4em;
- line-height: 1.4em;
- margin: 20px 0 15px 0;
-}
-
-.h4 {
- font-weight:normal;
- color: #404040;
- margin: 20px 0 0 0;
- left: 0px;
- font-size: 1.4em;
- line-height: 1.4em;
-}
-.h5 {
- font-weight:normal;
- color: #404040;
- font-style: normal;
- margin: 0px;
- left: 0px;
- font-size: 1.2em;
- line-height: 1.2em;
-}
-
-td
-{
- color: black;
- font-family: Arial,Helvetica, sans-serif;
- font-size: 12px;
- font-weight: normal;
-}
-
-p
-{
- color: black;
- font-family: Arial,Helvetica, sans-serif;
- font-size: 12px;
- line-height: 16px;
- font-weight: normal;
- margin: 10px 10px 5px 0px;
-}
-
-p.error
-{
- color: red;
-}
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/etc/xml/application-client.xml b/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/etc/xml/application-client.xml
deleted file mode 100644
index e2688908b9cd44640acf0a6ce62744381625e783..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/etc/xml/application-client.xml
+++ /dev/null
@@ -1,72 +0,0 @@
-
-
-
-
-
- Client of the earsample
-
-
- envEntryString
- java.lang.String
-
- Test of envEntry of application-client.xml file
-
-
-
-
-
- ejb/Op
- Session
- org.ow2.jonas.earsample.beans.secusb.OpHome
- org.ow2.jonas.earsample.beans.secusb.Op
- secusb.jar#EarOp
-
-
-
-
- ejb/OpLink
- Session
- org.ow2.jonas.earsample.beans.secusb.OpHome
- org.ow2.jonas.earsample.beans.secusb.Op
- EarOp
-
-
-
- url/jonas
- java.net.URL
- Container
-
-
-
- org.ow2.jonas.security.auth.callback.LoginCallbackHandler
-
-
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/etc/xml/application.xml b/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/etc/xml/application.xml
deleted file mode 100644
index f91c69d089f29c65d794cefc2a762f9f2e9e7bf8..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/etc/xml/application.xml
+++ /dev/null
@@ -1,59 +0,0 @@
-
-
-
-
-
- ear example secusb/servlet
- earsample secusb/servlet
-
-
- secusb.jar
-
-
-
-
- earsample.war
- j2ee-1.4
-
-
-
-
- client1.jar
-
-
- client2.jar
-
-
-
- ra-sample.rar
-
-
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/etc/xml/jonas-client1.xml b/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/etc/xml/jonas-client1.xml
deleted file mode 100644
index 9a596a28de219d247769e84a5f0697bd4e4c3006..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/etc/xml/jonas-client1.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
- url/jonas
- http://jonas.ow2.org
-
-
-
- jaas.config
- earsample
- jonas
- jonas
-
-
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/etc/xml/jonas-client2.xml b/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/etc/xml/jonas-client2.xml
deleted file mode 100644
index a1bf42917d3328a05781cc5cfd9b629e3b9b36c4..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/etc/xml/jonas-client2.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
-
- url/jonas
- http://jonas.ow2.org
-
-
-
- jaas.config
- earsample
-
-
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/etc/xml/jonas-secusb.xml b/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/etc/xml/jonas-secusb.xml
deleted file mode 100644
index ca04b169dbabb1e2aa96fb0c0cab7e7d16639f07..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/etc/xml/jonas-secusb.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
- EarOp
- EarOpHome
-
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/etc/xml/jonas-web.xml b/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/etc/xml/jonas-web.xml
deleted file mode 100644
index e66d881247ae0b0c44d2d0f3aef8ddb14dbfdcb6..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/etc/xml/jonas-web.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
- url/URL
- http://jonas.ow2.org
-
-
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/etc/xml/ra.xml b/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/etc/xml/ra.xml
deleted file mode 100644
index 3aeee3e280adb299a6e0a6f6e42d6b5970641c05..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/etc/xml/ra.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-
-
- rar sample
- rar sample
- OW2
-
- 1.0
-
- false
-
-
-
-
- org.ow2.jonas.earsample.resourceadapters.ResourceAdapterImpl
-
-
-
- JNDI name
- jndiName
-
- java.lang.String
-
-
- eisName
-
-
-
- URL for EIS instance
- EisURL
-
- java.lang.String
-
-
- EIS_URL
-
-
-
-
\ No newline at end of file
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/etc/xml/secusb.xml b/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/etc/xml/secusb.xml
deleted file mode 100644
index 53820328257fb1098ba0150c95870def2b887fc8..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/etc/xml/secusb.xml
+++ /dev/null
@@ -1,60 +0,0 @@
-
-
-
-
- secured session bean JOnAS example
-
- secusb (earsample)
-
-
-
- EarOp
- org.ow2.jonas.earsample.beans.secusb.OpHome
- org.ow2.jonas.earsample.beans.secusb.Op
- org.ow2.jonas.earsample.beans.secusb.OpLocalHome
- org.ow2.jonas.earsample.beans.secusb.OpLocal
- org.ow2.jonas.earsample.beans.secusb.OpBean
- Stateful
- Container
-
-
-
-
-
- tomcat
-
-
- jetty
-
-
-
- tomcat
-
- EarOp
- *
-
-
-
-
- jetty
-
- EarOp
- *
-
-
-
-
-
- EarOp
- *
-
- Supports
-
-
-
-
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/etc/xml/web.xml b/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/etc/xml/web.xml
deleted file mode 100644
index f9ad76e411aa4ac330cdded24441cb16ea30d3bb..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/etc/xml/web.xml
+++ /dev/null
@@ -1,110 +0,0 @@
-
-
-
-
-
- Op
-
- org.ow2.jonas.earsample.servlets.ServletOp
-
-
-
-
- Op
- /secured/Op
-
-
-
- url/URL
- java.net.URL
- Application
-
-
-
-
- Protected Area
-
- /secured/*
-
- DELETE
- GET
- POST
- PUT
-
-
-
- tomcat
- jetty
-
-
-
-
-
- BASIC
- JOnAS Realm
-
-
-
-
- tomcat
-
-
-
- jetty
-
-
-
-
- envEntryString
- java.lang.String
-
- This is a string from the env-entry
-
-
-
-
- ejb/Op
- Session
- org.ow2.jonas.earsample.beans.secusb.OpHome
- org.ow2.jonas.earsample.beans.secusb.Op
- EarOp
-
-
-
- ejb/OpLocal
- Session
-
- org.ow2.jonas.earsample.beans.secusb.OpLocalHome
-
- org.ow2.jonas.earsample.beans.secusb.OpLocal
- secusb.jar#EarOp
-
-
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/src/java/org/ow2/jonas/earsample/beans/secusb/Op.java b/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/src/java/org/ow2/jonas/earsample/beans/secusb/Op.java
deleted file mode 100644
index 2f7b4bfc36d5a3e630790079bbc93cb79ed0be4d..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/src/java/org/ow2/jonas/earsample/beans/secusb/Op.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * JOnAS: Java(TM) Open Application Server
- * Copyright (C) 1999-2004 Bull S.A.
- * Contact: jonas-team@ow2.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- *
- * Initial developer(s):
- * --------------------------------------------------------------------------
- * $Id$
- * --------------------------------------------------------------------------
- */
-
-package org.ow2.jonas.earsample.beans.secusb;
-
-import javax.ejb.EJBObject;
-import java.rmi.RemoteException;
-
-/**
- * Remote interface for the bean Op
- * @author JOnAS team
- */
-public interface Op extends EJBObject {
-
- /**
- * Business method implementation.
- * @param shares nb of shares to be bought
- * @throws RemoteException if RMI failed.
- */
- void buy (int shares) throws RemoteException;
-
- /**
- * Business method implementation.
- * @return the nb of shares bought
- * @throws RemoteException if RMI failed.
- */
- int read () throws RemoteException;
-
-}
\ No newline at end of file
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/src/java/org/ow2/jonas/earsample/beans/secusb/OpBean.java b/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/src/java/org/ow2/jonas/earsample/beans/secusb/OpBean.java
deleted file mode 100644
index 4df11b2e919a6f27f0de44350694df66d7186593..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/src/java/org/ow2/jonas/earsample/beans/secusb/OpBean.java
+++ /dev/null
@@ -1,247 +0,0 @@
-/**
- * JOnAS: Java(TM) Open Application Server
- * Copyright (C) 1999-2004 Bull S.A.
- * Contact: jonas-team@ow2.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- *
- * Initial developer(s):
- * --------------------------------------------------------------------------
- * $Id$
- * --------------------------------------------------------------------------
- */
-
-package org.ow2.jonas.earsample.beans.secusb;
-
-import javax.ejb.EJBException;
-import javax.ejb.SessionBean;
-import javax.ejb.SessionContext;
-import javax.ejb.SessionSynchronization;
-
-/**
- * This is an example of Session Bean, statefull, and synchronized.
- * @author JOnAS team
- */
-public class OpBean implements SessionBean, SessionSynchronization {
-
- /**
- * Actual state of the bean
- */
- private int total = 0;
-
- /**
- * value inside Tx, not yet committed.
- */
- private int newtotal = 0;
-
- /**
- * User client
- */
- private String clientUser = null;
-
- /**
- * Session context that the container provides for a session enterprise Bean
- * instance.
- */
- private SessionContext sessionContext = null;
-
- /* ========================= ejbCreate methods ============================ */
-
- /**
- * There must be one ejbCreate() method per create() method on the Home
- * interface, and with the same signature.
- * @param user the user name
- */
- public void ejbCreate(String user) {
- total = 0;
- // in case we are outside transactions
- newtotal = total;
- clientUser = user;
- }
-
- /* =============== javax.ejb.SessionBean 2.0 implementation ============== */
-
- /**
- * The activate method is called when the instance is activated from its
- * "passive" state. The instance should acquire any resource that it has
- * released earlier in the ejbPassivate() method. This method is called with
- * no transaction context.
- * @throws EJBException Thrown by the method to indicate a failure caused by
- * a system-level error.
- * @throws java.rmi.RemoteException This exception is defined in the method
- * signature to provide backward compatibility for enterprise beans
- * written for the EJB 1.0 specification. Enterprise beans written
- * for the EJB 1.1 specification should throw the
- * javax.ejb.EJBException instead of this exception. Enterprise
- * beans written for the EJB2.0 and higher specifications must throw
- * the javax.ejb.EJBException instead of this exception.
- */
- public void ejbActivate() throws EJBException, java.rmi.RemoteException {
- // Nothing to do for this simple example
- }
-
- /**
- * The passivate method is called before the instance enters the "passive"
- * state. The instance should release any resources that it can re-acquire
- * later in the ejbActivate() method. After the passivate method completes,
- * the instance must be in a state that allows the container to use the Java
- * Serialization protocol to externalize and store away the instance's
- * state. This method is called with no transaction context.
- * @throws EJBException Thrown by the method to indicate a failure caused by
- * a system-level error.
- * @throws java.rmi.RemoteException This exception is defined in the method
- * signature to provide backward compatibility for enterprise beans
- * written for the EJB 1.0 specification. Enterprise beans written
- * for the EJB 1.1 specification should throw the
- * javax.ejb.EJBException instead of this exception. Enterprise
- * beans written for the EJB2.0 and higher specifications must throw
- * the javax.ejb.EJBException instead of this exception.
- */
- public void ejbPassivate() throws EJBException, java.rmi.RemoteException {
- // Nothing to do for this simple example
- }
-
- /**
- * A container invokes this method before it ends the life of the session
- * object. This happens as a result of a client's invoking a remove
- * operation, or when a container decides to terminate the session object
- * after a timeout. This method is called with no transaction context.
- * @throws EJBException Thrown by the method to indicate a failure caused by
- * a system-level error.
- * @throws java.rmi.RemoteException This exception is defined in the method
- * signature to provide backward compatibility for enterprise beans
- * written for the EJB 1.0 specification. Enterprise beans written
- * for the EJB 1.1 specification should throw the
- * javax.ejb.EJBException instead of this exception. Enterprise
- * beans written for the EJB2.0 and higher specifications must throw
- * the javax.ejb.EJBException instead of this exception.
- */
- public void ejbRemove() throws EJBException, java.rmi.RemoteException {
- // Nothing to do for this simple example
- }
-
- /**
- * Set the associated session context. The container calls this method after
- * the instance creation. The enterprise Bean instance should store the
- * reference to the context object in an instance variable. This method is
- * called with no transaction context.
- * @param sessionContext A SessionContext interface for the instance.
- * @throws EJBException Thrown by the method to indicate a failure caused by
- * a system-level error.
- * @throws java.rmi.RemoteException This exception is defined in the method
- * signature to provide backward compatibility for applications
- * written for the EJB 1.0 specification. Enterprise beans written
- * for the EJB 1.1 specification should throw the
- * javax.ejb.EJBException instead of this exception. Enterprise
- * beans written for the EJB2.0 and higher specifications must throw
- * the javax.ejb.EJBException instead of this exception.
- */
- public void setSessionContext(SessionContext sessionContext) throws EJBException, java.rmi.RemoteException {
- this.sessionContext = sessionContext;
- }
-
- /*
- * ============== javax.ejb.SessionSynchronization implementation
- * =============
- */
-
- /**
- * The afterBegin method notifies a session Bean instance that a new
- * transaction has started, and that the subsequent business methods on the
- * instance will be invoked in the context of the transaction. The instance
- * can use this method, for example, to read data from a database and cache
- * the data in the instance fields. This method executes in the proper
- * transaction context.
- * @throws EJBException Thrown by the method to indicate a failure caused by
- * a system-level error.
- * @throws java.rmi.RemoteException - This exception is defined in the
- * method signature to provide backward compatibility for enterprise
- * beans written for the EJB 1.0 specification. Enterprise beans
- * written for the EJB 1.1 and higher specifications should throw
- * the javax.ejb.EJBException instead of this exception. Enterprise
- * beans written for the EJB 2.0 and higher specifications must not
- * throw the java.rmi.RemoteException.
- */
- public void afterBegin() throws EJBException, java.rmi.RemoteException {
- newtotal = total;
- }
-
- /**
- * The beforeCompletion method notifies a session Bean instance that a
- * transaction is about to be committed. The instance can use this method,
- * for example, to write any cached data to a database. This method executes
- * in the proper transaction context. Note: The instance may still
- * cause the container to rollback the transaction by invoking the
- * setRollbackOnly() method on the instance context, or by throwing an
- * exception.
- * @throws EJBException Thrown by the method to indicate a failure caused by
- * a system-level error.
- * @throws java.rmi.RemoteException - This exception is defined in the
- * method signature to provide backward compatibility for enterprise
- * beans written for the EJB 1.0 specification. Enterprise beans
- * written for the EJB 1.1 and higher specifications should throw
- * the javax.ejb.EJBException instead of this exception. Enterprise
- * beans written for the EJB 2.0 and higher specifications must not
- * throw the java.rmi.RemoteException.
- */
- public void beforeCompletion() throws EJBException, java.rmi.RemoteException {
- }
-
- /**
- * The afterCompletion method notifies a session Bean instance that a
- * transaction commit protocol has completed, and tells the instance whether
- * the transaction has been committed or rolled back. This method executes
- * with no transaction context.
- * @param committed - True if the transaction has been committed, false if
- * is has been rolled back.
- * @throws EJBException Thrown by the method to indicate a failure caused by
- * a system-level error.
- * @throws java.rmi.RemoteException - This exception is defined in the
- * method signature to provide backward compatibility for enterprise
- * beans written for the EJB 1.0 specification. Enterprise beans
- * written for the EJB 1.1 and higher specifications should throw
- * the javax.ejb.EJBException instead of this exception. Enterprise
- * beans written for the EJB 2.0 and higher specifications must not
- * throw the java.rmi.RemoteException.
- */
- public void afterCompletion(boolean committed) throws EJBException, java.rmi.RemoteException {
-
- if (committed) {
- total = newtotal;
- } else {
- newtotal = total;
- }
- }
-
- /* ========================= Op implementation ============================ */
-
- /**
- * Business method implementation.
- * @param s nb of shares to be bought
- */
- public void buy(int s) {
- newtotal = newtotal + s;
- return;
- }
-
- /**
- * Business method implementation.
- * @return the nb of shares bought
- */
- public int read() {
- return newtotal;
- }
-}
\ No newline at end of file
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/src/java/org/ow2/jonas/earsample/beans/secusb/OpHome.java b/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/src/java/org/ow2/jonas/earsample/beans/secusb/OpHome.java
deleted file mode 100644
index f9961dec81b2d3f547f1421532f70aa898a360f6..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/src/java/org/ow2/jonas/earsample/beans/secusb/OpHome.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- * JOnAS: Java(TM) Open Application Server
- * Copyright (C) 1999-2004 Bull S.A.
- * Contact: jonas-team@ow2.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- *
- * Initial developer(s):
- * --------------------------------------------------------------------------
- * $Id$
- * --------------------------------------------------------------------------
- */
-
-package org.ow2.jonas.earsample.beans.secusb;
-
-import java.rmi.RemoteException;
-import javax.ejb.CreateException;
-import javax.ejb.EJBHome;
-
-/**
- * Home interface for the bean Op
- * @author JOnAS team
- */
-public interface OpHome extends EJBHome {
-
- /**
- * Create an instance of the Op bean.
- * @param user the user name.
- * @return the Remote interface of the bean Op.
- * @throws CreateException if the creation failed.
- * @throws RemoteException if the RMI call failed.
- */
- Op create(String user) throws CreateException, RemoteException;
-}
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/src/java/org/ow2/jonas/earsample/beans/secusb/OpLocal.java b/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/src/java/org/ow2/jonas/earsample/beans/secusb/OpLocal.java
deleted file mode 100644
index 82ca738c2d86646f8242675be2dd1f876fb19a9d..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/src/java/org/ow2/jonas/earsample/beans/secusb/OpLocal.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * JOnAS: Java(TM) Open Application Server
- * Copyright (C) 1999-2004 Bull S.A.
- * Contact: jonas-team@ow2.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- *
- * Initial developer(s):
- * --------------------------------------------------------------------------
- * $Id$
- * --------------------------------------------------------------------------
- */
-
-package org.ow2.jonas.earsample.beans.secusb;
-
-import javax.ejb.EJBLocalObject;
-
-/**
- * Local interface for the bean Op
- * @author JOnAS team
- */
-public interface OpLocal extends EJBLocalObject {
-
- /**
- * Business method implementation.
- * @param shares nb of shares to be bought
- */
- void buy(int shares);
-
- /**
- * Business method implementation.
- * @return the nb of shares bought
- */
- int read();
-}
\ No newline at end of file
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/src/java/org/ow2/jonas/earsample/beans/secusb/OpLocalHome.java b/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/src/java/org/ow2/jonas/earsample/beans/secusb/OpLocalHome.java
deleted file mode 100644
index 187bd3e9500d590c3fd52fcc988b682aba3ec1a4..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/src/java/org/ow2/jonas/earsample/beans/secusb/OpLocalHome.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * JOnAS: Java(TM) Open Application Server
- * Copyright (C) 1999-2004 Bull S.A.
- * Contact: jonas-team@ow2.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- *
- * Initial developer(s):
- * --------------------------------------------------------------------------
- * $Id$
- * --------------------------------------------------------------------------
- */
-
-package org.ow2.jonas.earsample.beans.secusb;
-
-import javax.ejb.CreateException;
-import javax.ejb.EJBLocalHome;
-
-/**
- * Local home interface for the bean Op
- * @author JOnAS team
- */
-public interface OpLocalHome extends EJBLocalHome {
-
- /**
- * Create an instance of the Op bean.
- * @param user the user name.
- * @return the Remote interface of the bean Op.
- * @throws CreateException if the creation failed.
- */
- OpLocal create(String user) throws CreateException;
-}
\ No newline at end of file
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/src/java/org/ow2/jonas/earsample/clients/Client.java b/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/src/java/org/ow2/jonas/earsample/clients/Client.java
deleted file mode 100644
index 9c7b51012530d3464e3b2d48b6acaa1a5423dfa1..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/src/java/org/ow2/jonas/earsample/clients/Client.java
+++ /dev/null
@@ -1,190 +0,0 @@
-/**
- * JOnAS: Java(TM) Open Application Server
- * Copyright (C) 1999-2004 Bull S.A.
- * Contact: jonas-team@ow2.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- *
- * Initial developer: Florent Benoit
- *
- * --------------------------------------------------------------------------
- * $Id$
- * --------------------------------------------------------------------------
- */
-
-package org.ow2.jonas.earsample.clients;
-
-import java.net.URL;
-
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.transaction.UserTransaction;
-import javax.rmi.PortableRemoteObject;
-
-import org.ow2.jonas.earsample.beans.secusb.Op;
-import org.ow2.jonas.earsample.beans.secusb.OpHome;
-
-
-/**
- * Heavy client doing some operations on a bean
- * @author jonas team
- */
-public class Client {
-
- /**
- * First amount to buy
- */
- private static final int FIRST_BUY_AMOUNT = 10;
-
- /**
- * Second amount to buy
- */
- private static final int SECOND_BUY_AMOUNT = 20;
-
- /**
- * Third amount to buy (will be rollback)
- */
- private static final int THIRD_BUY_AMOUNT = 50;
-
- /**
- * Constructor. Hide constructor as it is an utility class
- */
- private Client() {
-
- }
-
- /**
- * Main method
- * @param args arguments of the client
- */
- public static void main(String[] args) {
-
- Context initialContext = null;
- System.out.print("Building a new InitialContext...");
- try {
- initialContext = new InitialContext();
- } catch (Exception e) {
- System.err.println("Cannot get initial context for JNDI: " + e);
- System.exit(2);
- }
- System.out.println("done !");
-
- System.out.print("Looking up java:comp/UserTransaction ...");
- // We want to start transactions from client: get UserTransaction
- UserTransaction utx = null;
- try {
- utx = (UserTransaction) initialContext.lookup("java:comp/UserTransaction");
- } catch (Exception e) {
- System.err.println("Cannot lookup UserTransaction: " + e);
- System.exit(2);
- }
- System.out.println("done !");
-
- String envEntry = null;
- System.out.print("Looking up java:comp/env/envEntryString ...");
- try {
- envEntry = (String) initialContext.lookup("java:comp/env/envEntryString");
- } catch (Exception e) {
- System.err.println("Cannot get env-entry on JNDI " + e);
- System.exit(2);
- }
- System.out.println("done !");
- System.out.println("Env entry is : " + envEntry);
-
- URL url = null;
- System.out.print("Looking up java:comp/env/url/jonas ...");
- try {
- url = (URL) initialContext.lookup("java:comp/env/url/jonas");
- } catch (Exception e) {
- System.err.println("Cannot get URL on JNDI " + e);
- System.exit(2);
- }
- System.out.println("done !");
- System.out.println("Web site of jonas is at :" + url);
-
- System.out.print("Looking up java:comp/env/ejb/Op ...");
- // Connecting to OpHome thru JNDI
- OpHome home = null;
- try {
- home = (OpHome) PortableRemoteObject.narrow(initialContext.lookup("java:comp/env/ejb/Op"), OpHome.class);
- System.out.println("done !");
- } catch (Exception e) {
- e.printStackTrace();
- System.err.println("Cannot lookup OpHome: " + e);
- System.exit(2);
- }
-
- // OpBean creation
- Op t1 = null;
- try {
- System.out.println("Create a bean");
- t1 = home.create("User1");
- } catch (Exception e) {
- System.err.println("Cannot create OpBean: " + e);
- System.exit(2);
- }
-
- // First transaction (committed)
- try {
- System.out.println("Start a first transaction");
- utx.begin();
- System.out.println("First request on the new bean");
- t1.buy(FIRST_BUY_AMOUNT);
- System.out.println("Second request on the bean");
- t1.buy(SECOND_BUY_AMOUNT);
- System.out.println("Commit the transaction");
- utx.commit();
- } catch (Exception e) {
- System.err.println("exception during 1st Tx: " + e);
- System.exit(2);
- }
- // Start another transaction (rolled back)
- try {
- System.out.println("Start a second transaction");
- utx.begin();
- t1.buy(THIRD_BUY_AMOUNT);
- System.out.println("Rollback the transaction");
- utx.rollback();
- } catch (Exception e) {
- System.err.println("exception during 2nd Tx: " + e);
- System.exit(2);
- }
-
- // Get the total bought, outside the transaction
- int val = 0;
- try {
- System.out.println("Request outside any transaction");
- val = t1.read();
- } catch (Exception e) {
- System.err.println("Cannot read value on t1 : " + e);
- System.exit(2);
- }
- if (val != FIRST_BUY_AMOUNT + SECOND_BUY_AMOUNT) {
- System.err.println("Bad value read: " + val);
- System.exit(2);
- }
-
- // Remove Session bean
- try {
- t1.remove();
- } catch (Exception e) {
- System.out.println("Exception on buy: " + e);
- System.exit(2);
- }
- System.out.println("ClientOp OK. Exiting.");
- }
-}
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/src/java/org/ow2/jonas/earsample/resourceadapters/ResourceAdapterImpl.java b/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/src/java/org/ow2/jonas/earsample/resourceadapters/ResourceAdapterImpl.java
deleted file mode 100644
index 8886fde8a067f538b164fd18752b20b78bc3cdb0..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/src/java/org/ow2/jonas/earsample/resourceadapters/ResourceAdapterImpl.java
+++ /dev/null
@@ -1,191 +0,0 @@
-/**
- * JOnAS: Java(TM) Open Application Server
- * Copyright (C) 1999-2005 Bull S.A.
- * Contact: jonas-team@ow2.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- *
- * --------------------------------------------------------------------------
- * $Id$
- * --------------------------------------------------------------------------
- */
-
-package org.ow2.jonas.earsample.resourceadapters;
-
-
-import java.net.MalformedURLException;
-import java.util.HashMap;
-
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-import javax.resource.NotSupportedException;
-import javax.resource.ResourceException;
-import javax.resource.spi.ActivationSpec;
-import javax.resource.spi.BootstrapContext;
-import javax.resource.spi.ResourceAdapterInternalException;
-import javax.resource.spi.endpoint.MessageEndpointFactory;
-import javax.transaction.xa.XAResource;
-
-/**
- * A Resource adapter
- * @author kemlerp
- *
- */
-public class ResourceAdapterImpl implements javax.resource.spi.ResourceAdapter, java.io.Serializable {
-
-
- /**
- * serialVersionUID
- */
- private static final long serialVersionUID = 3834312812943456568L;
-
- /**
- * String should be the RA name when set, ie, EIS
- */
- private String eisurl;
-
- /**
- * The JNDI name
- */
- private String jndiName;
-
- /**
- * Initial context
- */
- private InitialContext ictx;
-
- /**
- * BootstrapContext
- */
- private BootstrapContext bootstrapCtx = null; // set in start()
-
- /**
- * EndpointFactories
- */
- private transient HashMap endpointFactories = new HashMap();
-
-
- /**
- * Start
- * @param bootstrapCtx bootstrapCtx
- * @throws ResourceAdapterInternalException if an error occurs
- */
- public void start(BootstrapContext bootstrapCtx) throws ResourceAdapterInternalException {
- this.bootstrapCtx = bootstrapCtx;
-
- try {
- ictx = new InitialContext();
- ictx.bind(jndiName, eisurl);
- } catch (NamingException e) {
- e.printStackTrace();
- }
-
- }
-
- /**
- * Stop
- */
- public void stop() {
- try {
- ictx.unbind(jndiName);
- } catch (NamingException e) {
- e.printStackTrace();
- }
- }
-
-
- /**
- * Called by the application server when a message-driven bean
- * (MessageEndpoint) is deployed.
- * @param factory MessageEndpointFactory
- * @param spec activation spec
- * @throws NotSupportedException if an error occurs
- * @throws ResourceAdapterInternalException if an error occurs
- */
- public void endpointActivation(MessageEndpointFactory factory, ActivationSpec spec) throws NotSupportedException,
- ResourceAdapterInternalException {
- endpointFactories.put(spec, factory);
- }
-
- /**
- * Endpoint Deactivation
- * @param factory MessageEndpointFactory
- * @param spec activation spec
- */
- public void endpointDeactivation(MessageEndpointFactory factory, ActivationSpec spec) {
- endpointFactories.remove(spec);
- }
-
- /**
- * Get XAResources
- * @param specs A tab of specs
- * @throws ResourceException if an error occurs
- * @return Tab of XAResources
- */
- public XAResource[] getXAResources(ActivationSpec[] specs) throws ResourceException {
- return null;
- }
-
- /**
- * Get Eis URL
- * @return Eis URL
- */
- public String getEisURL() {
- return eisurl.toString();
- }
-
- /**
- * Set Eis URL
- * @param eisURL Eis URL
- * @throws MalformedURLException if 'eisURL' is not a URL
- */
- public void setEisURL(String eisURL) throws MalformedURLException {
- // ra.xml deployment supplies value
- this.eisurl = eisURL;
- }
-
- /**
- * Get BootstrapContext
- * @return bootstrapCtx
- */
- public BootstrapContext getBootstrapCtx() {
- return bootstrapCtx;
- }
-
- /**
- * Set BootstrapContext
- * @param bootstrapCtx bootstrapContext
- */
- public void setBootstrapCtx(BootstrapContext bootstrapCtx) {
- this.bootstrapCtx = bootstrapCtx;
- }
-
- /**
- * Get used JNDI name
- * @return A string
- */
- public String getJndiName() {
- return jndiName;
- }
-
- /**
- * Set JNDI name
- * @param jndiName a string
- */
- public void setJndiName(String jndiName) {
- this.jndiName = jndiName;
- }
-}
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/src/java/org/ow2/jonas/earsample/servlets/ServletOp.java b/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/src/java/org/ow2/jonas/earsample/servlets/ServletOp.java
deleted file mode 100644
index 7afcbaeb7f19e462b2b76d6adaba525cb1855862..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/j2ee1.4/src/java/org/ow2/jonas/earsample/servlets/ServletOp.java
+++ /dev/null
@@ -1,305 +0,0 @@
-/**
- * JOnAS: Java(TM) Open Application Server
- * Copyright (C) 1999-2005 Bull S.A.
- * Contact: jonas-team@ow2.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- *
- * --------------------------------------------------------------------------
- * $Id$
- * --------------------------------------------------------------------------
- */
-
-package org.ow2.jonas.earsample.servlets;
-
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.net.URL;
-
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.rmi.PortableRemoteObject;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import javax.transaction.UserTransaction;
-
-import org.ow2.jonas.earsample.beans.secusb.Op;
-import org.ow2.jonas.earsample.beans.secusb.OpHome;
-import org.ow2.jonas.earsample.beans.secusb.OpLocal;
-import org.ow2.jonas.earsample.beans.secusb.OpLocalHome;
-
-
-/**
- * This servlet is an example to show how to access a EJB from a servlet
- * @author JOnAS team
- */
-public class ServletOp extends HttpServlet {
-
- /**
- * First amount to buy
- */
- private static final int FIRST_BUY_AMOUNT = 10;
-
- /**
- * Second amount to buy
- */
- private static final int SECOND_BUY_AMOUNT = 20;
-
- /**
- * Third amount to buy (will be rollback)
- */
- private static final int THIRD_BUY_AMOUNT = 50;
-
-
- /**
- * Called by the server (via the service method) to allow a servlet to
- * handle a GET request.
- * @param request an HttpServletRequest object that contains the request
- * the client has made of the servlet
- * @param response an HttpServletResponse object that contains the
- * response the servlet sends to the client
- * @throws IOException if an input or output error is detected when the
- * servlet handles the GET request
- * @throws ServletException if the request for the GET could not be handled
- */
- public void doGet(HttpServletRequest request, HttpServletResponse response)
- throws IOException, ServletException {
-
- response.setContentType("text/html");
- PrintWriter out = response.getWriter();
- out.println("");
- out.println("");
- out.println("");
- out.println("");
- out.println("Ear Sample of Servlet accessing a protected EJB");
- out.println("");
- out.println("");
- out.println("
Ear sample of Servlet accessing a protected EJB");
- out.println("
");
-
-
- out.println("Sample is OK. ");
- out.println("");
- out.println("");
- }
-}
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/README b/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/README
deleted file mode 100644
index b1005dc878dc0ad3414bb5c982863a9760eb53ef..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/README
+++ /dev/null
@@ -1,8 +0,0 @@
-- Ant tool must be launched in this directory
- --> a file named javaee5-earsample.ear is produced in $JONAS_BASE/deploy
-
-- Start JOnAS
-
-- Go on http://localhost:9000/javaee5-earsample/
-
-- Example is ready
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/build.xml b/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/build.xml
deleted file mode 100644
index 55008ce55fb8cd9123cd248d5335ca0eadb9ffd0..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/build.xml
+++ /dev/null
@@ -1,198 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/etc/application.xml b/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/etc/application.xml
deleted file mode 100644
index b0079c89648c76c40fda3e5d50c7ae9bbc5436ed..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/etc/application.xml
+++ /dev/null
@@ -1,66 +0,0 @@
-
-
-
-
-
-
- Java EE 5.0 EAR Sample
- Java EE 5.0 EAR Sample
-
-
-
- ejb3.jar
-
-
-
-
-
- javaee5-earsample.war
- javaee5-earsample
-
-
-
-
-
-
- jms-application-client.jar
-
-
-
- not-secured-application-client.jar
-
-
-
- jaas-secured-application-client.jar
-
-
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/etc/jaas-secured-application-client.xml b/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/etc/jaas-secured-application-client.xml
deleted file mode 100644
index a663fd65656768a3ca5afa1980c775dcf6f6383a..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/etc/jaas-secured-application-client.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-
-
-
-
-
- OW2 JOnAS :: EAR Sample :: Secured Application Client
-
- org.ow2.jonas.security.auth.callback.LoginCallbackHandler
-
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/etc/jaas-secured-jonas-client.xml b/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/etc/jaas-secured-jonas-client.xml
deleted file mode 100644
index fd573be9c7804373514dccbde8aaf8b21b80382f..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/etc/jaas-secured-jonas-client.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-
-
-
-
-
-
- jaas.config
- javaee5-earsample
- jonas
- jonas
-
-
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/etc/jaas.config b/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/etc/jaas.config
deleted file mode 100644
index 517159a434442b0b0feaf2880e0f8e7092021a4e..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/etc/jaas.config
+++ /dev/null
@@ -1,37 +0,0 @@
-// ---------------------------------------------------------------------------
-// JOnAS: Java(TM) Open Application Server
-// Copyright (C) 2008 Bull S.A.S.
-// Contact: jonas-team@ow2.org
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
-// USA
-//
-// ---------------------------------------------------------------------------
-// $Id: build.properties 12246 2007-12-09 21:42:38Z benoitf $
-// ---------------------------------------------------------------------------
-
-javaee5-earsample {
- // Login Module to use for the example javaee5-earsample.
-
- // First, use a LoginModule for the authentication
- // Use the resource memrlm_1
- org.ow2.jonas.security.auth.spi.JResourceLoginModule required
- resourceName="memrlm_1"
- ;
-
- // Use the login module to propagate security to the JOnAS server
- org.ow2.jonas.security.auth.spi.ClientLoginModule required
- ;
-};
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/etc/jms-application-client.xml b/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/etc/jms-application-client.xml
deleted file mode 100644
index 60620aadf75e6515dd963d47b1fd8731d2d14392..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/etc/jms-application-client.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-
-
-
-
-
- OW2 JOnAS :: EAR Sample :: JMS Application Client
-
-
-
- jms/QueueConnectionFactory
- javax.jms.QueueConnectionFactory
- Container
-
-
-
-
- jms/SampleQueue
- javax.jms.Queue
-
-
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/etc/jms-jonas-client.xml b/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/etc/jms-jonas-client.xml
deleted file mode 100644
index c9a5fe9d4af58dbf7ede7561bb5417672dc59f6a..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/etc/jms-jonas-client.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
-
-
-
-
- jms/QueueConnectionFactory
- JQCF
-
-
-
- jms/SampleQueue
- SampleQueue
-
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/etc/not-secured-application-client.xml b/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/etc/not-secured-application-client.xml
deleted file mode 100644
index 38c9eca304cba73780de14c6150d4535d7fde6b0..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/etc/not-secured-application-client.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
-
-
-
- OW2 JOnAS :: EAR Sample :: Not Secured Application Client
-
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/etc/not-secured-jonas-client.xml b/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/etc/not-secured-jonas-client.xml
deleted file mode 100644
index 01975d466417591ecff6f1c3a8767b0c48ebc4c4..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/etc/not-secured-jonas-client.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
-
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/etc/persistence.xml b/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/etc/persistence.xml
deleted file mode 100644
index 051059f7763aeb41dbe857d79fea3bcf6c3bddd0..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/etc/persistence.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
-
-
-
- jdbc_1
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/etc/web.xml b/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/etc/web.xml
deleted file mode 100644
index f71cc4a400238ddcc60803504f1a14bdb234eec8..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/etc/web.xml
+++ /dev/null
@@ -1,84 +0,0 @@
-
-
-
-
-
-
-
- DisplayServlet
- org.ow2.jonas.examples.ear.web.ExampleServlet
-
-
-
- AdminServlet
- org.ow2.jonas.examples.ear.web.AdminServlet
-
-
-
- DisplayServlet
- /display
-
-
-
- AdminServlet
- /secured/*
-
-
-
-
- Protected Area
-
- /secured/*
-
- DELETE
- GET
- POST
- PUT
-
-
-
- earsample
-
-
-
-
-
- BASIC
- JOnAS Realm
-
-
-
-
- earsample
-
-
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/etc/web/img/architecture.png b/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/etc/web/img/architecture.png
deleted file mode 100644
index 677540d697923559efa4c2095defb5917134492f..0000000000000000000000000000000000000000
Binary files a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/etc/web/img/architecture.png and /dev/null differ
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/etc/web/img/jetty.gif b/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/etc/web/img/jetty.gif
deleted file mode 100644
index 01f44a87f6801b200f142513d0d02b12cea0fb46..0000000000000000000000000000000000000000
Binary files a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/etc/web/img/jetty.gif and /dev/null differ
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/etc/web/img/logoOW2.png b/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/etc/web/img/logoOW2.png
deleted file mode 100644
index 71a185b68ed53e228e23c82c4ea0aa47b7556959..0000000000000000000000000000000000000000
Binary files a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/etc/web/img/logoOW2.png and /dev/null differ
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/etc/web/img/ow_jonas_logo.gif b/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/etc/web/img/ow_jonas_logo.gif
deleted file mode 100644
index 1b56943a721f82a8cb81776030567772265433f2..0000000000000000000000000000000000000000
Binary files a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/etc/web/img/ow_jonas_logo.gif and /dev/null differ
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/etc/web/img/tomcat.gif b/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/etc/web/img/tomcat.gif
deleted file mode 100644
index 61756736b82350f64b5ea1b2bfc31ac57e30a3d3..0000000000000000000000000000000000000000
Binary files a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/etc/web/img/tomcat.gif and /dev/null differ
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/etc/web/img/valid-xhtml11.png b/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/etc/web/img/valid-xhtml11.png
deleted file mode 100644
index 2c63d93f8868d574b9e69eda2727b7e7bf7fc8ec..0000000000000000000000000000000000000000
Binary files a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/etc/web/img/valid-xhtml11.png and /dev/null differ
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/etc/web/img/vcss.png b/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/etc/web/img/vcss.png
deleted file mode 100644
index 9b2f596e016533327216d98a0a927738fe17384f..0000000000000000000000000000000000000000
Binary files a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/etc/web/img/vcss.png and /dev/null differ
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/etc/web/index.html b/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/etc/web/index.html
deleted file mode 100644
index f587aeee4f96b86795abeb68473ebcade4f482f4..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/etc/web/index.html
+++ /dev/null
@@ -1,66 +0,0 @@
-
-
-
-
-
-
- Java EE 5.0 Example
-
-
-
-
-
-
-
-
-
-
-
- Java EE 5.0 Example : Servlets accessing EJBs 3.0
-
-
-
- This web application is packaged as an "ear".
- When you will click to access the secured servlet, your web browser will open a dialog box
- asking you a user ID and a password.
-
- Use : jonas for the user ID and jonas for the
- password
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Java EE 5.0 Example : Architecture
-
-
-
-
-
-
-
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/etc/web/ow2_jonas.css b/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/etc/web/ow2_jonas.css
deleted file mode 100644
index 4f0ee0e6b37f25e190dc37df5cf67d9ca2813e2f..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/etc/web/ow2_jonas.css
+++ /dev/null
@@ -1,183 +0,0 @@
-/*
- Context Root css. based on css from http://jonas.objectweb.org
- XHTML by Florent BENOIT
-*/
-
-
-body
-{
- top:10px;
- margin-top:10px;
- background-color: #FFF;
- color: #000000;
- }
-
-
-img {
- margin: 5px;
- border:0;
-}
-
-
-
-div.logos {
- top: 5px;
- width: 99%;
- text-align: right;
-}
-
-
-div.links {
- font-size: 14px;
- margin-top : 40px;
- margin-left : 200px;
-}
-
-
-div.titlepage {
- margin-left: 200px;
- font-family: Arial, Helvetica, sans-serif;
- font-size: 1.5em;
- line-height: 1.5em;
- border-bottom: 1px solid #0099cc;
- color : #ff6600;
- font-weight : bold;
-}
-
-
-div.footer {
- margin-top : 50px;
- color: #FFFFFF;
- font-size: 8pt;
- text-align: center;
-}
-
-
-/*HTML elements */
-
-
-
-ul, ol, dl
-{
- color: black;
- font-family: Arial,Helvetica, sans-serif;
- font-size: 12px;
- line-height: 16px;
- font-weight: normal;
-}
-
-li
-{
- color: black;
- font-family: Arial, Helvetica, sans-serif;
- font-size: 14px;
- font-weight: normal;
- margin: 10px 0px 5px 0px;
-
-}
-a
-{
- color: #3F3975;
- background-color: transparent;
- text-decoration: underline;
-}
-
-a:visited
-{
- color: #9898CB;
- background-color: transparent;
- text-decoration: underline;
-}
-
-a:hover
-{
- color: #E06611;
- background-color: transparent;
- text-decoration: underline;
-}
-
-
-a:active
-{
- color: #FFFFFF;
- background-color: #E06611;
- text-decoration: underline;
-}
-
-
-
-
-.h1, .h2, .h3, .h4, .h5 {
- color: #000;
- background-color: inherit;
- padding: 0;
-}
-
-.h1 {
- margin-top: 5px;
- font-size: 2em;
- line-height: 1.5em;
- margin: 30px 0 30px 0;
- border-bottom: 1px solid #0099cc;
- color : #ff6600;
- font-weight : bold;
-}
-
-.h2 {
- margin: 20px 0 15px 0;
- border-bottom: 1px solid #0099cc;
- font-weight:normal;
- font-style: normal;
- font-size: 1.6em;
- line-height: 1.4em;
- color : #0099cc
-}
-
-.h3 {
- font-weight: normal;
- font-size: 1.4em;
- line-height: 1.4em;
- margin: 20px 0 15px 0;
-}
-
-.h4 {
- font-weight:normal;
- color: #404040;
- margin: 20px 0 0 0;
- left: 0px;
- font-size: 1.4em;
- line-height: 1.4em;
-}
-.h5 {
- font-weight:normal;
- color: #404040;
- font-style: normal;
- margin: 0px;
- left: 0px;
- font-size: 1.2em;
- line-height: 1.2em;
-}
-
-td
-{
- color: black;
- font-family: Arial,Helvetica, sans-serif;
- font-size: 12px;
- font-weight: normal;
-}
-
-p
-{
- color: black;
- font-family: Arial,Helvetica, sans-serif;
- font-size: 12px;
- line-height: 16px;
- font-weight: normal;
- margin: 10px 10px 5px 0px;
-}
-
-p.error
-{
- color: red;
-}
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/src/java/org/ow2/jonas/examples/ear/client/JMSApplicationClient.java b/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/src/java/org/ow2/jonas/examples/ear/client/JMSApplicationClient.java
deleted file mode 100644
index 8ed463dd152e650984f584bd26b5ccb9df106acf..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/src/java/org/ow2/jonas/examples/ear/client/JMSApplicationClient.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/**
- * JOnAS: Java(TM) Open Application Server
- * Copyright (C) 2008 Bull S.A.S.
- * Contact: jonas-team@ow2.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
- *
- * --------------------------------------------------------------------------
- * $Id$
- * --------------------------------------------------------------------------
- */
-
-package org.ow2.jonas.examples.ear.client;
-
-import java.io.PrintStream;
-import java.util.Collection;
-import java.util.List;
-import java.text.MessageFormat;
-
-import javax.jms.*;
-import javax.ejb.EJB;
-import javax.annotation.Resource;
-
-import org.ow2.jonas.examples.ear.entity.Author;
-import org.ow2.jonas.examples.ear.entity.Book;
-import org.ow2.jonas.examples.ear.init.Initializer;
-import org.ow2.jonas.examples.ear.reader.RemoteReader;
-
-/**
- * This application-client shows usage of JMS destinations to
- * interact with the server-side application.
- * @author Guillaume Sauthier
- */
-public final class JMSApplicationClient {
-
- /**
- * Number of Books to be created.
- */
- private static final int ITERATION_NUMBER = 10;
-
- /**
- * Link to the initializer bean.
- */
- @EJB
- private static Initializer initializerBean;
-
- /**
- * JMS conectionFactoery
- */
- // Resource injection
- @Resource(mappedName="JQCF")
- private static ConnectionFactory factory;
-
- /**
- * JMS Queue SampleQueue
- */
- // Resource injection
- @Resource(mappedName="SampleQueue")
- private static Queue queue;
-
-
- /**
- * Link to the Remote Reader bean. Bean will be injected by JOnAS.
- */
- @EJB
- static private RemoteReader readerBean;
-
- /**
- * Empty default constructor for utility class.
- */
- private JMSApplicationClient() {
-
- }
-
- /**
- * @param args Command line arguments
- * @throws Exception InitialContext creation failure / JMS Exception
- */
- public static void main(final String[] args) throws Exception {
-
- PrintStream out = System.out;
-
- // Print Header
- out.println("- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -");
- out.println("OW2 JOnAS :: EAR Sample :: Messager Application Client ");
- out.println("- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -");
-
-
-
-
- // Init. data if needed
- out.print("Initialization ... ");
-
- initializerBean.initializeEntities();
- out.println("Done.");
-
- // Send Book creation Messages
- Connection connection = factory.createConnection();
- Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
- MessageProducer messageProducer= session.createProducer(queue);
-
- for (int i = 0; i < ITERATION_NUMBER; i++) {
- String title = "Encyclopedia Universalis Vol." + i;
- Message message = session.createTextMessage(title);
- messageProducer.send(message);
- out.println("Sended creation order for '" + title + "'");
- }
-
- // Close JMS objects
- messageProducer.close();
- session.close();
- connection.close();
-
- // Wait for some time ...
- // Remember JMS is for asynchronous messages :)
- final long period = 2500;
- out.println(MessageFormat.format("Wait for {0} ms...", period));
- Thread.sleep(period);
-
- out.println(MessageFormat.format("The RemoteReader Bean reference is: {0}", readerBean));
- // List Authors and Books
- List authors = readerBean.listAllAuthors();
- for (Author author : authors) {
- out.println(MessageFormat.format(" * {0}", author.getName()));
- Collection books = author.getBooks();
- for (Book book : books) {
- out.println(MessageFormat.format(" -> {0} [id: {1}]", book.getTitle(), book.getId()));
- }
- }
-
- out.println("Success.");
-
- }
-}
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/src/java/org/ow2/jonas/examples/ear/client/NotSecuredApplicationClient.java b/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/src/java/org/ow2/jonas/examples/ear/client/NotSecuredApplicationClient.java
deleted file mode 100644
index 9696b19638f0303b2c4da27f09ab39bc31c50494..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/src/java/org/ow2/jonas/examples/ear/client/NotSecuredApplicationClient.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/**
- * JOnAS: Java(TM) Open Application Server
- * Copyright (C) 2008 Bull S.A.S.
- * Contact: jonas-team@ow2.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
- *
- * --------------------------------------------------------------------------
- * $Id$
- * --------------------------------------------------------------------------
- */
-
-package org.ow2.jonas.examples.ear.client;
-
-import java.io.PrintStream;
-import java.util.Collection;
-import java.util.List;
-
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-
-import javax.ejb.EJB;
-
-import org.ow2.jonas.examples.ear.entity.Author;
-import org.ow2.jonas.examples.ear.entity.Book;
-import org.ow2.jonas.examples.ear.init.Initializer;
-import org.ow2.jonas.examples.ear.mail.Mailer;
-import org.ow2.jonas.examples.ear.reader.RemoteReader;
-
-/**
- * Simple Application Client.
- * @author Guillaume Sauthier
- */
-public final class NotSecuredApplicationClient {
-
- /**
- * Empty default constructor for utility class.
- */
- private NotSecuredApplicationClient() {
-
- }
-
- /**
- * Link to the initializer bean.
- */
- @EJB
- static private Initializer initializerBean;
-
- /**
- * Link to the Remote Reader bean. Bean will be injected by JOnAS.
- */
- @EJB
- static private RemoteReader readerBean;
-
- /**
- * Link to the Mailer bean. Bean will be injected by JOnAS.
- */
- @EJB
- static private Mailer mailerBean;
-
-
- /**
- * @param args Command line arguments
- * @throws NamingException InitialContext creation failure
- */
- public static void main(final String[] args) throws NamingException {
-
- PrintStream out = System.out;
-
- // Print Header
- out.println("- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -");
- out.println("OW2 JOnAS :: EAR Sample :: Not Secured Application Client ");
- out.println("- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -");
-
- // Init datas if needed
- out.print("Initialization ... ");
- initializerBean.initializeEntities();
- out.println("Done.");
-
-
- out.println("The RemoteReader Bean reference is : " + readerBean);
-
- // List registered authors and their books
- out.println("List of authors, and their books:");
- // retrieve again the authors list (now it has been initialized)
- List authors = readerBean.listAllAuthors();
- for (Author author : authors) {
- out.println(" * " + author.getName());
- Collection books = author.getBooks();
- for (Book book : books) {
- out.println(" -> " + book.getTitle() + " [id: " + book.getId() + "]");
- }
- }
-
- // Only list registered books
- List books = readerBean.listAllBooks();
- out.println("List of books:");
- for(Book book : books) {
- out.println(" * " + book.getTitle() + " [" + book.getAuthor().getName() + "]");
- }
-
- // Use the Mailer bean to send
- // Use the first command line argument as a mail address.
- // Fall back to a reasonable default ${user.name}@localhost
- String address = System.getProperty("user.name") + "@localhost";
- if (args.length > 0) {
- // Got an argument, use it ...
- address = args[0];
- }
-
- out.println("The Mailer Bean reference is : " + mailerBean);
-
- // Call the Mailer bean to send the expected e-mail.
- mailerBean.sendStatusMail(address);
-
- // OK, we're done
- out.println("Success.");
-
- }
-}
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/src/java/org/ow2/jonas/examples/ear/client/SecuredApplicationClient.java b/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/src/java/org/ow2/jonas/examples/ear/client/SecuredApplicationClient.java
deleted file mode 100644
index 70a6e7b7d6f90c9880cb32be4ec924e4f2b5f3de..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/src/java/org/ow2/jonas/examples/ear/client/SecuredApplicationClient.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/**
- * JOnAS: Java(TM) Open Application Server
- * Copyright (C) 2008 Bull S.A.S.
- * Contact: jonas-team@ow2.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
- *
- * --------------------------------------------------------------------------
- * $Id$
- * --------------------------------------------------------------------------
- */
-
-package org.ow2.jonas.examples.ear.client;
-
-import java.io.PrintStream;
-import java.util.Collection;
-import java.util.List;
-import java.text.MessageFormat;
-
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-import javax.ejb.EJB;
-
-import org.ow2.jonas.examples.ear.entity.Author;
-import org.ow2.jonas.examples.ear.entity.Book;
-import org.ow2.jonas.examples.ear.init.Initializer;
-import org.ow2.jonas.examples.ear.reader.RemoteReader;
-import org.ow2.jonas.examples.ear.writer.RemoteWriter;
-
-/**
- * Simple Application Client.
- * @author Guillaume Sauthier
- */
-public final class SecuredApplicationClient {
-
- /**
- * Empty default constructor for utility class.
- */
- private SecuredApplicationClient() {
-
- }
-
- /**
- * Link to the initializer bean.
- */
- @EJB
- static private Initializer initializerBean;
-
- /**
- * Link to the Remote Reader bean. Bean will be injected by JOnAS.
- */
- @EJB
- static private RemoteReader readerBean;
-
- /**
- * Link to the Remote Writer bean. Bean will be injected by JOnAS.
- */
- @EJB
- static private RemoteWriter writerBean;
-
- /**
- * @param args Command line arguments
- * @throws NamingException InitialContext creation failure
- */
- public static void main(final String[] args) throws NamingException {
-
- PrintStream out = System.out;
-
- // Print Header
- out.println("- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -");
- out.println("OW2 JOnAS :: EAR Sample :: Secured Application Client ");
- out.println("- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -");
- // Init. data if needed
- out.print("Initialization ... ");
- initializerBean.initializeEntities();
- out.println("Done.");
-
- out.println("The RemoteReader Bean reference is: " + readerBean);
-
- // List registered authors and their books
- out.println("List of authors, and their books:");
- // retrieve again the authors list (now it has been initialized)
- List authors = readerBean.listAllAuthors();
- for (Author author : authors) {
- out.println(" * " + author.getName());
- Collection books = author.getBooks();
- for (Book book : books) {
- out.println(MessageFormat.format(" -> {0} [id: {1}]", book.getTitle(), book.getId()));
- }
- }
-
- // Use the secured Bean (RemoteWriter)
- // ======================================
- out.println("Get the RemoteWriter Bean reference: " + writerBean);
-
- // Add another author, and some books
- Author zola = new Author("Emile Zola");
- Book germinal = new Book("Germinal", zola);
- Book beteHumaine = new Book("La Bete Humaine", zola);
- zola.getBooks().add(germinal);
- zola.getBooks().add(beteHumaine);
-
- // Display Author before storage
- out.println("Created a new Author: ");
- out.println(zola.toString());
-
- // Persists
- writerBean.addAuthor(zola);
-
- // See the new content
- out.println("Updated authors' list:");
- authors = readerBean.listAllAuthors();
- for (Author author : authors) {
- out.println(" * " + author.getName());
- Collection books = author.getBooks();
- for (Book book : books) {
- out.println(MessageFormat.format(" -> {0} [id: {1}]", book.getTitle(), book.getId()));
- }
- }
-
- // Remove Zola (and its books), so that next time the client
- // is executed, we can add them again.
- writerBean.removeAuthor(zola);
- out.println("Cleaned added Author.");
- out.println("Success.");
-
- }
-}
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/src/java/org/ow2/jonas/examples/ear/client/package.html b/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/src/java/org/ow2/jonas/examples/ear/client/package.html
deleted file mode 100644
index ebf29edebc591d3821a7a22226ecba37602dacf0..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/src/java/org/ow2/jonas/examples/ear/client/package.html
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
-
-
-
- Java EE 5.0 EAR Sample
-
-
-
-
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/src/java/org/ow2/jonas/examples/ear/entity/Author.java b/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/src/java/org/ow2/jonas/examples/ear/entity/Author.java
deleted file mode 100644
index 9db744569e6bf9432f23f7bb4aceed9ec113704c..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/src/java/org/ow2/jonas/examples/ear/entity/Author.java
+++ /dev/null
@@ -1,177 +0,0 @@
-/**
- * JOnAS: Java(TM) Open Application Server
- * Copyright (C) 2007 Bull S.A.S.
- * Contact: jonas-team@ow2.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
- *
- * --------------------------------------------------------------------------
- * $Id$
- * --------------------------------------------------------------------------
- */
-
-package org.ow2.jonas.examples.ear.entity;
-
-import static org.ow2.jonas.examples.ear.entity.Author.QN.ALL_AUTHORS;
-import static org.ow2.jonas.examples.ear.entity.Author.QN.FIND_AUTHOR;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Collection;
-
-import javax.persistence.CascadeType;
-import javax.persistence.Entity;
-import javax.persistence.FetchType;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.NamedQueries;
-import javax.persistence.NamedQuery;
-import javax.persistence.OneToMany;
-
-/**
- * Author of a book.
- * @author Florent Benoit
- */
-@Entity
-@NamedQueries({@NamedQuery(name=ALL_AUTHORS, query="select o FROM Author o"),
- @NamedQuery(name=FIND_AUTHOR, query="select o FROM Author o WHERE name = :name")})
-public class Author implements Serializable {
- /**
- * Store Query names.
- */
- public static interface QN {
- /**
- * Search all authors.
- */
- String ALL_AUTHORS = "Author.allAuthors";
-
- /**
- * Search a named author.
- */
- String FIND_AUTHOR = "Author.findAuthor";
- }
-
- /**
- * Serial Version UID.
- */
- private static final long serialVersionUID = 0L;
-
- /**
- * Primary key (will be auto generated).
- */
- private long id;
-
- /**
- * Name of the author.
- */
- private String name = null;
-
- /**
- * List of books written by the author.
- */
- private Collection books;
-
- /**
- * Default constructor.
- */
- public Author() {
- books = new ArrayList();
- }
-
- /**
- * Constructor with a given author name.
- * @param name - the name of the author
- */
- public Author(final String name) {
- this();
- setName(name);
- }
-
- /**
- * Relation ship (do not using lazy mode).
- * @return books written by this author
- */
- @OneToMany(mappedBy="author", fetch=FetchType.EAGER, cascade=CascadeType.ALL)
- public Collection getBooks() {
- return books;
- }
-
- /**
- * Add a book with a given title.
- * @param title - the title of the book
- */
- public void addBook(final String title) {
- Book livre = new Book();
- livre.setTitle(title);
- livre.setAuthor(this);
- getBooks().add(livre);
- }
-
- /**
- * Sets the collection of books written by this author.
- * @param books the list of the books
- */
- public void setBooks(final Collection books) {
- this.books = books;
- }
-
- /**
- * @return name of the author
- */
- public String getName() {
- return name;
- }
-
- /**
- * Sets the name of the author.
- * @param name - the name of this author
- */
- public void setName(final String name) {
- this.name = name;
- }
-
- /**
- * @return an id for this object (incremented automatically)
- */
- @Id
- @GeneratedValue(strategy=GenerationType.AUTO)
- public long getId() {
- return this.id;
- }
-
- /**
- * Sets the id of this author object.
- * @param id the given id of this author
- */
- public void setId(final long id) {
- this.id = id;
- }
-
-
- /**
- * @return String representation of this entity object.
- */
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder(this.getClass().getName());
- sb.append("[id=");
- sb.append(getId());
- sb.append(", name=");
- sb.append(getName());
- sb.append("]");
- return sb.toString();
- }
-}
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/src/java/org/ow2/jonas/examples/ear/entity/Book.java b/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/src/java/org/ow2/jonas/examples/ear/entity/Book.java
deleted file mode 100644
index 83cec6f2f6bbf58d53583b7b35eeb0e021ad7dbd..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/src/java/org/ow2/jonas/examples/ear/entity/Book.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/**
- * JOnAS: Java(TM) Open Application Server
- * Copyright (C) 2007 Bull S.A.S.
- * Contact: jonas-team@ow2.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
- *
- * --------------------------------------------------------------------------
- * $Id$
- * --------------------------------------------------------------------------
- */
-
-package org.ow2.jonas.examples.ear.entity;
-
-import java.io.Serializable;
-
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.ManyToOne;
-import javax.persistence.NamedQueries;
-import javax.persistence.NamedQuery;
-
-/**
- * Define a book.
- * @author Florent Benoit
- */
-@Entity
-@NamedQueries({@NamedQuery(name=Book.QN.ALL_BOOKS, query="select o FROM Book o"),
- @NamedQuery(name=Book.QN.FIND_BOOK, query="select o FROM Book o WHERE name = :name")
-})
-public class Book implements Serializable {
-
- /**
- * Defines Query names.
- */
- public static interface QN {
- /**
- * Search all books.
- */
- String ALL_BOOKS = "Book.allBooks";
-
- /**
- * Search a book.
- */
- String FIND_BOOK = "Book.findBook";
- }
-
- /**
- * Serial Version UID.
- */
- private static final long serialVersionUID = 0L;
-
- /**
- * Primary key.
- */
- private long id;
-
- /**
- * Author's book.
- */
- private Author author;
-
- /**
- * title of the book.
- */
- private String title;
-
- /**
- * Default constructor.
- */
- public Book() {
-
- }
-
- /**
- * Constructor. Build a new Book with the given title and written by the
- * given author.
- * @param title the given title
- * @param author the given author.
- */
- public Book(final String title, final Author author) {
- setTitle(title);
- setAuthor(author);
- }
-
- /**
- * @return the Author of this Book.
- */
- @ManyToOne
- @JoinColumn(name="Author_id")
- public Author getAuthor() {
- return author;
- }
-
- /**
- * Sets the author of this book.
- * @param author the given author.
- */
- public void setAuthor(final Author author) {
- this.author = author;
- }
-
- /**
- * @return the title of this book.
- */
- public String getTitle() {
- return title;
- }
-
- /**
- * Set the title of the book.
- * @param title - the title of the book
- */
- public void setTitle(final String title) {
- this.title = title;
- }
-
- /**
- * @return an id for this object (incremented automatically)
- */
- @Id
- @GeneratedValue(strategy=GenerationType.AUTO)
- public long getId() {
- return this.id;
- }
-
- /**
- * Sets the id of this author object.
- * @param id the given id of this author
- */
- public void setId(final long id) {
- this.id = id;
- }
-
- /**
- * @return String representation of this entity object.
- */
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder(this.getClass().getName());
- sb.append("[id=");
- sb.append(getId());
- sb.append(", title=");
- sb.append(getTitle());
- sb.append("]");
- return sb.toString();
- }
-}
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/src/java/org/ow2/jonas/examples/ear/entity/package.html b/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/src/java/org/ow2/jonas/examples/ear/entity/package.html
deleted file mode 100644
index b8e550a90da86a1f2c25b4e5a57c1f89d3d119d6..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/src/java/org/ow2/jonas/examples/ear/entity/package.html
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
-
-
-
- Java EE 5.0 EAR Sample
-
-
-
-
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/src/java/org/ow2/jonas/examples/ear/mail/Mailer.java b/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/src/java/org/ow2/jonas/examples/ear/mail/Mailer.java
deleted file mode 100644
index 7b3a3e1878e147a96fdef6840916b6ef8ef95ff5..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/src/java/org/ow2/jonas/examples/ear/mail/Mailer.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/**
- * JOnAS: Java(TM) Open Application Server
- * Copyright (C) 2008 Bull S.A.S.
- * Contact: jonas-team@ow2.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- *
- * --------------------------------------------------------------------------
- * $Id$
- * --------------------------------------------------------------------------
- */
-
-package org.ow2.jonas.examples.ear.mail;
-
-/**
- * The {@link Mailer} business interface is used to send a status
- * mail, with all the {@link org.ow2.jonas.examples.ear.entity.Author}s
- * and {@link org.ow2.jonas.examples.ear.entity.Book}s in the library.
- * @author Guillaume Sauthier
- */
-public interface Mailer {
-
- /**
- * Send a mail to the given mail address.
- * @param address target mail address (must be of the form: xyz@abc.z)
- */
- void sendStatusMail(final String address);
-}
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/src/java/org/ow2/jonas/examples/ear/mail/MailerBean.java b/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/src/java/org/ow2/jonas/examples/ear/mail/MailerBean.java
deleted file mode 100644
index cbb50e7603d085b8a24873c6fbe656e7f8414522..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/src/java/org/ow2/jonas/examples/ear/mail/MailerBean.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/**
- * JOnAS: Java(TM) Open Application Server
- * Copyright (C) 2008 Bull S.A.S.
- * Contact: jonas-team@ow2.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- *
- * --------------------------------------------------------------------------
- * $Id$
- * --------------------------------------------------------------------------
- */
-
-package org.ow2.jonas.examples.ear.mail;
-
-import java.util.Collection;
-import java.util.Date;
-import java.util.List;
-
-import javax.annotation.Resource;
-import javax.ejb.EJB;
-import javax.ejb.Remote;
-import javax.ejb.Stateless;
-import javax.mail.Address;
-import javax.mail.Message;
-import javax.mail.MessageContext;
-import javax.mail.MessagingException;
-import javax.mail.NoSuchProviderException;
-import javax.mail.Session;
-import javax.mail.Transport;
-import javax.mail.internet.AddressException;
-import javax.mail.internet.InternetAddress;
-import javax.mail.internet.MimePartDataSource;
-
-import org.ow2.jonas.examples.ear.entity.Author;
-import org.ow2.jonas.examples.ear.entity.Book;
-import org.ow2.jonas.examples.ear.reader.LocalReader;
-
-/**
- * @author Guillaume Sauthier
- */
-@Stateless(mappedName="myMailerBean")
-@Remote(Mailer.class)
-public class MailerBean implements Mailer {
-
- /**
- * Mail Session used to send the Mail.
- */
- @Resource(mappedName="mailSession_1")
- private Session mailSession;
-
- /**
- * Template for the message's content.
- */
- @Resource(mappedName="mailMimePartDS_1")
- private MimePartDataSource mimePartDatasource;
-
- /**
- * {@link LocalReader} EJB (Local interface).
- */
- @EJB
- private LocalReader reader;
-
- /**
- * Send a mail to the given mail address.
- * @param address target mail address (must be of the form: xyz@abc.z)
- * @see org.ow2.jonas.examples.ear.mail.Mailer#sendStatusMail(java.lang.String)
- */
- public void sendStatusMail(final String address) {
-
- Address mailAddress = null;
- try {
- mailAddress = new InternetAddress(address);
- } catch (AddressException e) {
- System.err.println("Invalid mail address: " + e.getMessage());
- e.printStackTrace();
- return;
- }
-
- MessageContext context = mimePartDatasource.getMessageContext();
- Message message = context.getMessage();
- try {
- message.setContent(getContent(), "text/plain");
- } catch (MessagingException e) {
- System.err.println("Cannot set message content:" + e.getMessage());
- e.printStackTrace(System.err);
- return;
- }
-
- Transport transport = null;
- try {
- transport = mailSession.getTransport(mailAddress);
- } catch (NoSuchProviderException e) {
- System.err.println("No provider found for @:" + address);
- e.printStackTrace(System.err);
- return;
- }
- try {
- transport.connect();
- transport.sendMessage(message, new Address[] {mailAddress});
- transport.close();
- } catch (MessagingException e) {
- System.err.println("Cannot send message:" + e.getMessage());
- e.printStackTrace(System.err);
- return;
- }
-
- System.out.println("Mail successfully sent to: " + address);
- }
-
- /**
- * Generate the mail's content.
- * @return the mail message content.
- */
- private String getContent() {
-
- StringBuilder sb = new StringBuilder();
-
- // Print Header
- sb.append("---------------------------------------------------\n");
- sb.append(" OW2 JOnAS EAR Sample Mailer Bean.\n");
- sb.append("---------------------------------------------------\n");
- sb.append("Generated the " + new Date() + "\n");
- sb.append("\n");
-
- // Print the Authors
- List authors = reader.listAllAuthors();
- sb.append("List of all registered Authors (" + authors.size() + ") and their Books:\n");
- for (Author author : authors) {
- sb.append(" * " + author.getName() + " [" + author.getId() + "]\n");
- Collection books = author.getBooks();
- for (Book book : books) {
- sb.append(" - " + book.getTitle() + "[" + book.getId() + "]\n");
- }
- }
-
- // Print the Books
- sb.append("\n");
- sb.append("List of all registered Books:\n");
- List books = reader.listAllBooks();
- for (Book book : books) {
- sb.append(" * " + book.getTitle() + "[" + book.getAuthor().getName() + "]\n");
- }
-
- // Print the footer
- sb.append("\n");
- sb.append("Enjoy your new JOnAS !\n");
- sb.append("\n");
- sb.append(" -- JOnAS Team\n");
-
- return sb.toString();
- }
-
-}
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/src/java/org/ow2/jonas/examples/ear/mail/package.html b/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/src/java/org/ow2/jonas/examples/ear/mail/package.html
deleted file mode 100644
index 43ff24fdaa61f718f4b802f64701e5ccfc2f16d7..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/src/java/org/ow2/jonas/examples/ear/mail/package.html
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
-
-
-
- Java EE 5.0 EAR Sample
-
-
-
-
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/src/java/org/ow2/jonas/examples/ear/mdb/JMSMessageBean.java b/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/src/java/org/ow2/jonas/examples/ear/mdb/JMSMessageBean.java
deleted file mode 100644
index 5e87a4d8940c4e9caa3d02437aa64a53b7ff6afd..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/src/java/org/ow2/jonas/examples/ear/mdb/JMSMessageBean.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/**
- * JOnAS: Java(TM) Open Application Server
- * Copyright (C) 2008 Bull S.A.S.
- * Contact: jonas-team@ow2.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- *
- * --------------------------------------------------------------------------
- * $Id$
- * --------------------------------------------------------------------------
- */
-
-package org.ow2.jonas.examples.ear.mdb;
-
-import javax.annotation.security.RunAs;
-import javax.ejb.ActivationConfigProperty;
-import javax.ejb.EJB;
-import javax.ejb.MessageDriven;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageListener;
-import javax.jms.TextMessage;
-
-import org.ow2.jonas.examples.ear.entity.Author;
-import org.ow2.jonas.examples.ear.entity.Book;
-import org.ow2.jonas.examples.ear.reader.LocalReader;
-import org.ow2.jonas.examples.ear.writer.LocalWriter;
-
-/**
- * The {@link JMSMessageBean} is a message driven bean activated when a JMS
- * {@link Message} comes to a given Destination.
- * For each new {@link Message}, this bean will create and persists a new
- * {@link Book} instance.
- * This MDB is annotated with {@link RunAs} because it uses a secured
- * business interface.
- * @author Guillaume Sauthier
- */
-@MessageDriven(activationConfig={
- @ActivationConfigProperty(propertyName="destination",
- propertyValue="SampleQueue"),
- @ActivationConfigProperty(propertyName="destinationType",
- propertyValue="javax.jms.Queue")
- })
-@RunAs("earsample")
-public class JMSMessageBean implements MessageListener {
-
- /**
- * Secured business interface.
- */
- @EJB
- private LocalWriter writer;
-
- /**
- * Unsecured {@link LocalReader} business interface.
- */
- @EJB
- private LocalReader reader;
-
- /**
- * Called when a new JMS {@link Message} is received on the destination.
- * This method will use the {@link LocalWriter} Bean interface to add
- * Books to a given Author.
- * @param message {@link Message} containing {@link Book} title.
- * @see javax.jms.MessageListener#onMessage(javax.jms.Message)
- */
- public void onMessage(final Message message) {
-
- // TODO to be removed
- System.out.println("Received JMS Message: " + message);
-
- // Extract Message's text value
- String text = null;
- if (message instanceof TextMessage) {
- TextMessage textMessage = (TextMessage) message;
- try {
- text = textMessage.getText();
- } catch (JMSException e) {
- System.err.println("Unexpected Exception: " + e.getMessage());
- e.printStackTrace(System.err);
- return;
- }
- } else {
- // not a TextMessage, I don't know what to do with it
- return;
- }
-
- Author edition = reader.findAuthor("Editions XY");
- if (edition == null) {
- edition = new Author("Editions XY");
- writer.addAuthor(edition);
- }
-
- // Persists a new Book
- Book book = new Book(text, edition);
- writer.addBook(book);
-
- }
-
-}
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/src/java/org/ow2/jonas/examples/ear/mdb/package.html b/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/src/java/org/ow2/jonas/examples/ear/mdb/package.html
deleted file mode 100644
index a381f34e332673e691112cf91cecb2917c944a93..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/src/java/org/ow2/jonas/examples/ear/mdb/package.html
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
-
-
-
- Java EE 5.0 EAR Sample
-
-
-
-
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/src/java/org/ow2/jonas/examples/ear/reader/LocalReader.java b/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/src/java/org/ow2/jonas/examples/ear/reader/LocalReader.java
deleted file mode 100644
index a9b9de6fb36509bd65fb4ff381799053a49a1542..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/src/java/org/ow2/jonas/examples/ear/reader/LocalReader.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * JOnAS: Java(TM) Open Application Server
- * Copyright (C) 2008 Bull S.A.S.
- * Contact: jonas-team@ow2.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- *
- * --------------------------------------------------------------------------
- * $Id$
- * --------------------------------------------------------------------------
- */
-
-package org.ow2.jonas.examples.ear.reader;
-
-/**
- * {@link javax.ejb.Local} interface.
- * @author Guillaume Sauthier
- */
-public interface LocalReader extends Reader {
-
-}
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/src/java/org/ow2/jonas/examples/ear/reader/Reader.java b/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/src/java/org/ow2/jonas/examples/ear/reader/Reader.java
deleted file mode 100644
index a00d93c3291d50dfc2596c32a3ba246b29e6401b..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/src/java/org/ow2/jonas/examples/ear/reader/Reader.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/**
- * JOnAS: Java(TM) Open Application Server
- * Copyright (C) 2008 Bull S.A.S.
- * Contact: jonas-team@ow2.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- *
- * --------------------------------------------------------------------------
- * $Id$
- * --------------------------------------------------------------------------
- */
-
-package org.ow2.jonas.examples.ear.reader;
-
-import java.util.List;
-
-import org.ow2.jonas.examples.ear.entity.Author;
-import org.ow2.jonas.examples.ear.entity.Book;
-
-/**
- * The {@link Reader} business interface is an un-restricted
- * read only view on the entities.
- * @author Guillaume Sauthier
- */
-public interface Reader {
-
- /**
- * @return the list of all the persisted {@link Author}s.
- */
- List listAllAuthors();
-
- /**
- * @return the list of all the persisted {@link Book}s.
- */
- List listAllBooks();
-
- /**
- * Find a given {@link Author} using it's name as a key.
- * @param name {@link Author}'s name.
- * @return the first {@link Author} that matches the given name.
- */
- Author findAuthor(final String name);
-
- /**
- * Find a given {@link Book} using it's name as a key.
- * @param name {@link Book}'s name.
- * @return the first {@link Book} that matches the given name.
- */
- Book findBook(final String name);
-}
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/src/java/org/ow2/jonas/examples/ear/reader/ReaderBean.java b/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/src/java/org/ow2/jonas/examples/ear/reader/ReaderBean.java
deleted file mode 100644
index 2e6d40ed491543a7cfb05b9020eb0bee98bd5e7b..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/src/java/org/ow2/jonas/examples/ear/reader/ReaderBean.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/**
- * JOnAS: Java(TM) Open Application Server
- * Copyright (C) 2008 Bull S.A.S.
- * Contact: jonas-team@ow2.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- *
- * --------------------------------------------------------------------------
- * $Id$
- * --------------------------------------------------------------------------
- */
-
-package org.ow2.jonas.examples.ear.reader;
-
-import static org.ow2.jonas.examples.ear.entity.Author.QN.ALL_AUTHORS;
-import static org.ow2.jonas.examples.ear.entity.Author.QN.FIND_AUTHOR;
-import static org.ow2.jonas.examples.ear.entity.Book.QN.ALL_BOOKS;
-import static org.ow2.jonas.examples.ear.entity.Book.QN.FIND_BOOK;
-
-import java.util.List;
-
-import javax.ejb.Local;
-import javax.ejb.Remote;
-import javax.ejb.Stateless;
-import javax.persistence.EntityManager;
-import javax.persistence.PersistenceContext;
-import javax.persistence.Query;
-
-import org.ow2.jonas.examples.ear.entity.Author;
-import org.ow2.jonas.examples.ear.entity.Book;
-
-/**
- *The {@link ReaderBean} EJB is an unrestricted, read-only, Stateless Bean.
- * @author Guillaume Sauthier
- */
-@Stateless
-@Local(LocalReader.class)
-@Remote(RemoteReader.class)
-public class ReaderBean implements LocalReader, RemoteReader {
-
- /**
- * Entity manager used by this bean.
- */
- @PersistenceContext
- private EntityManager entityManager = null;
-
- /**
- * Find a given {@link Author} using it's name as a key.
- * @param name {@link Author}'s name.
- * @return the first {@link Author} that matches the given name.
- */
- @SuppressWarnings("unchecked")
- public Author findAuthor(final String name) {
- Query query = entityManager.createNamedQuery(FIND_AUTHOR);
- query.setParameter("name", name);
- List authors = query.getResultList();
- if (authors != null && authors.size() > 0) {
- return authors.get(0);
- }
- return null;
- }
-
- /**
- * Find a given {@link Book} using it's name as a key.
- * @param name {@link Book}'s name.
- * @return the first {@link Book} that matches the given name.
- */
- @SuppressWarnings("unchecked")
- public Book findBook(final String name) {
- Query query = entityManager.createNamedQuery(FIND_BOOK);
- query.setParameter("name", name);
- List books = query.getResultList();
- if (books != null && books.size() > 0) {
- return books.get(0);
- }
- return null;
- }
-
- /**
- * @return the list of all the persisted {@link Author}s.
- */
- @SuppressWarnings("unchecked")
- public List listAllAuthors() {
- return entityManager.createNamedQuery(ALL_AUTHORS).getResultList();
- }
-
- /**
- * @return the list of all the persisted {@link Book}s.
- */
- @SuppressWarnings("unchecked")
- public List listAllBooks() {
- return entityManager.createNamedQuery(ALL_BOOKS).getResultList();
- }
-
-}
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/src/java/org/ow2/jonas/examples/ear/reader/RemoteReader.java b/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/src/java/org/ow2/jonas/examples/ear/reader/RemoteReader.java
deleted file mode 100644
index 634c83d9c4248e7aee1482f58ee533c2dc334fb1..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/src/java/org/ow2/jonas/examples/ear/reader/RemoteReader.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * JOnAS: Java(TM) Open Application Server
- * Copyright (C) 2008 Bull S.A.S.
- * Contact: jonas-team@ow2.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- *
- * --------------------------------------------------------------------------
- * $Id$
- * --------------------------------------------------------------------------
- */
-
-package org.ow2.jonas.examples.ear.reader;
-
-/**
- * {@link javax.ejb.Remote} interface.
- * @author Guillaume Sauthier
- */
-public interface RemoteReader extends Reader {
-
-}
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/src/java/org/ow2/jonas/examples/ear/reader/package.html b/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/src/java/org/ow2/jonas/examples/ear/reader/package.html
deleted file mode 100644
index 81c64c7e71d0aff3ce66369800ad4c01bd323868..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/src/java/org/ow2/jonas/examples/ear/reader/package.html
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
-
-
-
- Java EE 5.0 EAR Sample
-
-
-
Java Enterprise Edition 5.0: EAR Sample
-
-
diff --git a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/src/java/org/ow2/jonas/examples/ear/web/AdminServlet.java b/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/src/java/org/ow2/jonas/examples/ear/web/AdminServlet.java
deleted file mode 100644
index 001f63aeea6fabc79dc27efb258a04f032b7ef54..0000000000000000000000000000000000000000
--- a/jonas/assemblies/jonas-examples/src/main/resources/examples/javaee5-earsample/src/java/org/ow2/jonas/examples/ear/web/AdminServlet.java
+++ /dev/null
@@ -1,277 +0,0 @@
-/**
- * JOnAS: Java(TM) Open Application Server
- * Copyright (C) 2007-2008 Bull S.A.S.
- * Contact: jonas-team@ow2.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
- *
- * --------------------------------------------------------------------------
- * $Id$
- * --------------------------------------------------------------------------
- */
-
-package org.ow2.jonas.examples.ear.web;
-
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.util.Collection;
-import java.util.List;
-
-import javax.ejb.EJB;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.ow2.jonas.examples.ear.entity.Author;
-import org.ow2.jonas.examples.ear.entity.Book;
-import org.ow2.jonas.examples.ear.init.Initializer;
-import org.ow2.jonas.examples.ear.reader.LocalReader;
-import org.ow2.jonas.examples.ear.writer.LocalWriter;
-
-/**
- * Defines a servlet that is accessing the two entities through a local session
- * bean.
- * @author Florent Benoit
- * @author Guillaume Sauthier
- */
-public class AdminServlet extends HttpServlet {
-
- /**
- * Serializable class uid.
- */
- private static final long serialVersionUID = 7724116000656853982L;
-
- /**
- * Local writer bean.
- */
- @EJB
- private LocalWriter writerBean;
-
- /**
- * Local reader bean.
- */
- @EJB
- private LocalReader readerBean;
-
- /**
- * Initializer bean.
- */
- @EJB
- private Initializer initializerBean;
-
-
- /**
- * Called by the server (via the service method) to allow a servlet to
- * handle a GET request.
- * @param request an HttpServletRequest object that contains the request the
- * client has made of the servlet
- * @param response an HttpServletResponse object that contains the response
- * the servlet sends to the client
- * @throws IOException if an input or output error is detected when the
- * servlet handles the GET request
- * @throws ServletException if the request for the GET could not be handled
- */
- @Override
- public void doGet(final HttpServletRequest request, final HttpServletResponse response) throws IOException, ServletException {
-
- response.setContentType("text/html");
- PrintWriter out = response.getWriter();
- String title = "Ear Sample of Servlet accessing an EJB";
-
- printHTMLHeader(out, title);
-
- out.println("
");
- out.println("
");
- out.println("
");
- out.println("
");
-
- // Try to init the DB if this is the very first call to this application
- initAuthorBooks(out);
-
- out.println(" ");
-
- // Print the add-author Form
- printAddAuthorForm(out);
-
- out.println("
");
- out.println("
");
-
- // Try to add the new author
- addAuthor(out, request.getParameter("author"));
-
- // Display updated list of authors
- printAuthors(out);
-
- out.println("