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 » JMSAdmin Bind problems with slash and backslash (WinXUnix)

Post new topic  Reply to topic
 JMSAdmin Bind problems with slash and backslash (WinXUnix) « View previous topic :: View next topic » 
Author Message
carlos.lacerda
PostPosted: Tue Nov 28, 2006 10:05 am    Post subject: JMSAdmin Bind problems with slash and backslash (WinXUnix) Reply with quote

Newbie

Joined: 28 Nov 2006
Posts: 3

Hi all, a have a application runing in Windows using OC4J Container with Generica JMSRA and MQ Series, this is fine application runing perfect.

My problem is when create .bindings file using JMSAdmin utility to create binds to my queues in Windows i use the slash eg.
Code:
def q(jms/myqueue)...

in Unix (RedHat AS 3.0) JMSAdmin not accept slash only backslash eg.
Code:
def q(jms\myqueue)
...

This is possible use only slash or backslash for both ????

My application create queues in MQ and binds using JMSAdmin this slash´s is a problem for me...


Tanks
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Nov 28, 2006 11:25 am    Post subject: Reply with quote

Grand High Poobah

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

When you create a context in a .bindings file you should not use multiple level contexts as you cannot interrogate them in a multilevel mode.
Read up the documentation an google a little bit about the sun context factory. It is a known limitation.

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
carlos.lacerda
PostPosted: Tue Nov 28, 2006 11:50 am    Post subject: Reply with quote

Newbie

Joined: 28 Nov 2006
Posts: 3

Tanks for reply, i will search for sun context factory.

But the same is fine
Code:
Windows eg. (jms/xxx/myqueue)
and

in Unix
Quote:
(jms\xxx\myqueue)
why ??

In docs of WMQ see:

Code:
   1. If you are using the WebSphere JNDI provider, com.ibm.websphere.naming.WsnInitialContextFactory, you must use a forward slash (/) to access administered objects defined in sub-contexts; for example, jms/MyQueueName. If you use a backslash (\), an InvalidNameException is thrown.
   2. If you are using the Sun JNDI provider, com.sun.jndi.fscontext.RefFSContextFactory, you must use a backslash (\) to access administered objects defined in sub-contexts; for example, ctx1\\fred. If you use a forward slash (/), a NameNotFoundException is thrown.


The subcontext is possible but my problem is to use the same slash in Windows and Unix. :=(

how to this ???
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Nov 28, 2006 12:04 pm    Post subject: Reply with quote

Grand High Poobah

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

Well my experience has been that you could define sub contexts and create the objects. However when you want to retrieve them you have to do a little contact admin like:
Context jms = (Context)ctx.lookup("jms");
Then you can look up the rest of your objects omitting the prepended jms and using the jms Context object instead of the context returned by the initial context factory (ctx).

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Tue Nov 28, 2006 12:29 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

The rest of your problem may entirely have to do with how the different command shells are handling / or \.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
carlos.lacerda
PostPosted: Wed Nov 29, 2006 3:44 am    Post subject: Reply with quote

Newbie

Joined: 28 Nov 2006
Posts: 3

The lookup is OK in both Windows and Unix.

My problem is how to use a slash or backslash to create a .bindings to both from JMSAdmin.

In Unix JMSAdmin only permits backslash "\" and in Windows slash "/"

I try all forms in Unix \/ // /" and cannot run.

This is possible use a single slash for both OS in JMSAdmin ????

This problem has a serious impact to my application, i configure a DestinationName of the Queues to my MDBs in ejb-jar.xml and with this problem it´s necessary create a two ejb-jar.xml one for Windows and other for Unix this is bad.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Nov 29, 2006 10:14 am    Post subject: Reply with quote

Grand High Poobah

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

What you should probably create is a resource reference to your destinations. This way your MDB would be configured the same. The resource reference would take care of any indirections...

Enjoy

PS as in unix the \ is usually an escape char a \ is usually represented as \\ in any string/input.
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » JMSAdmin Bind problems with slash and backslash (WinXUnix)
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.