Help coderanch get a
new server
by contributing to the fundraiser

Josh Britton

Greenhorn
+ Follow
since Nov 26, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Josh Britton

I was wrong (wish I could say that was surprising). The test deployment on my local machine was failing to deploy my EAR. When I fixed the deployment error, the individual beans showed in jmx and I could see the MBean attribute display for invocation statistics. Excellent. I wish those stats were available through web-console: I would like to graph them and register monitors on them. Nonetheless, at least now I can access them. Thanks for your guidance, and sorry for newbie bumbling. I will look forward to a more thoroughly featured admin console!

Josh
14 years ago
Thanks for sticking with me, here.

When I use the jmx-console, I do not see any MBeans corresponding to my beans in jboss.j2ee. The only listings are:


ear=profileservice-secured.jar,jar=profileservice-secured.jar,service=EJB3
jar=profileservice-secured.jar,name=SecureDeploymentManager,service=EJB3
jar=profileservice-secured.jar,name=SecureManagementView,service=EJB3
jar=profileservice-secured.jar,name=SecureProfileService,service=EJB3
service=EARClassLoaderDeployer
service=EARDeployer


In fact, jmx doesn't show any MBean in any domain for specific beans in my app (or for the JBoss apps, such as web-console, for that matter (excepting profileservice, as shown above)). I know my beans are deployed, because they work (my clients access them and use them frequently and successfully). So I suspect that there is some small module or jmx configuration issue that I am missing. Do I need to add an interceptor somewhere? Or is there a setting needed in an app-related configuration file, such as application.xml or ejb-jar.xml?

Thanks for any further insights. I'm still fairly new to JBoss, and it is hard to troubleshoot without a good sense of the underlying system. I'm working my way through your book to get that sense!

Josh
14 years ago
Thanks for your reply. It's good to know that the admin console is supposed to supply bean-specific invocation data -- now if only I could get it to work! I installed the latest ejb3 jar, but I still don't see any statistics for individual beans. When I "drill down" in the admin console, the ear and the ejb module are both leaf-nodes: they do not provide views of data on individual beans.

I suspect that I am missing some simple configuration: that is usually where I err. Is there some way to "turn on" statistics collecting/reporting for beans? My app is running fine, the beans are working well and I can see them with jmx-console.

Any further ideas would be welcome!

Josh
14 years ago
Hi, all. I would like to monitor ejb3 bean statistics from my ear app using JBoss AS 5.1. It doesn't look like embedded jopr supports that functionality yet. I never used 4.2, so I don't know this for sure, but it looks like this functionality used to exist in the web console, so I have been trying to use web console to get the data. However, when I try to drill down in the web console j2ee domain (left side of screen), the ejb module is a leaf. The xml on the right side of the screen says: "Provides Statistics: false." Is there any way to make an EJB module in 5.1 provide statitistics to web console? Do I need to add an interceptor somewhere?

Thanks for any insight on this matter.

Josh
14 years ago
I am using 5.0.1 and I develop with eclipse.
15 years ago
I would appreciate advice regarding deploying my remote client app. The client communicates with the JBoss supported server app using both rmi-accessed ejbs and jbm. I know that I need a lot of the JBoss client jars to support my client app, but it seems a bit much to include all 104 of them in my deployment. I am using WebStart to launch my full-security client, so the setup is lengthy (signing 104 jars from command prompt and listing them all in the jnlp file). Also, I'd like to trim down the download size. However, I can't find any way to simply determine the required JBoss jars. Compile-time dependencies are easy, but I'm having trouble determining runtime dependencies. The 'best' approach so far is to put all the jars in a test classpath, then remove them one by one to see which absences cause the program to crash.

Is there a better way?

Thanks,

josh
15 years ago
You're right. 4457 is blocked by the host provider's firewall. There are other free other ports that I can use, but it is not clear to me how to reconfigure jbm to accept client connections through a different port. I experimented with the three port properties in /server/default/deploy/jboss-messaging.sar/remoting-bisocket-service.xml, but still did not get through.

Line #4 of the posted code (above) is the line that throws the error. jmsConnection is a javax.jms.Connection.

Do you have any advice for reconfiguring JBoss to use particular ports? I'm puzzled as to why jndi is even working in the first place: 1099 is one of host provider's blocked ports.

Thanks for your insights. And thanks for writing a user-friendly compendium on JBoss. I had no idea that a JBoss book covering 5.0 AND written for humans existed until you responded earlier and I saw the link on your tag. Good news for us EE newbies!

Josh
15 years ago
I looked at the wrapper my host provider uses to launch JBoss and it includes the -b 0.0.0.0 setting. Any other ideas about what may be amiss?

Thanks,

Josh
15 years ago
Thanks for your reply.

I use 5.0.1.

I am not sure if the faq you provided helps. I use a Virtual Private Server and start JBoss through their control panel web interface. However, I do know that jndi is working properly because my remote client successfully uses plain rmi to access and use several server-side ejbs. The error in my earlier post occurs when I try to create a Connection for jms.



I will pursue starting through ssh with my hosting provider so that I can experiment with the -b option, but if the above yields any further clues, please let me know.

Thanks,

Josh
15 years ago
Hi. I have a remote client that is supposed to use jms to communicate with my jboss server launched app. When I run jboss through eclipse on my local development machine and run the client on the same machine, the code works. However, when I attempt to deploy the server app to my remote hosting service and then run the client again on my local machine, I get the following error:

Exception in thread "Thread-3" java.lang.RuntimeException: Failed to download and/or install client side AOP stack
at org.jboss.jms.client.JBossConnectionFactory.createConnectionInternal(JBossConnectionFactory.java:199)
at org.jboss.jms.client.JBossConnectionFactory.createConnection(JBossConnectionFactory.java:87)
at org.jboss.jms.client.JBossConnectionFactory.createConnection(JBossConnectionFactory.java:82)
at com.xxxxx.teacher.DataDistributor.jmsSetup(DataDistributor.java:272)
at com.xxxxx.teacher.Controller.buildSingleton(Controller.java:384)
at com.xxxxx.login.Controller$1.run(Controller.java:85)
Caused by: org.jboss.jms.exception.MessagingNetworkFailureException
at org.jboss.jms.client.delegate.DelegateSupport.handleThrowable(DelegateSupport.java:240)
at org.jboss.jms.client.delegate.DelegateSupport.doInvoke(DelegateSupport.java:205)
at org.jboss.jms.client.delegate.DelegateSupport.doInvoke(DelegateSupport.java:160)
at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.org$jboss$jms$client$delegate$ClientConnectionFactoryDelegate$getClientAOPStack$aop(ClientConnectionFactoryDelegate.java:237)
at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.getClientAOPStack(ClientConnectionFactoryDelegate.java)
at org.jboss.jms.client.ClientAOPStackLoader.load(ClientAOPStackLoader.java:75)
at org.jboss.jms.client.JBossConnectionFactory.createConnectionInternal(JBossConnectionFactory.java:192)
... 5 more
Caused by: org.jboss.remoting.CannotConnectException: Can not get connection to server. Problem establishing socket connection for InvokerLocator [bisocket://xxxxx.com:4457/?JBM_clientMaxPoolSize=200&clientLeasePeriod=10000&clientSocketClass=org.jboss.jms.client.remoting.ClientSocketWrapper&connectionWait=10&dataType=jms&marshaller=org.jboss.jms.wireformat.JMSWireFormat&numberOfCallRetries=1&pingFrequency=214748364&pingWindowFactor=10&socket.check_connection=false&stopLeaseOnFailure=true&timeout=0&unmarshaller=org.jboss.jms.wireformat.JMSWireFormat&validatorPingPeriod=10000&validatorPingTimeout=5000]
at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:771)
at org.jboss.remoting.transport.bisocket.BisocketClientInvoker.transport(BisocketClientInvoker.java:423)
at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:160)
at org.jboss.remoting.Client.invoke(Client.java:1708)
at org.jboss.remoting.Client.invoke(Client.java:612)
at org.jboss.remoting.Client.invoke(Client.java:600)
at org.jboss.jms.client.delegate.DelegateSupport.doInvoke(DelegateSupport.java:189)
... 10 more
Caused by: java.net.ConnectException: Connection timed out: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at org.jboss.remoting.util.SecurityUtility.connect(SecurityUtility.java:1037)
at org.jboss.remoting.transport.socket.SocketClientInvoker.createSocket(SocketClientInvoker.java:203)
at org.jboss.remoting.transport.bisocket.BisocketClientInvoker.createSocket(BisocketClientInvoker.java:430)
at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.getConnection(MicroSocketClientInvoker.java:1084)
at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:757)
... 16 more

I would greatly appreciate any insights.

Josh
15 years ago
Hello. How do I tell eclipse to display the entire stack trace of exceptions? Sometimes I can only see most of the trace, and then a message similar to "... 12 more" I would like to see those lines!

Thanks!

Josh
Hi. I am an EJB/JBoss newbie trying to develop a server app with multiple clients. The client app (launched with WebStart) uses both jms and rmi to communicate with the server app. All of my ejbs are stateless. I only want to allow a client to be logged in, er, 'once at a time.' In other words, if a client is logged on one machine, that client should not be able to log in elsewhere. So when a client logs in, I set a boolean in the db and the client cannot log in elsewhere until that boolean changes.

My question is: what is the best way to detect client connection failure? For example, the client's power fails, or the client's internet connection dies? Is there a built-in way to listen for such disconnects in JBoss, or do I need to set up my own periodic ping from the server app to ensure client's are still 'alive?'

Thanks,

Josh
15 years ago
I am looking for a way to detect when none of my app's windows are active. I need to count how many times my user 'leaves' my app. For example, I would like to detect when a user on a pc uses alt-tab to switch to different app. I played with adding a PropertyChangeListener to the KeyboardFocusManager and then checking for a null activeWindow property. Unfortunately, this gave me false positives, because the activeWindow is temporarily set to null even when switching between windows in my app. Any ideas?

Thanks.
15 years ago