ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » file based JNDI store on linux server from window client

Post new topic  Reply to topic
 file based JNDI store on linux server from window client « View previous topic :: View next topic » 
Author Message
veech23
PostPosted: Thu Nov 15, 2007 6:23 pm    Post subject: file based JNDI store on linux server from window client Reply with quote

Novice

Joined: 25 Apr 2007
Posts: 23
Location: canberra

server : Linux
MQ : WMQ 6.0.2.0
Jndi : com.sun.jndi.fscontext.RefFSContextFactory

Hi All, i am able to configure my server to use file based JNDI and i am able to create JMS administered objects from command line on redhat linux.

I am trying to connect from Windows java client using the following code,

env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.fscontext.RefFSContextFactory"; );
env.put(Context.PROVIDER_URL, "file:///<linux hostname>/var/jndi";

Context ctx = new InitialDirContext(env);


i got Error : javax.naming.NameNotFoundException; remaining name 'C:\<linux hostname>\var\jndi'

Is there any thing i am missing here? any pointers are greatly appreciated.

veeru
Back to top
View user's profile Send private message
bower5932
PostPosted: Thu Nov 15, 2007 8:31 pm    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

Can you actually get at the Linux file from your Windows machine?
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
jefflowrey
PostPosted: Fri Nov 16, 2007 2:32 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

The file URL doesn't work like that.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Nov 16, 2007 4:59 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

as URL you might want to try: "ftp://<linux hostname>/var/jndi/.bindings"
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
veech23
PostPosted: Sun Nov 18, 2007 6:57 pm    Post subject: Reply with quote

Novice

Joined: 25 Apr 2007
Posts: 23
Location: canberra

Thanks jeff. The other way i could think of is using WMQ as my JNDI provider but its a pity file based JNDI does not work like the way i wanted.

fjb_saper, i tried ftp/http by exposing the directory in apache, comes back with unknown protocol.

veeru
Back to top
View user's profile Send private message
sysmq012
PostPosted: Sun Nov 18, 2007 11:13 pm    Post subject: It should work Reply with quote

Newbie

Joined: 11 Feb 2007
Posts: 9

Do you have samba configured so that file:///<linux hostname>/var/jndi is accessible from your windows box? try to access it from the windows explorer.
another issue to check is whether the user that runs the application has permissions to the linux file system.

Ophir
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Nov 19, 2007 4:14 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Guys,

This is getting way too complicated...
Just ftp the .bindings file over to your windows box (binary mode) and give the file url to the location (directory) of the file in windows... And remember once you start your app the .bindings file is supposed to be STATIC i.e. it won't change...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Mon Nov 19, 2007 4:36 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

I very much doubt that the MQ JMS provider (well, the sun file system context implementation) has any protocol support other than "the local file system" built in - so I doubt that it will be able to read a samba link in the way sysmq012 has suggested. I h'aint tried it though.

If veech23 really wants one file to be used a bindings by every client - then veech23 needs to mount the file system holding that file on every client.

Or use a different JNDI provider than the file system context...
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » file based JNDI store on linux server from window client
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.