-
1. Re: [URGENT] Deploying an EJB using Metro and persistence
mikioma Jun 26, 2009 6:56 AM (in response to creaturita)Can you give more information about how you deploy it? Do you use a single EAR file?
If you don't do so, it could be the reason for @EJB and @PersistenceContext to fail...
Good luck! -
2. Re: [URGENT] Deploying an EJB using Metro and persistence
jaikiran Jun 26, 2009 6:57 AM (in response to creaturita)"creaturita" wrote:
Hello,
I am still fighting here with JBoss 5, he is like hulk.
LOL :)"creaturita" wrote:
I have installed EJB and Metro plugins specting to be able to use ejb 3 in a servlet. With JBoss 4 I could not do it.
Well, I want to deploy an EJB webservice in a war and I am having lots of difficulties:
- It does not resolve @EJB and @PersistenceContext. The wsdl is well formed, but when I call the @ejb does not work.
It could be a problem with metro?
Could you please open a thread with the details in the WS metro forum here http://www.jboss.org/index.html?module=bb&op=viewforum&f=275. They might have a better idea whether this is supported or not. -
3. Re: [URGENT] Deploying an EJB using Metro and persistence
creaturita Jun 26, 2009 7:01 AM (in response to creaturita)I am not using any EAR, I am deploying the EAR directly, should be an EAR neccesary?
I deploy a war with the following:
-WebContent
-----META-INF
-----------MANIFEST.MF
WEB-INF
------lib
-----------sun-jaxws.xml
-----------web.xml
In web.xml I have the following:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
<display-name>GatewayVademecum</display-name>
<listener-class>com.sun.xml.ws.transport.http.servlet.WSServletContextListener</listener-class>
JAX-WS endpoint - Vademecum
<display-name>ServicioVademecum</display-name>
<servlet-name>VademecumPort</servlet-name>
<servlet-class>com.sun.xml.ws.transport.http.servlet.WSServlet</servlet-class>
<load-on-startup>1</load-on-startup>
<servlet-mapping>
<servlet-name>VademecumPort</servlet-name>
<url-pattern>/ServicioVademecumService</url-pattern>
</servlet-mapping>
</web-app>
This work in WebLogic, perhaps I am missing something -
4. Re: [URGENT] Deploying an EJB using Metro and persistence
mikioma Jun 26, 2009 7:10 AM (in response to creaturita)I don't know metro... but I don't think it is EJB-aware or EntityManager-aware without some kind of configuration... is it?
If you're not using an EAR... I guess you need to configure which EJB you want to call from within your web application (as your web service reside into your web application).
I think that deploying everything into a single EAR file makes all the modules within it a single application, so injection has a better chance to work.
However, I've never deployed WARs into the same server I deploy EJBs... so I've never tried...
Good luck!! -
5. Re: [URGENT] Deploying an EJB using Metro and persistence
creaturita Jun 26, 2009 7:15 AM (in response to creaturita)The thing is that the EJB is exposed like a webservice, It is not a webservice which calls an EJB, it is a EJB exposed as a webservice.