Sure.
MyManagedIfc.java
| package org.myOrg;
|
| import org.jboss.annotation.ejb.Management;
|
| @Management
| public interface MyManagedIfc {
| void create() throws Exception;
| void start() throws Exception;
| void stop();
| void destroy();
| }
|
MyManagedBean.java
| package org.myOrg;
|
| import org.jboss.annotation.ejb.Service;
| import org.jboss.annotation.ejb.Management;
|
| @Service
| @Management(org.myOrg.MyManagedIfc.class)
| public class MyManagedBean implements MyManagedIfc {
|
| public MyManagedBean() {
| System.out.println("MyManagedBean()\n");
| }
|
| public void create() throws Exception {
| System.out.println("MyManagedBean.create()\n");
| }
|
| public void start() throws Exception {
| System.out.println("MyManagedBean.start()\n");
|
| System.out.println(" \n");
| System.out.println("Hibernate Version: " +
org.hibernate.cfg.Environment.VERSION);
| System.out.println("Hibernate Annotations Version: " +
org.hibernate.cfg.annotations.Version.VERSION);
| System.out.println("Hibernate EM Version: " +
org.hibernate.ejb.Version.VERSION);
| System.out.println(" \n");
| }
|
| public void stop() {
| System.out.println("MyManagedBean.stop()\n");
| }
|
| public void destroy() {
| System.out.println("MyManagedBean.destroy()\n");
| }
| }
|
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4170560#4170560
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4170560
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user