users@glassfish.java.net

Re: Accessing a JMS Resource on a Remote Server

From: rdblaha1 <rd_blaha_at_hotmail.com>
Date: Wed, 16 Jan 2008 13:05:09 -0800 (PST)

glassfish wrote:
>
> I attached a program... There's a bat file in the dist folder, set GF_HOME
> to your glassfish install directory in it, set CF_NAME to the name of the
> connection factory, set DEST_NAME to the name of the destination (jndi
> names). Plus there's a jndi.properties file, set it's settings according
> to your environment (same as using System.setProperty, just more
> flexible).
>
> All this program needs are the following:
> - libraries from glassfish
> - a running instance of the server you're trying to send messages to with
> a connectionfactory and a destination.
> - java + the usual stuff
>

Congratulations!!!! In the race between the stand-alone and the Appclient
methods yours was the first with which I had success!!! Thank you.

The areas of obvious problems were:
1. You were using the older method (I believe of vintage JAVA JDK 1.4
tutorial) of establishing the InitialContext within the code and passing in
bindings, i.e. CF_NAME and DEST_NAME, via command line arguments. I was
stubbornly hanging onto the newer @Resource/_at_Resouces methodology (JAVA 1.5
Tutorial) and mixing the two. (I have cluged from JDK 1.3 Tutorial to the
1.4 Tutorial to the 1.5 Tutorial, and am not surprised that I am still
messed up in thinking how to do my programs correctly.)
2. I was missing the fact that the org.omg.CORBAInitialHost and
...CORBAInitialPort were to be in the jndi.properties file rather than the
code itself (but as you noted it could have been used in the code with
System.setProperty).
3. Early on you pointed to the unknown to me, then misunderstood, and
finally misapplied concepts of stand-alone and AppClient running without the
full blown AppServer.

I will continue to pursue better understanding of what you have helped me
finally get running (and definitely a hoorah and thank you from this side of
the pond). As I have stated before that I will also still try to learn
from Tim the AppClient way to do the non-AppServer method (Container method
that is).

Thank you.
rdb

-- 
View this message in context: http://www.nabble.com/Accessing-a-JMS-Resource-on-a-Remote-Server-tp14580977p14894425.html
Sent from the java.net - glassfish users mailing list archive at Nabble.com.