File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and other Java EE Technologies and the fly likes Client  and Server EJB Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Reply locked New topic
Author

Client and Server EJB

liliane fahmy
Greenhorn

Joined: Aug 24, 2012
Posts: 22
Hi all
I have client and server projects.
The server project is a Message -driven project which receive message from the Client .
The problem is :I want to a add EJB module(EJB session bean) in Client project as the server(message driven bean project) can call this session bean .
I tried it by using Netbean:when the client attempt to connect to MDB ,it throw null pointer and the code is as follows:
Connection connection = connectionFactory.createConnection();
Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
MessageProducer producer = session.createProducer(queue);
Message message = session.createTextMessage();
the exception is :Exception in thread "main" java.lang.NullPointerException
at terminalserver.Main.main(Main.java:33)

Although I try to create Entreprise application client project to send a message to my MDB ,it work correctly.
The summary of my problem ,I want my 2 EJB Project,the first has MDB and the other has Session bean and can call each other.
Any help to make my project work .
Thanks and best regards.
Ranganathan Kaliyur Mannar
Bartender

Joined: Oct 16, 2003
Posts: 1076
    
  10

Please do not create duplicate posts, it doesn't help anyone. Locking this thread. Please continue your discussion in the other post


Ranga.
SCJP 1.4, OCMJEA/SCEA 5.0.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Client and Server EJB