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...
I am still fighting here with JBoss 5, he is like hulk.
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.
I am not using any EAR, I am deploying the EAR directly, should be an EAR neccesary?
I deploy a war with the following:
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">
JAX-WS endpoint - Vademecum
This work in WebLogic, perhaps I am missing something
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...
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.