KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > ejb3 > test > servicedependency > UniqueId


1 /*
2  * JBoss, the OpenSource J2EE webOS
3  *
4  * Distributable under LGPL license.
5  * See terms of license at gnu.org.
6  */

7 package org.jboss.ejb3.test.servicedependency;
8
9 import java.util.UUID JavaDoc;
10
11 import org.jboss.annotation.ejb.Management;
12 import org.jboss.annotation.ejb.Service;
13 import org.jboss.logging.Logger;
14
15 /**
16  * A UniqueIdMBean.
17  *
18  * @author <a HREF="galder.zamarreno@jboss.com">Galder Zamarreno</a>
19  * @version $Revision: 44487 $
20  */

21 @Service(objectName="acme:service=uniqueid")
22 @Management(UniqueIdMBean.class)
23 public class UniqueId implements UniqueIdMBean
24 {
25    private static final Logger log = Logger.getLogger(UniqueId.class);
26
27    public UUID JavaDoc generate()
28    {
29       return UUID.randomUUID();
30    }
31
32    public void create() throws Exception JavaDoc
33    {
34       log.info("create()");
35
36    }
37
38    public void start() throws Exception JavaDoc
39    {
40       log.info("start()");
41
42    }
43
44    public void stop() throws Exception JavaDoc
45    {
46       log.info("stop()");
47
48    }
49
50    public void destroy() throws Exception JavaDoc
51    {
52       log.info("destroy()");
53
54    }
55
56 }
57
Popular Tags