FINALLY IT WORK ALSO WIN7 but only with ear file and a application.xml file and deployed int oapps idr of tomee and not from webapps.
*hi ALL . I post how i have deployed my ejb into tomee for call it from another tomcat plain .* *SERVER-SIDE (TOMEE) * 1) i have enable the apps directory for deploy ear fiels into apps dir of tomee 2) i have packaged the appliaction into a ear file and i have pasted into apps dir 3) the ear file containt: dir: META-INF/application.xml dit lib //with a jar that contain the interfaces and other classes that bot the ejb and web application can use . a ejb.jar (in my case it is :EARMauro-ejb.jar a war file(in my case it is:EARMAuro-war.war *the application-xml war it containt: <?xml version="1.0" encoding="UTF-8"?> <application version="6" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_6.xsd"> <display-name>EARMauro</display-name> <module> <web> <web-uri>EARMauro-war.war</web-uri> <context-root>/EARMauro-war</context-root> </web> </module> <module> <ejb>EARMauro-ejb.jar</ejb> </module> </application>* i publish also image of my apps dir of tomee and inside the ear file <http://openejb.979440.n4.nabble.com/file/n4667226/the_application_xml_file.jpg> <http://openejb.979440.n4.nabble.com/file/n4667226/my_directory_apps_of_tomee.jpg> <http://openejb.979440.n4.nabble.com/file/n4667226/insideEARMAuro.jpg> ----------------- into CLIENT:SIDE : another tomcat plain instance. i have created a web application for call the remote ejb on tomee . i have put into the plain tomcat/lib the file javaee-api-6.0-5-tomcat.jar and into the web-inf/lib of the web application of tomcat plain the file openejb-client.jar and the jar file with the remote interfaces of ejb deployed to tomee. from a servlet inside the war client file i have called the remote ejb: protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html;charset=UTF-8"); PrintWriter out = response.getWriter(); EJBMauroEARRemote eARRemote=null; InitialContext ctx = null; try { Properties p = new Properties(); p.put("java.naming.factory.initial", "org.apache.openejb.client.RemoteInitialContextFactory"); p.put("java.naming.provider.url", "http://127.0.0.1:8080/tomee/ejb"); // user and pass optional //p.put("java.naming.security.principal", "myuser"); //p.put("java.naming.security.credentials", "mypass"); ctx = new InitialContext(p); eARRemote= (EJBMauroEARRemote)ctx.lookup("global/EARMauro/EARMauro-ejb/EJBMauroEARRemoteimpl!mauro.ejb.EJBMauroEARRemote"); /* TODO output your page here. You may use following sample code. */ out.println("<!DOCTYPE html>"); out.println("<html>"); out.println("<head>"); out.println("<title>Servlet ServletEjb</title>"); out.println("</head>"); out.println("<body>"); out.println(" Servlet ServletEjb at " + request.getContextPath() + " "); out.println("Ejbremoto:"+eARRemote.commenta("prova chiamata da tomcat a tomee")); out.println("</body>"); out.println("<br/>"); out.println("</body>"); out.println("</html>"); } catch (NamingException ex) { // Logger.getLogger(ServletEjb.class.getName()).log(Level.SEVERE, null, ex); ex.printStackTrace(out); } finally { out.close(); } } *and finally it work also with win7.* i hope that the post help all persons that get erros from call the remote ejb with win7. I think that it is enable only form apps dir and not from webapps dir . -- View this message in context: http://openejb.979440.n4.nabble.com/call-ejb-remote-not-work-help-me-tp4666948p4667226.html Sent from the OpenEJB User mailing list archive at Nabble.com.
