Bookmark Topic Watch Topic
  • New Topic

Client and Server EJB  RSS feed

 
liliane fahmy
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Report post to moderator
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
Posts: 1103
10
Java Netbeans IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please do not create duplicate posts, it doesn't help anyone. Locking this thread. Please continue your discussion in the other post
 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!