[JBoss-user] [Management, JMX/JBoss] - Re: How to push data to JMX components?
Ok, I follow your hints with only a difference: I've two interfaces implemented by the same pojo, the MBean interface and an interface for internal use. Next I've registered in the jndi this pojo using the Nonserializablefactory. By this way I can cast it in the internal interface for business requirements and use it with the standard MBean interface for management requirements. Tanks again. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3938608#3938608 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3938608 --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Management, JMX/JBoss] - Re: How to push data to JMX components?
this is the solution i've found: my stateless session bean: | public class CounterBean implements SessionBean { | |public static MovementsMgr myMBean=null; | |public void ejbCreate() throws CreateException { | if (myMBean == null){ | myMBean= new com.alblab.management.MovementsMgr(); | MBeanServerLocator.locateJBoss().registerMBean(myMBean,new bjectName(xxx:name=movements)); | System.out.println(MovementsMgrMBean registered); | } |} | |. |. |. |// my Ejb remote business method |public String putMoney(int amount) { | myMBean.setInbound(amount); //my method on MovementsMgr not exposed in the MBean Interface | . | . |} | } MBean interface: | public interface MovementsMgrMBean extends ServiceMBean{ | public int getInbound(); | . | . | . | } MBean Implementation: public class MovementsMgr extends ServiceMBeanSupport implements MovementsMgrMBean { | | private int inbound; | public MovementsMgr(){ | inbound=0; | } | | . | . | . | | public int getInbound() { | return inbound; | } | | //not exposed in the MBean interface | public void setInbound(int amount){ | inbound=inbound+amount; | } | } Is this a right way to do it? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3938125#3938125 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3938125 --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Management, JMX/JBoss] - Re: How to push data to JMX components?
I like the idea but I've a question about. Does it work in a clustered evironment? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3938146#3938146 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3938146 --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [EJB 3.0] - Re: problem with ejb3 on jboss4.0.3SP1
Sorry I made a mistake posting the code in the forum.. The real code I used is import javax.ejb.*; View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3937125#3937125 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3937125 --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Management, JMX/JBoss] - How to push data to JMX components?
There is a way to use a method of a class that implements an MBean interface but not for that particular method? This is the case: I want to push data from a stateless session bean into a management component I've developed, so that I can see the total amount of a parameter passed to the slsb at the end of the day. The problem is that the management component should expose only readonly properties and no methods through the MBean interface, so I cannot use the usual invoke any idea? bye View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3937128#3937128 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3937128 --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [EJB 3.0] - problem with ejb3 on jboss4.0.3SP1
I cannot get rid of this: I've a trivial ejb3 stateless session bean. package com.alblab.ejb3.interfaces; | // remote interface | | import javax.ejb.Local; | | @Remote | public interface RemoteCalculator { | public double calculate(int a,int b); | } //implementation bean | package com.alblab.ejb3.stateless; | | import javax.ejb.*; | import com.alblab.ejb3.interfaces.RemoteCalculator; | @Stateless | public class CalculatorBean implements RemoteCalculator { | public int calculate(int a, int b){ | return a+b; | } | } I've packed these classes in a jar with extension .ejb3 and deployed it on jboss 4.0.3SP1 anonymous wrote : //deployement info | | 13:32:48,305 INFO [JaccHelper] Initialising JACC Context for deployment: Calculator.ejb3 | 13:32:48,506 INFO [Ejb3AnnotationHandler] found EJB3: ejbName=com.alblab.ejb3.stateless.CalculatorBean, class=com.alblab.ejb3.stateless.CalculatorBean, type=ST | ATELESS | 13:32:48,716 INFO [JaccHelper] com.alblab.ejb3.stateless.CalculatorBean has no @SecurityDomain - skipping JACC configuration | 13:32:48,716 INFO [JaccHelper] JACC Policy Configuration for deployment has been put in service | 13:32:48,716 INFO [Ejb3Deployment] EJB3 deployment time took: 411 | 13:32:48,796 INFO [ProxyDeployer] no declared remote bindings for : com.alblab.ejb3.stateless.CalculatorBean | 13:32:48,806 INFO [ProxyDeployer] there is remote interfaces for com.alblab.ejb3.stateless.CalculatorBean | 13:32:48,806 INFO [ProxyDeployer] default remote binding has jndiName of com.alblab.ejb3.interfaces.RemoteCalculator | 13:32:48,896 INFO [EJB3Deployer] Deployed: file:/C:/Java/workspace/ejb3_Prj_1/Calculator.ejb3 Then I tryed to test the stateless session bean with tish client: //test client | import java.util.*; | import javax.naming.*; | import com.alblab.ejb3.interfaces.*; | public class Test { | | public static void main(String[] args) { | | System.setSecurityManager(new SecurityManager(){ | public void checkPermission(Permission p){} | }); | | try { | Properties tab= new Properties(); | tab.put(java.naming.factory.initial,org.jnp.interfaces.NamingContextFactory); | tab.put(java.naming.provider.url,localhost:1099); | tab.put(java.naming.factory.url.pkgs,org.jboss.naming:org.jnp.interfaces); | Context ctx = new InitialContext(tab); | RemoteCalculator cal= (RemoteCalculator) ctx.lookup(RemoteCalculator.class.getName()); | int res=cal.calculate(1,1); | } catch (NamingException e) { | e.printStackTrace(); | } | } | | } The client succeds in the lookup operation but fails when the method calculate is invoked with the stack trace that follows: anonymous wrote : // error: server stack trace | | 13:34:25,535 ERROR [ServerThread] failed to process invocation. | java.net.SocketTimeoutException: Read timed out | at java.net.SocketInputStream.socketRead0(Native Method) | at java.net.SocketInputStream.read(SocketInputStream.java:129) | at java.io.BufferedInputStream.fill(BufferedInputStream.java:218) | at java.io.BufferedInputStream.read1(BufferedInputStream.java:256) | at java.io.BufferedInputStream.read(BufferedInputStream.java:313) | at java.io.ObjectInputStream$PeekInputStream.read(ObjectInputStream.java:2217) | at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2230) | at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2698) | at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:750) | at java.io.ObjectInputStream.(ObjectInputStream.java:268) | at org.jboss.remoting.transport.socket.ServerSocketWrapper.createInputStream(ServerSocketWrapper.java:33) | at org.jboss.remoting.transport.socket.ClientSocketWrapper.getInputStream(ClientSocketWrapper.java:62) | at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:239) | at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:285) | at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:169) anonymous wrote : // error: client stack trace | | Exception in thread main org.jboss.remoting.CannotConnectException: Can not get connection to server. Problem establishing socket connection. | at org.jboss.remoting.transport.socket.SocketClientInvoker.transport(SocketClientInvoker.java:267) | at org.jboss.remoting.RemoteClientInvoker.invoke(RemoteClientInvoker.java:143) | at
[JBoss-user] [EJB 3.0] - Re: problem with ejb3 on jboss4.0.3SP1
I worked around the problem: installing the EJB-3.0_RC4 and changing the JNDI reference accordingly the sample work ... but I'm still puzzled about the behavior described in the post... 'cause I've not found yet a solution for the old environment. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3935486#3935486 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3935486 --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user