JBoss Community

Re: EJB 3.1 beans in jars in a war packaged app do not get deployed

created by Marek Dec in EJB3 - View the full discussion

Hi,

 

Here goes the TestService:

 

package com.mytests.service;

 

import javax.ejb.Stateful;@Statefulpublic class TestService {

 

    @PersistenceContext    EntityManager entityManger;

 

    public String getText() {        Category cat = new Category();        entityManger.persist(cat);

 

        return null;

    }}

 

 

And here the AnotherService:

 

package com.mytests.core.dao;

 

import javax.ejb.Stateful;

 

@Statefulpublic class AnotherService {

 

    public void getTest() {        int i = 0;    }}

 

 

 

Now the web.xml header:

 

<?xml version="1.0" encoding="UTF-8"?><web-app 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/web-app_3_0.xsd"      version="3.0">    <display-name>Web Application</display-name>

 

 

And I don't use the ejb-jar.xml file.

 

Does this seem OK?

Reply to this message by going to Community

Start a new discussion in EJB3 at Community