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 Installation/Configuration Support » API for setting authorizations?

Post new topic  Reply to topic
 API for setting authorizations? « View previous topic :: View next topic » 
Author Message
sfari
PostPosted: Thu Nov 30, 2006 8:31 am    Post subject: API for setting authorizations? Reply with quote

Centurion

Joined: 15 Apr 2003
Posts: 144

Hello, we are currently developing MQ managing agents which are able to setup a MQ environment for our applications. Means it does set up MQ objects like queues, channels, JNDI objects like queue connection factory, queues and MQ authorizations.

The agents will be running in J2EE containers. Thus I am going set up the MQ Objects using MQSC or PCF commands.

Is there any API available to define authorizations on queues (setmqaut)?
Is there any API available to define JNDI objects? I assume that the classes in com.ibm.mq.jms.admin are not thought to be used directly from Java code.

Or do I need to call system commands instead?

Any sugestions?
Back to top
View user's profile Send private message
wschutz
PostPosted: Thu Nov 30, 2006 9:09 am    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

MQ V6 allows you to manage authorizations via PCF commmands . Its documented in the PCF and Admin manual....

and MS0B has been updated for V6, so life is good ....
_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
jefflowrey
PostPosted: Thu Nov 30, 2006 9:37 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

How you can define JNDI resources depends entirely on the JNDI repository, and the J2EE container itself.

For example, if you're using WAS, you need to use something like wsadmin or the MBeans or etc. to do this.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
sfari
PostPosted: Thu Nov 30, 2006 10:44 pm    Post subject: Reply with quote

Centurion

Joined: 15 Apr 2003
Posts: 144

Thanks, for the answers. Sounds good the thing with the pcf commands for authorizations, I will just try it out!

For definitions of JNDI resources we are currently using MQ JMSAdmin. We are using JBoss as application server together with the WebSphre MQ JMS Provider. As I think there is no possibility to define such objects (in LDAP) using an API right?
Back to top
View user's profile Send private message
RogerLacroix
PostPosted: Sat Dec 02, 2006 9:23 am    Post subject: Reply with quote

Jedi Knight

Joined: 15 May 2001
Posts: 3264
Location: London, ON Canada

sfari wrote:
For definitions of JNDI resources we are currently using MQ JMSAdmin. We are using JBoss as application server together with the WebSphre MQ JMS Provider. As I think there is no possibility to define such objects (in LDAP) using an API right?

Sure there is, just change the following line from:
Code:
PROVIDER_URL=file:/C:/JNDI-Directory/roger/mqjndi

to
i.e.
Code:
PROVIDER_URL=ldap://polaris/o=ibm,c=us
SECURITY_AUTHENTICATION=none  [or simple or CRAM_MD5]
PROVIDER_USERDN=cn=Manager,o=ibm,c=uk
PROVIDER_PASSWORD=secret


Regards,
Roger Lacroix
Capitalware Inc.
_________________
Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter
Back to top
View user's profile Send private message Visit poster's website
sfari
PostPosted: Mon Dec 04, 2006 7:29 am    Post subject: Reply with quote

Centurion

Joined: 15 Apr 2003
Posts: 144

Thanks Roger,

What I meant is to program against a Java API (similar to PCF for example) for defining the resources in JNDI instead of using JMSAdmin.

I know that it is possible to store the resources in LDAP using the JMSAdmin command line tool, that's how we are doing it now.

What I am looking for is an API for exactly doing this!

Thanks,
Silvano
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Dec 04, 2006 7:33 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

It depends entirely on the context.

If you are using an LDAP based context, you can use LDAP APIs, assuming you are confident you can create the proper LDAP entries directly.

If you are using a file context, you can use normal File APIS to write new entries into the file - assuming you are confident you can create the data properly.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
sfari
PostPosted: Tue Dec 05, 2006 7:08 am    Post subject: Reply with quote

Centurion

Joined: 15 Apr 2003
Posts: 144

Thanks, I was already thinking about doing this. But I think I will rather call the JMSAdmin command line tool, even if it's not the most beatiful thing it remains more flexible.

So my configuration program will be ready for new attributes in JNDI. Otherwise I would need to maintain my own JMS admin for our LDAP

Who knows the IBM will may sometimes provide a Java api for administration of JNDI resources.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Dec 05, 2006 7:43 pm    Post subject: Reply with quote

Grand High Poobah

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

sfari wrote:
Who knows the IBM will may sometimes provide a Java api for administration of JNDI resources.


Why would you need IBM to provide a Java api for administration of JNDI resources?? I may sound a little bit dumb here but has it escaped your notice that JMSAdmin is a java program??? Has it furthermore escaped your notice that there are apis in java for manipulating a javax.naming.Context ???...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
sfari
PostPosted: Wed Dec 06, 2006 12:00 am    Post subject: Reply with quote

Centurion

Joined: 15 Apr 2003
Posts: 144

Sorry, it was not my intension to offend anybody! English is not my mother tongue so it is not always easy to find the right words.

I know the structure of com.ibm.mq.jms resources in JNDI quite well but I don't want to store them using my own Java classes (additional development, maintanance).

What I was looking for is an API which can be used to manipulate the Objects in a more confortable way than to compile the whole command and let them execute by JMSAdmin (for example doing things like myqcf.setUCP(true)).

But as I said I will use the JMSAdmin class for doing it. I am completely ok also with that
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 Installation/Configuration Support » API for setting authorizations?
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.