• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Using JMS without -Djms to set properties

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ack! I'm a database guy, so someone help me with this and I'll any database related question(s).
I (re)wrote a jms client using j2sdkee1.3. I start the server using j2ee -verbose.
I am using the /config/jms_client.properties to connect to the ORB and all of that is working fine. The problem is that I have to invoke it using the command line as
java -Djms.properties=<blah,blah>/jms_client.properties DChat -u Dean.
What I really need to do is invoke with
java DChat -u Dean
I have inserted this code snippet:
Properties properties = new Properties();
try {
DataInputStream props = new DataInputStream
(new FileInputStream("DChat.properties")); // I
//copied the file jms_client.properties
properties.load(props);
}
catch (Exception e){}
And it compiles. ( Remember the days when if something compiled, it worked? Me neither.)
This is what I get:
C:\java>java DChat2 -u Dean
SEVERE JMSInitialContext: Unable to get internal JNDI context because: javax.naming.CommunicationException: Cannot connect to ORB [Root exception is org.omg.COR
BA.COMM_FAILURE: minor code: 1398079490 completed: No]
I know this is telling me that "properties.load(props);" is not enough to get it working, but I'm having trouble finding any help on this.
Any clues or "hey, stupid"s would be appreciated.
-Dean

 
reply
    Bookmark Topic Watch Topic
  • New Topic