admin Mbean tag's (was: Re: [JBoss-user] Everlasting sessionbean,now a MBean)

2001-07-03 Thread Peter Fagerlund

on 1-06-07 14.25, Juha Lindfors at [EMAIL PROTECTED] wrote:

> you can check the code in:
> http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/jboss/admin/src/org/jboss/adm
> in/mbean/SystemMonitor.java?rev=1.3&content-type=text/vnd.viewcvs-markup

what is the Mbean tags for the AdminServerMBean and SystemMonitorMBean ?

/peter


___
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user



RE: [JBoss-user] Everlasting sessionbean, now a MBean

2001-06-07 Thread Javier Muguruza

thanks for the example, I will follow it. After adding the jar that contains
the bean I want to call to the lib\ext directory the lookup worked.

> -Mensaje original-
> De: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]En nombre de Juha
> Lindfors
> Enviado el: jueves 7 de junio de 2001 14:26
> Para: [EMAIL PROTECTED]
> Asunto: RE: [JBoss-user] Everlasting sessionbean, now a MBean
>
>
>
> Hi,
>
> At 18:12 6.6.2001 +0200, you wrote:
> >After starting jbosss, I use the 8082 html page to invoke the method that
> >connects to the socket (I asume that this has another benefit,
> as it is not
> >anymore an ejb and it does comply the spec??)
>
> yes.
>
> >
> >When a receive data from the socket I want to call a session
> bean, but when
> >I do the:
> > Object ref  = jndiContext.lookup("jms/SendAlarm");
> >a JMRuntimeException is thrown.
> >
> >Is there a way to indicate to a mbean that it will use a bean??
>
> There's no need for that. The MBean is just another ordinary Java class
> with management interface. You can code it as you would any EJB client.
>
> Try cathing the NamingException from lookup, it should tell you what's
> going wrong. For an example of an MBean doing jndi lookup and jms
> messaging
> you can check the code in:
> http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/jboss/admin/src/org
/jboss/adm
in/mbean/SystemMonitor.java?rev=1.3&content-type=text/vnd.viewcvs-markup


-- Juha



>
>thanks,
>
>
>> -Mensaje original-----
>> De: [EMAIL PROTECTED]
>> [mailto:[EMAIL PROTECTED]]En nombre de Juha
>> Lindfors
>> Enviado el: martes 5 de junio de 2001 21:28
>> Para: [EMAIL PROTECTED]
>> Asunto: Re: [JBoss-user] Everlasting sessionbean
>>
>>
>> At 20:10 5.6.2001 +0200, you wrote:
>> >1. now I am using a client app just to invoke the session bean's only
>> >function, is there a way in jboss to make a session bean instantiate and
>> >invoke a method without a client (just for easier administration).
>> >
>> >2. is there a problem if the session bean's function never
>> returns?? It is
>> >reading from the socket forever.
>> >
>> >3. Should it be statefull, statelesss... any other proposition?
>>
>> Yes, don't use either. Instead create an MBean for the task. Then you can
>> get rid of the client app as well.
>>
>> -- Juha
>>
>>
>> ___
>> JBoss-user mailing list
>> [EMAIL PROTECTED]
>> http://lists.sourceforge.net/lists/listinfo/jboss-user
>
>
>___
>JBoss-user mailing list
>[EMAIL PROTECTED]
>http://lists.sourceforge.net/lists/listinfo/jboss-user
>

___
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user


___
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user



RE: [JBoss-user] Everlasting sessionbean, now a MBean

2001-06-07 Thread Juha Lindfors


Hi,

At 18:12 6.6.2001 +0200, you wrote:
>After starting jbosss, I use the 8082 html page to invoke the method that
>connects to the socket (I asume that this has another benefit, as it is not
>anymore an ejb and it does comply the spec??)

yes.

>
>When a receive data from the socket I want to call a session bean, but when
>I do the:
>   Object ref  = jndiContext.lookup("jms/SendAlarm");
>a JMRuntimeException is thrown.
>
>Is there a way to indicate to a mbean that it will use a bean??

There's no need for that. The MBean is just another ordinary Java class
with management interface. You can code it as you would any EJB client.

Try cathing the NamingException from lookup, it should tell you what's
going wrong. For an example of an MBean doing jndi lookup and jms messaging
you can check the code in:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/jboss/admin/src/org/jboss/adm
in/mbean/SystemMonitor.java?rev=1.3&content-type=text/vnd.viewcvs-markup


-- Juha



>
>thanks,
>
>
>> -Mensaje original-
>> De: [EMAIL PROTECTED]
>> [mailto:[EMAIL PROTECTED]]En nombre de Juha
>> Lindfors
>> Enviado el: martes 5 de junio de 2001 21:28
>> Para: [EMAIL PROTECTED]
>> Asunto: Re: [JBoss-user] Everlasting sessionbean
>>
>>
>> At 20:10 5.6.2001 +0200, you wrote:
>> >1. now I am using a client app just to invoke the session bean's only
>> >function, is there a way in jboss to make a session bean instantiate and
>> >invoke a method without a client (just for easier administration).
>> >
>> >2. is there a problem if the session bean's function never
>> returns?? It is
>> >reading from the socket forever.
>> >
>> >3. Should it be statefull, statelesss... any other proposition?
>>
>> Yes, don't use either. Instead create an MBean for the task. Then you can
>> get rid of the client app as well.
>>
>> -- Juha
>>
>>
>> ___
>> JBoss-user mailing list
>> [EMAIL PROTECTED]
>> http://lists.sourceforge.net/lists/listinfo/jboss-user
>
>
>___
>JBoss-user mailing list
>[EMAIL PROTECTED]
>http://lists.sourceforge.net/lists/listinfo/jboss-user
>

___
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user



RE: [JBoss-user] Everlasting sessionbean, now a MBean

2001-06-06 Thread Javier Muguruza

Thanks for the hint, I tried it this way.


Unfortunately Mbeans are not very well documented (several examples do
things differently: a howto about dependent mbeans, a couple of posts in the
list...). And finally got something working, after looking in a jmx.pdf by
Rickard Oberg I found. Anyway, I do not know very well what is going on, but
it works.

I made a jar and put it in lib\ext.

I modified jboss.conf.

After starting jbosss, I use the 8082 html page to invoke the method that
connects to the socket (I asume that this has another benefit, as it is not
anymore an ejb and it does comply the spec??)

When a receive data from the socket I want to call a session bean, but when
I do the:
Object ref  = jndiContext.lookup("jms/SendAlarm");
a JMRuntimeException is thrown.

Is there a way to indicate to a mbean that it will use a bean??

thanks,


> -Mensaje original-
> De: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]En nombre de Juha
> Lindfors
> Enviado el: martes 5 de junio de 2001 21:28
> Para: [EMAIL PROTECTED]
> Asunto: Re: [JBoss-user] Everlasting sessionbean
>
>
> At 20:10 5.6.2001 +0200, you wrote:
> >1. now I am using a client app just to invoke the session bean's only
> >function, is there a way in jboss to make a session bean instantiate and
> >invoke a method without a client (just for easier administration).
> >
> >2. is there a problem if the session bean's function never
> returns?? It is
> >reading from the socket forever.
> >
> >3. Should it be statefull, statelesss... any other proposition?
>
> Yes, don't use either. Instead create an MBean for the task. Then you can
> get rid of the client app as well.
>
> -- Juha
>
>
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user


___
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] Everlasting sessionbean

2001-06-05 Thread Juha Lindfors

At 20:10 5.6.2001 +0200, you wrote:
>1. now I am using a client app just to invoke the session bean's only
>function, is there a way in jboss to make a session bean instantiate and
>invoke a method without a client (just for easier administration).
>
>2. is there a problem if the session bean's function never returns?? It is
>reading from the socket forever.
>
>3. Should it be statefull, statelesss... any other proposition?

Yes, don't use either. Instead create an MBean for the task. Then you can
get rid of the client app as well.

-- Juha


___
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user



RE: [JBoss-user] Everlasting sessionbean

2001-06-05 Thread Filip Hanik

A bean is not allowed to access a socket unless it is being passed as a
reference into a method call.
a bean holding a reference to a socket will prevent it from being properly
serialized, and replicated.

>2. is there a problem if the session bean's function never returns?? It is
>reading from the socket forever.

yes, you are violating the spec.

why would you want to do this with a bean? use a regular Java object.

Filip

~
Namaste - I bow to the divine in you
~
Filip Hanik
Software Architect
[EMAIL PROTECTED]
www.filip.net

>-Original Message-
>From: [EMAIL PROTECTED]
>[mailto:[EMAIL PROTECTED]]On Behalf Of Javier
>Muguruza
>Sent: Tuesday, June 05, 2001 11:11 AM
>To: [EMAIL PROTECTED]
>Subject: [JBoss-user] Everlasting sessionbean
>
>
>Hi,
>
>I want to use a sesssion bean (dont know yet wether it will be statefull,
>stateless or it does not matter) to read data from a socket (comming from a
>non ejb application).
>
>This bean would proceed calling other session beans to do the
>actual work. I
>have tried with a stateless bean with jboss and it works, but i have a
>couple of questions:
>
>1. now I am using a client app just to invoke the session bean's only
>function, is there a way in jboss to make a session bean instantiate and
>invoke a method without a client (just for easier administration).
>

>
>3. Should it be statefull, statelesss... any other proposition?
>
>thank you,
>
>
>___
>JBoss-user mailing list
>[EMAIL PROTECTED]
>http://lists.sourceforge.net/lists/listinfo/jboss-user
>


___
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user