Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools incubator » How to auto generate JAXWS annotated class from session bean
How to auto generate JAXWS annotated class from session bean [message #654079] Mon, 14 February 2011 02:19
Sam  is currently offline Sam Friend
Messages: 5
Registered: February 2011
Junior Member

Let me rephrase my question in regarding to my previous post.

I want to automatically generate JAX-WS annotated class from an existing session bean. But I couldn't find a way to do that rather than manually adding jaxws annotation to every session beans that I want to expote them as web servcies.

The session bean class is given below:


// Generated 13/02/2011 10:57:42 PM by Hibernate Tools 3.4.0.CR1

import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

* Home object for domain model class Role.
* @see
* @author Hibernate Tools
public class RoleHome {

private static final Log log = LogFactory.getLog(RoleHome.class);

private EntityManager entityManager;

public void persist(Role transientInstance) {
log.debug("persisting Role instance");
try {
log.debug("persist successful");
} catch (RuntimeException re) {
log.error("persist failed", re);
throw re;

public void remove(Role persistentInstance) {
log.debug("removing Role instance");
try {
log.debug("remove successful");
} catch (RuntimeException re) {
log.error("remove failed", re);
throw re;

public Role merge(Role detachedInstance) {
log.debug("merging Role instance");
try {
Role result = entityManager.merge(detachedInstance);
log.debug("merge successful");
return result;
} catch (RuntimeException re) {
log.error("merge failed", re);
throw re;

public Role findById(long id) {
log.debug("getting Role instance with id: " + id);
try {
Role instance = entityManager.find(Role.class, id);
log.debug("get successful");
return instance;
} catch (RuntimeException re) {
log.error("get failed", re);
throw re;

Very appreciate for any suggestion and help.

Previous Topic:How to generate JAX-WS annotation from entity class
Next Topic:JPA Diagram Editor 0.5.0 + Maven project
Goto Forum:

Current Time: Wed Jun 19 08:36:04 GMT 2024

Powered by FUDForum. Page generated in 0.03326 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top