Deploy mbean na jboss - nejjednodussi priklad

Pavel Nemec nemecp4 na gmail.com
Pátek Květen 22 14:53:35 CEST 2009


Dik za napad, opravdu to funguje, i kdyz jsem nakonec zvolil zpusob s
deskriptorem.

P.

2009/5/15 David Vana <David.Vana na ness.com>:
> --- 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 MailAdmin na ness.com 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.
>



Další informace o konferenci Konference