Gavin Wilkinson

Greenhorn
+ Follow
since Mar 06, 2001
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Gavin Wilkinson

This solution does work a treat with refrence j2ee version 1.2, and i had been using it for a while.
However, try with 1.3 and it doesnt work.
Hi, i recently delved into the world of jms and i have to say it seems to be pretty cool. I got the examples up and running in no time at all. I have a slight problem though.
I'm now trying to use jms in real world situation. I have a sender that is wrapped deep within an existing class and a receiver that i run at the command line. If i have the receiver running and then start to post messages, it all works fine, i get the messages in the order they are being sent, however if i dont have the receiver running, send a few messages and then start the receiver, the order is all jumbled up. I was wondering if anyone had come accross this problem ?
I need to be able to gaurantee the order of receiving messages is the same as sending messages.
Cheers in advance Gavin .
------------------

[This message has been edited by Gavin Wilkinson (edited April 11, 2001).]
Cheers for the response. I managed to fix the problem.
Im now running jdk1.3.0_02 and j2ee1.3.Im running on Win2k,
The problem was that i was runnig jdk1.2.2 which isnt compatible with j2ee1.3.
I have the jms stuff working great. havent tried any ejb stuff as yet, so cant comment about the cloudscape, it runs though.
Hi, i just dloaded and installed this because i need the jms functionality it provides, howvere when i try to srt it using j2ee -verbose i get the following error
Exception in thread "main" java.lang.NoClassDefFoundError:
javax/naming/Context
at com.sun.enterprise.server.J2EEServer.<clinit>(J2EEServer.java:58)
does anyone have any ideas as to what could be going wrong. Ive cheked all my classpaths and paths and it all seems perfect.
Hi, i have an RMI server that works like a treat.
In the main method of the server im registring my object with the server. I then use a JNDI lookup to retrieve an object and can then run the remote methods on it.
However if i write a seperate client app i can access the JNDI and get the object, but as soon as i try to use it i get a socket error, code (10061).
Im using a grant all security policy file on the client and server.
has anybody got any ideas or suggestions ?
23 years ago
Just in case anybody cares.
the following code works
String objectName="cheese";
System.out.println(System.setProperty("org.omg.CORBA.ORBInitialHost","HostName"));
InitialContext jndiCntx = new InitialContext();
tempObject= jndiCntx.lookup(objectName);
It was the spelling mistake of Initial -> Initail that caused it to not work.
Thanks for all the help.
This doesn' work either.
String objectName="cheese";
System.out.println(System.setProperty("org.omg.CORBA.ORBInitailHost","HostName"));
InitialContext jndiCntx = new InitialContext();
tempObject= jndiCntx.lookup(objectName);
All of the beans and things i have been trying to access have been developed by someone else and there are lots of them deployed and being used on the app server im trying to access.
Im afraid i cant post my complete code. I have a few other bods on the problem and will post the solution if anyone ever finds it.
Hi, cheers for all the help.
Ive changed lots of code but i am still having the same problem.
im importing javax.naming.*;
Ive changed the properties file i use to initialize my context about a million times. Nothing works.
However, if i specify the
"-Dorg.omg.CORBA.ORBInitialHost=HostPC" to the java command it all works fine. With this param i dont have to set any of the properties in the initialize of the context. All i relay need to be able to do is set whatever the above is from within my code, then every thing should be hunky dory.
Cheers ;-)

Hi,cheers for the reply
Im using the J2EE RI application server.
The code
Properties props=new Properties();
props.put("java.naming.provider.url","iiop://HostName:1050");
props.put(Context.INITIAL_CONTEXT_FACTORY,
"com.sun.enterprise.naming.SerialInitContextFactory");
// does this do anything ?
props.put( "org.omg.CORBA.ORBInitialHost","HostName");
InitialContext jndiCntx = new InitialContext(props);
jndiCntx.lookup(objectName);
works fine if i specify the
"-Dorg.omg.CORBA.ORBInitialHost=HostName" param on the command line.
I get the error below if i dont specify the param.
javax.naming.CommunicationException: Can't find SerialContextProvider
As my class is eventualy going to be part of a bigger project though, i cant use the command line params so i need to be able to set the above value in code.
Cheers. ;-)
Hi, im a newbie to the world of ejbs and i have a slight problem.
Context jndiCntx = new InitialContext();
jndiCntx.lookup(objectName);
I can access and use an ejb using the previous code, but to do so i have to use
"-Dorg.omg.CORBA.ORBInitialHost=HostName" on the command line.
Is there any way if setting this value from within the code ?
Any help, pointers to examples would be most appreciated.
You could just add "C:\j2sdkee1.2.1\nativelib" or simillar to your system classpath. This is what i did and it works fine.
Hi,
I had the same problem. I found the file it was whining about.
I resolved the problem by adding "C:\j2sdkee1.2.1\nativelib" to my system class path.