--- my.math.CalculatorManager.java:

package my.math;

import org.jboss.annotation.ejb.Management;

@Management
public interface CalculatorManager {
 public double sum(int x, int y);
}

--- my.math.CalculatorMBean.java:

package my.math;

import org.jboss.annotation.ejb.Service;

@Service(objectName = "jbia:service=calculatorManager")
public class CalculatorMBean implements CalculatorManager {

 public double sum(int x, int y) {
  return x + y;
 }

}

---

Zabalit do JAR (zadny descriptor), nadeployovat a vyzkouset v konzoli: 
http://localhost:8080/jmx-console/

Zkouseno na JBoss AS 4.2.2.GA.


______________________________________________________
The information contained in this communication is intended solely for the use 
of the individual or entity to whom it is addressed and others authorized to 
receive it. It may contain confidential or legally privileged information. If 
you are not the intended recipient you are hereby notified that any disclosure, 
copying, distribution or taking any action in reliance on the contents of this 
information is strictly prohibited and may be unlawful. If you have received 
this communication in error, please notify us immediately by forwarding this 
email to [email protected] and then delete it from your system.

Ness Technologies is neither liable for the proper and complete transmission of 
the information contained in this communication nor for any delay in its 
receipt.

<<winmail.dat>>

Odpovedet emailem