You really shouldn't use the jndi.properties from conf/default in the
client - this normally has the URL commented out and this won't work
from the client. DO NOT uncomment the URL on the server (in a conf
directory) because it will cause all calls to go through RMI, with a
large performance hit.
Use that jndi.properties as a starter for a client jndi.properties: copy
the file to the 'client' directory, uncomment the url and change the url
to use your real machine name or IP (so that it will work from a
different machine.
-danch
[EMAIL PROTECTED] wrote:
>
> Chris,
>
> Just to be on the safe side, include all the jars from
> JBOSS_HOME/client, and also include the JBOSS_HOME/conf/default
> directory. The settings that your app is looking for are contained in
> the jndi.properties file located in the conf directory. It references
> classes contained in the jars from the client directory.
>
> -Jason
>
>
>
>
> *Chris Jones <[EMAIL PROTECTED]>*
> Sent by: [EMAIL PROTECTED]
>
> 06/28/2001 01:41 PM
> Please respond to jboss-user
>
>
> To: [EMAIL PROTECTED]
> cc:
> Subject: [JBoss-user] JMS test program,
>
>
>
>
> Dear Folks:
>
> I'm a rookie user of Jboss and JMS. I'm trying the attached simple code
> fragment.
>
> When I try to execute the line:
>
> topicConnectionFactory = (TopicConnectionFactory)
> jndiContext.lookup("TopicConnectionFactory");
>
> I get the following exception:
>
> JNDI lookup failed: 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
>
>
> Any help would be appreciated.
>
> Thanks,
> Chris Jones
>
> */
> try {
> jndiContext = new InitialContext();
> } catch (NamingException e) {
> System.out.println("Could not create JNDI " +
> "context: " + e.toString());
> System.exit(1);
> }
>
> /*
> * Look up connection factory and topic. If either does
> * not exist, exit.
> */
> try {
> topicConnectionFactory = (TopicConnectionFactory)
> jndiContext.lookup("TopicConnectionFactory");
> topic = (Topic) jndiContext.lookup(topicName);
> } catch (NamingException e) {
> System.out.println("JNDI lookup failed: " +
> e.toString());
> System.exit(1);
> }
> Chris Jones
> Chief Architect
> Supply Chain Business
> Aspen Technology
> 19204 North Creek Parkway
> Bothell, WA 98011
> 425-492-2239
> 425-492-2100 (fax)
> [EMAIL PROTECTED]
>
>
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
>
>
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user