We Recommend

Java How to Program Java How to Program
Takes a new tools-based approach to Web application development that uses Netbeans 5.5 and Java Studio Creator 2 to create and consume Web Services. Features new AJAX-enabled, Web applications built with JavaServer Faces (JSF), Java Studio Creator 2 and the Java Blueprints AJAX Components. Includes new topics throughout, such as JDBC 4, SwingWorker for multithreaded GUIs, GroupLayout, Java Desktop Integration Components (JDIC), and much more.


Posted By

narkisr on 01/23/08


Tagged

JBoss Annotation


Versions (?)


An example of JBoss @Depends annotation usage within an MBean


Published in: Java 


In this example we see that the @Depends annotation contains the JMX name of the stateless bean that we are dependent upon.
For example: jboss.j2ee:ear=dummyEar.ear,jar=dummyJar.jar,name=DummySLSB,service=EJB3

consists of:
jboss.j2ee: # our domain
ear=dummyEar.ear #containing deployment unit
jar=dummyJar.jar # the application container
name=DummySLSB # the name of the service
service=EJB3 # the service type
To find out these values its best to look at http://localhost:8080/jmx-console/ when the jboss is up.


  1. @Depends(value = "jboss.j2ee:ear=dummyEar.ear,jar=dummyJar.jar,name=DummySLSB,service=EJB3")
  2. @Service(objectName = "jboss:custom=DummyMDB")
  3. @Local(DummyIFC.class)
  4. public class DummyMDB implements DummyIFC {
  5. // your methods here
  6. }

Report this snippet 

You need to login to post a comment.