Problems with a stateless session bean and a durable subscriber.
I have a durable topic subscriber (asynchronous) that invokes a stateless
session bean. The listener is loaded dynamically by a servlet. Everything
works fine till the point when the bean is invoked. At that point iPlanet
app server (kjs.exe) crashes.
I couldnt find anything on this in the iPlanet forums. I was wondering if
someone could suggest what the problem could be.
I am running iPlanet app server 6.0 with SP2 with JMQ 1.1 (development
version) on Windows NT
I found the solution to this issue and I want to share it with all of you.
Scenario:
A start up servlet loads 3 asynchronous topic listeners. Each of these topic
listeners invoke stateless session EJB methods in their onMessage() methods.
Problem:
The EJB method call invariably crashed the iPlanet app server.
Solution:
The problem occurred because the default initial context factory
(com.netscape.jndi.RootContextFactory) was being used. I enabled RMI-IIOP on
iPlanet app server and treated the message listeners as rich clients and not
server-side entities. Now everything works great.
Question: Why are message listeners behaving like rich clients? Is it
because the onMessage() method is invoked in the context of JMQ and not in
the app server context?
As I understand it, JMS has 2 parts - the server, and the client libraries.
Doesnt the JMQ client on iPlanet run in the app server context?