Deploy mbean na jboss - nejjednodussi priklad

David Vana David.Vana na ness.com
Pátek Květen 22 15:19:48 CEST 2009


Ten se pak da vygenerovat pres twiddle utilitu v jboss/bin.
 
D.

________________________________

Od: konference-bounces na java.cz za uživatele Pavel Nemec
Odesláno: pá 22.5.2009 14:53
Komu: Java
Předmět: Re: Deploy mbean na jboss - nejjednodussi priklad



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ší část ---------------
A non-text attachment was scrubbed...
Name: [žádný popis není k dispozici]
Type: application/ms-tnef
Size: 5290 bytes
Desc: [žádný popis není k dispozici]
URL: <http://amaio.cz/pipermail/konference/attachments/20090522/14920360/attachment.bin>


Další informace o konferenci Konference