diff --git a/.classpath b/.classpath
index 6a1b0bdaca..a678b32e4f 100644
--- a/.classpath
+++ b/.classpath
@@ -1,6 +1,8 @@
+
+
@@ -29,15 +31,10 @@
-
-
-
-
-
@@ -91,10 +88,6 @@
-
-
-
-
@@ -120,5 +113,9 @@
+
+
+
+
diff --git a/.settings/org.eclipse.wst.common.component b/.settings/org.eclipse.wst.common.component
index de81d9952e..e2eeb33dc8 100644
--- a/.settings/org.eclipse.wst.common.component
+++ b/.settings/org.eclipse.wst.common.component
@@ -20,6 +20,8 @@
+
+
diff --git a/JasperReports/build.xml b/JasperReports/build.xml
index 67275bbad5..a6329073be 100644
--- a/JasperReports/build.xml
+++ b/JasperReports/build.xml
@@ -73,7 +73,7 @@
-
+
diff --git a/JasperReports/src/org/compiere/interfaces/MD5.java b/JasperReports/src/org/compiere/interfaces/MD5.java
index ae86e59f86..59a068ae39 100644
--- a/JasperReports/src/org/compiere/interfaces/MD5.java
+++ b/JasperReports/src/org/compiere/interfaces/MD5.java
@@ -3,24 +3,28 @@
*/
package org.compiere.interfaces;
+import javax.ejb.Remote;
/**
* Remote interface for compiere/MD5.
- * @xdoclet-generated at Feb 27, 2006 1:18:49 PM
*/
+@Remote
public interface MD5
- extends javax.ejb.EJBObject
{
+ public final static String JNDI_NAME = "ejb/compiere/MD5";
+
+ public final static String EJB_NAME = "compiereMD5";
+
/**
* Business method
* @param Filename
* @return AbsolutePath on server */
- public java.lang.String getFileAsolutePath( java.lang.String Filename ) throws java.rmi.RemoteException;
+ public java.lang.String getFileAsolutePath( java.lang.String Filename );
/**
* Business method
* @param FileName
* @return hash base64 encoded */
- public java.lang.String getFileMD5( java.lang.String FileName ) throws java.rmi.RemoteException;
+ public java.lang.String getFileMD5( java.lang.String FileName );
}
diff --git a/JasperReports/src/org/compiere/interfaces/MD5Home.java b/JasperReports/src/org/compiere/interfaces/MD5Home.java
deleted file mode 100644
index 699608c7b4..0000000000
--- a/JasperReports/src/org/compiere/interfaces/MD5Home.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * Generated file - Do not edit!
- */
-package org.compiere.interfaces;
-
-
-/**
- * Home interface for compiere/MD5. Lookup using {1}
- * @xdoclet-generated at Feb 27, 2006 1:18:49 PM
- */
-public interface MD5Home
- extends javax.ejb.EJBHome
-{
- public static final String COMP_NAME="java:comp/env/ejb/compiere/MD5";
- public static final String JNDI_NAME="ejb/compiere/MD5";
-
- public org.compiere.interfaces.MD5 create() throws javax.ejb.CreateException, java.rmi.RemoteException;
-
-}
diff --git a/JasperReports/src/org/compiere/report/ReportStarter.java b/JasperReports/src/org/compiere/report/ReportStarter.java
index 2d9cb357b8..04def55275 100644
--- a/JasperReports/src/org/compiere/report/ReportStarter.java
+++ b/JasperReports/src/org/compiere/report/ReportStarter.java
@@ -17,7 +17,6 @@ import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.net.UnknownHostException;
-import java.rmi.RemoteException;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
@@ -31,8 +30,6 @@ import java.util.Map;
import java.util.Properties;
import java.util.PropertyResourceBundle;
-import javax.ejb.CreateException;
-import javax.ejb.RemoveException;
import javax.naming.InitialContext;
import javax.naming.NamingException;
@@ -47,7 +44,6 @@ import net.sf.jasperreports.engine.util.JRLoader;
import org.compiere.db.CConnection;
import org.compiere.interfaces.MD5;
-import org.compiere.interfaces.MD5Home;
import org.compiere.model.MAttachment;
import org.compiere.model.MAttachmentEntry;
import org.compiere.model.MProcess;
@@ -134,13 +130,13 @@ public class ReportStarter implements ProcessCall, ClientProcess {
{
try
{
- Class md5HomeClass = Class.forName("org.compiere.interfaces.MD5Home");
+ Class md5Class = Class.forName("org.compiere.interfaces.MD5");
log.info("EJB client for MD5 remote hashing is present");
return true;
}
catch (ClassNotFoundException e)
{
- log.warning("EJB Client for MD5 remote hashing absent\nyou need the class org.compiere.interfaces.MD5Home - from webEJB-client.jar - in classpath");
+ log.warning("EJB Client for MD5 remote hashing absent\nyou need the class org.compiere.interfaces.MD5 - from webEJB-client.jar - in classpath");
return false;
}
}
@@ -164,11 +160,9 @@ public class ReportStarter implements ProcessCall, ClientProcess {
context = new InitialContext(env);
if (isRequestedonAS(requestURL) && isMD5HomeInterfaceAvailable())
{
- MD5Home home = (MD5Home)context.lookup(MD5Home.JNDI_NAME);
- MD5 md5 = home.create();
+ MD5 md5 = (MD5) context.lookup(MD5.JNDI_NAME);
md5Hash = md5.getFileMD5(requestedURLString);
log.info("MD5 for " + requestedURLString + " is " + md5Hash);
- md5.remove();
}
}
@@ -180,18 +174,6 @@ public class ReportStarter implements ProcessCall, ClientProcess {
log.warning("Unable to create jndi context did you deployed webApp.ear package?\nRemote hashing is impossible");
return null;
}
- catch (RemoteException e){
- log.warning("Unknown remote error exception");
- return null;
- }
- catch(CreateException e){
- log.warning("Error in RemoteInterface creation");
- return null;
- }
- catch(RemoveException e){
- log.warning("Error in RemoteInterface removing");
- return null;
- }
return md5Hash;
}
diff --git a/JasperReportsWebApp/build.xml b/JasperReportsWebApp/build.xml
index da22a6de0c..8bf13304d8 100644
--- a/JasperReportsWebApp/build.xml
+++ b/JasperReportsWebApp/build.xml
@@ -19,7 +19,7 @@
-
+
@@ -27,16 +27,11 @@
------ Compiling webApp
-
+
-
- ------ Executing xdoclet
-
-
-
------ packaging
@@ -57,7 +52,7 @@
-
+
diff --git a/JasperReportsWebApp/deploy/WebApp.ear/META-INF/application.xml b/JasperReportsWebApp/deploy/WebApp.ear/META-INF/application.xml
index fa7c460f01..fba4920ffc 100644
--- a/JasperReportsWebApp/deploy/WebApp.ear/META-INF/application.xml
+++ b/JasperReportsWebApp/deploy/WebApp.ear/META-INF/application.xml
@@ -1,9 +1,8 @@
-
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd"
+ version="5">
Web App
webAppEJB.jar
diff --git a/JasperReportsWebApp/deploy/WebApp.ear/META-INF/ejb-jar.xml b/JasperReportsWebApp/deploy/WebApp.ear/META-INF/ejb-jar.xml
deleted file mode 100644
index 3f7e18a484..0000000000
--- a/JasperReportsWebApp/deploy/WebApp.ear/META-INF/ejb-jar.xml
+++ /dev/null
@@ -1,69 +0,0 @@
-
-
-
-
-
- No Description.
- Generated by XDoclet
-
-
-
-
-
-
- Compiere Server MD5 hash computation
-
- compiere/MD5
-
- org.compiere.interfaces.MD5Home
- org.compiere.interfaces.MD5
- org.compiere.ejb.MD5Bean
- Stateless
- Bean
-
-
- ejb/compiere/MD5
- Session
- org.compiere.interfaces.MD5Home
- org.compiere.interfaces.MD5
- compiere/MD5
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/JasperReportsWebApp/deploy/WebApp.ear/META-INF/jboss.xml b/JasperReportsWebApp/deploy/WebApp.ear/META-INF/jboss.xml
index ff00bff041..832ffa1842 100644
--- a/JasperReportsWebApp/deploy/WebApp.ear/META-INF/jboss.xml
+++ b/JasperReportsWebApp/deploy/WebApp.ear/META-INF/jboss.xml
@@ -1,12 +1,14 @@
-
+
- compiere/MD5
+ compiereMD5
ejb/compiere/MD5
diff --git a/JasperReportsWebApp/deploy/WebApp.ear/webApp.war/WEB-INF/web.xml b/JasperReportsWebApp/deploy/WebApp.ear/webApp.war/WEB-INF/web.xml
index 046410ec5e..a1ab00da09 100644
--- a/JasperReportsWebApp/deploy/WebApp.ear/webApp.war/WEB-INF/web.xml
+++ b/JasperReportsWebApp/deploy/WebApp.ear/webApp.war/WEB-INF/web.xml
@@ -92,7 +92,6 @@
ejb/compiere/MD5
Session
- org.compiere.interfaces.MD5Home
org.compiere.interfaces.MD5
diff --git a/JasperReportsWebApp/src/META-INF/application.xml b/JasperReportsWebApp/src/META-INF/application.xml
index fa7c460f01..43753dbb75 100644
--- a/JasperReportsWebApp/src/META-INF/application.xml
+++ b/JasperReportsWebApp/src/META-INF/application.xml
@@ -1,10 +1,9 @@
-
- Web App
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd"
+ version="5">
+ JasperReport Web App
webAppEJB.jar
diff --git a/JasperReportsWebApp/src/META-INF/ejb-jar.xml b/JasperReportsWebApp/src/META-INF/ejb-jar.xml
deleted file mode 100644
index 81ee087bde..0000000000
--- a/JasperReportsWebApp/src/META-INF/ejb-jar.xml
+++ /dev/null
@@ -1,69 +0,0 @@
-
-
-
-
-
- No Description.
- Generated by XDoclet
-
-
-
-
-
-
- Compiere Server MD5 hash computation
-
- compiere/MD5
-
- org.compiere.interfaces.MD5Home
- org.compiere.interfaces.MD5
- org.compiere.ejb.MD5Bean
- Stateless
- Bean
-
-
- ejb/compiere/MD5
- Session
- org.compiere.interfaces.MD5Home
- org.compiere.interfaces.MD5
- compiere/MD5
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/JasperReportsWebApp/src/META-INF/jboss.xml b/JasperReportsWebApp/src/META-INF/jboss.xml
index ca60ebc742..870e8150ee 100644
--- a/JasperReportsWebApp/src/META-INF/jboss.xml
+++ b/JasperReportsWebApp/src/META-INF/jboss.xml
@@ -1,12 +1,14 @@
-
-
+
+
- compiere/MD5
+ compiereMD5
ejb/compiere/MD5
diff --git a/JasperReportsWebApp/src/WEB-INF/web.xml b/JasperReportsWebApp/src/WEB-INF/web.xml
index 770301b2ea..6ebe8a1928 100644
--- a/JasperReportsWebApp/src/WEB-INF/web.xml
+++ b/JasperReportsWebApp/src/WEB-INF/web.xml
@@ -1,100 +1,98 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- GetMD5File
- Name for GetMD5File
-
- org.compiere.web.GetMD5FileServlet
-
-
- A parameter
- A value
-
-
-
-
-
-
-
- GetMD5File
- /GetMD5File
-
-
-
-
-
-
-
-
-
-
-
- ejb/compiere/MD5
- Session
- org.compiere.interfaces.MD5Home
- org.compiere.interfaces.MD5
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+ GetMD5File
+
+ org.compiere.web.GetMD5FileServlet
+
+
+
+ A parameter
+ A value
+
+
+
+
+
+
+
+ GetMD5File
+ /GetMD5File
+
+
+
+
+
+
+
+
+
+
+
+ ejb/compiere/MD5
+ Session
+
+
+
diff --git a/JasperReportsWebApp/src/org/compiere/ejb/MD5Bean.java b/JasperReportsWebApp/src/org/compiere/ejb/MD5Bean.java
index 75fab01a3d..9b6f43407c 100644
--- a/JasperReportsWebApp/src/org/compiere/ejb/MD5Bean.java
+++ b/JasperReportsWebApp/src/org/compiere/ejb/MD5Bean.java
@@ -7,28 +7,19 @@
package org.compiere.ejb;
import java.net.URL;
-import java.rmi.RemoteException;
-import javax.ejb.CreateException;
-import javax.ejb.EJBException;
-import javax.ejb.SessionBean;
-import javax.ejb.SessionContext;
+import javax.ejb.Stateless;
+import org.compiere.interfaces.MD5;
import org.compiere.util.CLogger;
import org.compiere.utils.DigestOfFile;
/**
- * @ejb:bean name="compiere/MD5"
- * display-name="Compiere Server MD5 hash computation"
- * type="Stateless"
- * transaction-type="Bean"
- * jndi-name="ejb/compiere/MD5"
- * view-type="remote"
- *
* @ejb:ejb-ref ejb-name="compiere/MD5"
* ref-name="compiere/MD5"
*/
-public class MD5Bean implements SessionBean {
+@Stateless(mappedName=MD5.JNDI_NAME, name=MD5.EJB_NAME)
+public class MD5Bean implements MD5 {
private static final long serialVersionUID = 1L;
/**
@@ -41,53 +32,8 @@ public class MD5Bean implements SessionBean {
log = CLogger.getCLogger(MD5Bean.class);
}
- /* (non-Javadoc)
- * @see javax.ejb.SessionBean#setSessionContext(javax.ejb.SessionContext)
- */
- public void setSessionContext(SessionContext ctx)
- throws EJBException,
- RemoteException {
- // TODO Auto-generated method stub
-
- }
-
- /* (non-Javadoc)
- * @see javax.ejb.SessionBean#ejbRemove()
- */
- public void ejbRemove() throws EJBException, RemoteException {
- // TODO Auto-generated method stub
-
- }
-
- /* (non-Javadoc)
- * @see javax.ejb.SessionBean#ejbActivate()
- */
- public void ejbActivate() throws EJBException, RemoteException {
- // TODO Auto-generated method stub
-
- }
-
- /* (non-Javadoc)
- * @see javax.ejb.SessionBean#ejbPassivate()
- */
- public void ejbPassivate() throws EJBException, RemoteException {
- // TODO Auto-generated method stub
-
- }
-
- /**
- * Default create method
- *
- * @throws CreateException
- * @ejb.create-method
- */
- public void ejbCreate() throws CreateException {
- // TODO Auto-generated method stub
- }
-
/**
* Business method
- * @ejb.interface-method view-type = "remote"
* @param FileName
* @return hash base64 encoded
*/
@@ -131,7 +77,6 @@ public class MD5Bean implements SessionBean {
/**
* Business method
- * @ejb.interface-method view-type = "remote"
* @param Filename
* @return AbsolutePath on server
*/
diff --git a/JasperReportsWebApp/src/org/compiere/interfaces/MD5.java b/JasperReportsWebApp/src/org/compiere/interfaces/MD5.java
index 7c936ca69c..59a068ae39 100644
--- a/JasperReportsWebApp/src/org/compiere/interfaces/MD5.java
+++ b/JasperReportsWebApp/src/org/compiere/interfaces/MD5.java
@@ -3,23 +3,28 @@
*/
package org.compiere.interfaces;
+import javax.ejb.Remote;
+
/**
* Remote interface for compiere/MD5.
- * @xdoclet-generated at Feb 27, 2006 1:18:49 PM
*/
+@Remote
public interface MD5
- extends javax.ejb.EJBObject
{
+ public final static String JNDI_NAME = "ejb/compiere/MD5";
+
+ public final static String EJB_NAME = "compiereMD5";
+
/**
* Business method
* @param Filename
* @return AbsolutePath on server */
- public java.lang.String getFileAsolutePath( java.lang.String Filename ) throws java.rmi.RemoteException;
+ public java.lang.String getFileAsolutePath( java.lang.String Filename );
/**
* Business method
* @param FileName
* @return hash base64 encoded */
- public java.lang.String getFileMD5( java.lang.String FileName ) throws java.rmi.RemoteException;
+ public java.lang.String getFileMD5( java.lang.String FileName );
}
diff --git a/JasperReportsWebApp/src/org/compiere/interfaces/MD5Home.java b/JasperReportsWebApp/src/org/compiere/interfaces/MD5Home.java
deleted file mode 100644
index b5269330d8..0000000000
--- a/JasperReportsWebApp/src/org/compiere/interfaces/MD5Home.java
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * Generated file - Do not edit!
- */
-package org.compiere.interfaces;
-
-/**
- * Home interface for compiere/MD5. Lookup using {1}
- * @xdoclet-generated at Feb 27, 2006 1:18:49 PM
- */
-public interface MD5Home
- extends javax.ejb.EJBHome
-{
- public static final String COMP_NAME="java:comp/env/ejb/compiere/MD5";
- public static final String JNDI_NAME="ejb/compiere/MD5";
-
- public org.compiere.interfaces.MD5 create() throws javax.ejb.CreateException, java.rmi.RemoteException;
-
-}
diff --git a/JasperReportsWebApp/src/org/compiere/utils/MD5EjbTest.java b/JasperReportsWebApp/src/org/compiere/utils/MD5EjbTest.java
index 7c564a705a..bd5262b1f9 100644
--- a/JasperReportsWebApp/src/org/compiere/utils/MD5EjbTest.java
+++ b/JasperReportsWebApp/src/org/compiere/utils/MD5EjbTest.java
@@ -12,7 +12,6 @@ import java.util.Hashtable;
import javax.naming.InitialContext;
import org.compiere.interfaces.MD5;
-import org.compiere.interfaces.MD5Home;
/**
* @author rlemeill
*/
@@ -56,12 +55,10 @@ public class MD5EjbTest {
public static void testEjb(String serverName, InitialContext context, String Filename)
{
try{
- System.out.println("MD5Home Creation at: "+MD5Home.JNDI_NAME);
- MD5Home home = (MD5Home)context.lookup(MD5Home.JNDI_NAME);
- MD5 md5 = home.create();
+ System.out.println("MD5 Creation at: "+MD5.JNDI_NAME);
+ MD5 md5 = (MD5) context.lookup(MD5.JNDI_NAME);
System.out.println("Creation OK");
System.out.println("MD5 for " + Filename + " is " +md5.getFileMD5(Filename));
- md5.remove();
}
catch(Exception e)
{
diff --git a/JasperReportsWebApp/src/org/compiere/web/GetMD5FileServlet.java b/JasperReportsWebApp/src/org/compiere/web/GetMD5FileServlet.java
index 4cf23390d2..fe7bb230a6 100644
--- a/JasperReportsWebApp/src/org/compiere/web/GetMD5FileServlet.java
+++ b/JasperReportsWebApp/src/org/compiere/web/GetMD5FileServlet.java
@@ -19,32 +19,16 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.compiere.interfaces.MD5;
-import org.compiere.interfaces.MD5Home;
-
/**
* Servlet Class
- *
- * @web.servlet name="GetMD5File"
- * display-name="Name for GetMD5File"
- * description="Description for GetMD5File"
- * @web.servlet-mapping url-pattern="/GetMD5File"
- * @web.servlet-init-param name="A parameter"
- * value="A value"
- * @web.ejb-ref name="ejb/compiere/MD5"
- * type="Session"
- * home = "org.compiere.interfaces.MD5Home"
- * remote = "org.compiere.interfaces.MD5"
- *
- * @jboss.ejb-ref-jndi ref-name="ejb/compiere/MD5"
- * jndi-name = "ejb/compiere/MD5"
*/
public class GetMD5FileServlet extends HttpServlet {
/**
*
*/
- private MD5Home home;
+ private MD5 md5;
public GetMD5FileServlet() {
super();
@@ -56,8 +40,7 @@ public class GetMD5FileServlet extends HttpServlet {
try
{
Context context = new InitialContext();
- Object ref = context.lookup("java:/comp/env/ejb/compiere/MD5");
- home = (MD5Home)javax.rmi.PortableRemoteObject.narrow(ref,MD5Home.class);
+ md5 = (MD5) context.lookup("java:/comp/env/ejb/compiere/MD5");
}
catch(Exception e)
{
@@ -69,20 +52,9 @@ public class GetMD5FileServlet extends HttpServlet {
throws ServletException,
IOException {
// TODO Auto-generated method stub
- MD5 md5=null;
String file = req.getParameter("File");
PrintWriter out = resp.getWriter();
out.println("MD5 Hash");
- try
- {
- md5 = home.create();
- }
- catch(javax.ejb.CreateException e)
- {
- out.println("Error javax.ejb.CreateException home.create();
");
- out.println("");
- throw new ServletException("Error CreateException");
- }
out.println("File is: "+ file + "
MD5 : "+ md5.getFileMD5(file)+"
");
//out.println(md5.getFileAsolutePath(file));
out.println("