[JBoss Messaging] - Unable to deserialize objects inside onmessage() method: cla
by msrednsi
Hello
This is muy first ear app and i have a weird problem.
I have a EJB 3 packaged ear application (lib without explicic classpath on the manifest), with mdb, jpa, and a war module, i'm using jboss messaging 1.4.0.sp3.
On the war module I subscribe to listen on a topic in asyncronous mode so when the onmessage() method is called, it's running on the jboss selected receiver thread.
The problem is that a get a classnotfound expeption in the onmessage() method when deserializing an object that is on the classpath, i'm sure of that because i can do a classForName() using the thread's class loader on other part of de code that is executed in the main web thread, the one that configures and starts the topic connection.
The problem is that the receiving thread who executes the onmessage() method has another context classloader, it's domain is jboss-messaging.sar not my ear application.
It seems that the receiver thread is using its own class loader and that this class loader has nothing to do with my app. It doesn't sound logical to me. Any ideas?
Thanks in advance
Manuel Sánchez
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4149017#4149017
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4149017
17 years, 11 months
[Beginners Corner] - EJB3 and CORBA clients
by arv
Hello,
could somebody explain me, how to connect a ejb3 bean deployed in jboss-5.0.0.Beta4 from a CORBA client (Java and/or C++) ?
Here is the bean code:
Bean Interface:
|
| package arv;
|
| import java.rmi.RemoteException;
| import javax.ejb.EJBObject;
|
| public interface HelloInterface extends EJBObject
| {
| void helloWorld() throws RemoteException;
| }
|
|
Bean Implementation:
|
| import javax.ejb.Remote;
| import javax.ejb.Stateless;
|
| import org.jboss.ejb3.annotation.IIOP;
| import org.jboss.ejb3.annotation.RemoteBinding;
| import org.jboss.ejb3.annotation.defaults.RemoteBindingDefaults;
|
| import java.rmi.RemoteException;
|
| @Stateless
| @Remote(HelloInterface.class)
| @RemoteBinding(factory=RemoteBindingDefaults.PROXY_FACTORY_IMPLEMENTATION_IOR)
| @IIOP(interfaceRepositorySupported=false)
| public class HelloWorldBean {
|
| public HelloWorldBean() throws Exception {}
|
| public void helloWorld() throws RemoteException {
| System.out.println("Hello");
| }
|
| }
|
|
I compiled both classes and packaged them in a jar-file HelloWorld.jar.
I copied the jar file into jboss-5.0.0.Beta4/server/all/deploy and
got following jboss output:
|
| 13:44:02,426 INFO [MCKernelAbstraction] installing bean: jboss.j2ee:jar=HelloWorld.jar,name=HelloWo
| rldBean,service=EJB3 with dependencies:
| 13:44:02,457 INFO [MCKernelAbstraction] and demands:
| 13:44:02,457 INFO [MCKernelAbstraction] jboss.ejb:service=EJBTimerService
| 13:44:02,457 INFO [MCKernelAbstraction] and supplies:
| 13:44:06,263 INFO [EJBContainer] STARTED EJB: arv.HelloWorldBean ejbName: HelloWorldBean
|
|
JNDIView shows following entries:
|
| java:comp namespace of the component jboss.j2ee:jar=HelloWorld.jar,name=HelloWorldBean,service=EJB3
| :
|
| +- UserTransaction (class: org.jboss.ejb3.tx.UserTransactionImpl)
| +- ORB[link -> java:/JBossCorbaORB] (class: javax.naming.LinkRef)
| +- EJBContext (class: javax.ejb.EJBContext)
| +- env (class: org.jnp.interfaces.NamingContext)
| +- TransactionSynchronizationRegistry[link -> java:TransactionSynchronizationRegistry] (class: javax.naming.LinkRef)
|
|
Thank you very much !
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4149008#4149008
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4149008
17 years, 11 months
[Remoting] - MulticastDetector crashes my network
by yt.nash
Hello all!
At this moment, I am developing a solution using JBoss Remoting (2.2.1GA) and I have detected a ugly problem with MulticastDetector.
If you try to launch SimpleDetectorClient (included as JBoss Remoting sample of detection multicast), I have a problem. You can see it installing a nextwork monitor and... This execution sends to the network 32 UDP packets per second!!! After time, network gets down (no connection, no Internet).
However, if you execute SimpleDetectorServer (in the same branch), the packet rate is 1 per second (acceptable in a server-side environment).
I have tried to play with heartbeat time delay and default time delay and I don't have positive results. After change it, the frequency of packets is the same (client-side and server-side).
Can someone help me?
Thanks!
Santiago Ameller.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4149006#4149006
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4149006
17 years, 11 months
[JBoss Portal] - Re: Batch registration of new users, how to do it?
by PeterJ
There are two ways I can think of to accomplish this.
1) You could edit jboss-portal.sar/conf/hibernate/user/setup.txt. This file defines the initial set of users. With a decent editor with macro capabilities you could very easily expand this file to create any number of initial users. The only caveat is that this would work only on a clean portal (one that have never been run before).
2) You could user JMeter or Grinder to create the users. Use the proxy capability of either tool to record a session where you create one user, then edit the script to generalize the user id. And the run the script.
I have done both #1 and #2. #1 I used to create a handful of initial users. #2 I use to create a large quantity of users, usually naming them user-N, where N is 1 through 9999. Makes it easy to write performance tests to randomly select a user.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4149003#4149003
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4149003
17 years, 11 months