Author |
Message
|
sfari |
Posted: Thu Nov 30, 2006 8:31 am Post subject: API for setting authorizations? |
|
|
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 |
|
 |
wschutz |
Posted: Thu Nov 30, 2006 9:09 am Post subject: |
|
|
 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 |
|
 |
jefflowrey |
Posted: Thu Nov 30, 2006 9:37 am Post subject: |
|
|
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 |
|
 |
sfari |
Posted: Thu Nov 30, 2006 10:44 pm Post subject: |
|
|
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 |
|
 |
RogerLacroix |
Posted: Sat Dec 02, 2006 9:23 am Post subject: |
|
|
 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 |
|
 |
sfari |
Posted: Mon Dec 04, 2006 7:29 am Post subject: |
|
|
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 |
|
 |
jefflowrey |
Posted: Mon Dec 04, 2006 7:33 am Post subject: |
|
|
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 |
|
 |
sfari |
Posted: Tue Dec 05, 2006 7:08 am Post subject: |
|
|
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 |
|
 |
fjb_saper |
Posted: Tue Dec 05, 2006 7:43 pm Post subject: |
|
|
 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 |
|
 |
sfari |
Posted: Wed Dec 06, 2006 12:00 am Post subject: |
|
|
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 |
|
 |
|