here is my problem:
I have a sample stateless session bean.
I want to use this session like a notifier module.
I want to create a topic, and all the other stuff.
But went I create an instance, the soft throws a naming exception.
Do I must put something in the xml files, and what ?
Thanks !
Gilles.
My peace of code is like this :
public class InternalFunctionSessionBean implements SessionBean
{
private SessionContext ctx;
private Topic topic = null ;
private TopicConnection tc = null ;
private TopicSession ts = null ;
private TopicPublisher tp = null ;
public void ejbCreate() throws CreateException
{
lookupJmsTopic () ;
}
..........................
private boolean lookupJmsTopic ()
{
try
{
InitialContext ctx = new
InitialContext () ;
TopicConnectionFactory tcf
= (TopicConnectionFactory) ctx.lookup("TopicConnectionFactory");
topic = (Topic) ctx.lookup("FunctionTopic");
// <== here is the bug !!!
tc = tcf.createTopicConnection
() ;
ts = tc.createTopicSession
( false, Session.AUTO_ACKNOWLEDGE ) ;
tp = ts.createPublisher ( topic
) ;
}
catch ( Exception nEx ) { nEx.printStackTrace ()
; return false ; }
return true ;
}
begin:vcard n:Fran�ois;Gilles tel;fax:+33 (0)5.61.19.65.30 tel;work:+33 (0)5.61.19.65.29 x-mozilla-html:TRUE url:http://www.thalesgroup.com org:Thales Avionics;CDV/EM version:2.1 email;internet:[EMAIL PROTECTED] title:Advanced Software Technology adr;quoted-printable:;;105 Avenue du general Eisenhower=0D=0ABP 1147;Toulouse cedex 1;;31036;FRANCE fn:Gilles FRANCOIS end:vcard
