Error under IMQ Server

F

Flex

Why , When I run this code :

public class SendMessage {

static String jndi_url ="file:///tmp";
static String Topic_loockup_name = "TopicMsg" ;

Hashtable env ;

public void init () {

env = new Hashtable() ;

env.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.fscontext.RefFSContextFactory");
env.put(Context.PROVIDER_URL, jndi_url) ;
}

public void SendMessage(int tipo, double Id,double x,double y,double sRay) {

//String topicName ;
TopicConnectionFactory topicConnectionFactory = null ;
TopicConnection topicConnection = null ;
TopicSession topicSession = null ;
TopicPublisher topicPublisher = null ;
Topic topic = null ;
Context jndiCtx = null ;
DataMessage dataMessage ;

/* Creates a new instance of datamsg */

try {
// Create the initial context and lookup
jndiCtx = new InitialContext(env);
topicConnectionFactory =
(TopicConnectionFactory)jndiCtx.lookup("TopicConnectionFactory") ;

I view this error message ?

The exception details:
javax.naming.NoInitialContextException: Need to specify class name in
environment or system property, or as an applet parameter, or in an
application resource file: java.naming.factory.initial

Had I to set some other ?

P.S. I use Sun IMQ server
 
F

Flex

Il Wed, 12 Jan 2005 09:24:57 +0000, Flex ha scritto:
Had I to set some other ?

P.S. I use Sun IMQ server

These are my server settings :

flex@aci:/opt/imq/bin$ cat jndiTopicMsg.props
cmdtype=add
obj.type=t
obj.lookupName=cn=MyTopic
obj.attrs.imqDestinationName=TopicMsg
objstore.attrs.java.naming.factory.initial=com.sun.jndi.fscontext.RefFSContextFactory
objstore.attrs.java.naming.provider.url=file:///tmp

but when I try to list this properties I receive this error :

Error [A3050]: imqobjmgr does not recognize the value of
java.naming.factory.initial property.

Object list failed


Why ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,710
Latest member
bernietqt

Latest Threads

Top