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 » WebSphere Message Broker (ACE) Support » IIB9: CMP API getDeploymentDescriptor

Post new topic  Reply to topic
 IIB9: CMP API getDeploymentDescriptor « View previous topic :: View next topic » 
Author Message
akil
PostPosted: Sat Apr 09, 2016 10:51 pm    Post subject: IIB9: CMP API getDeploymentDescriptor Reply with quote

Partisan

Joined: 27 May 2014
Posts: 338
Location: Mumbai

Apparently, the BAR file created by the toolkit by default, places the deployment-descriptor (broker.xml), in a sub-folder of the application that is contained in it, rather than at the top level. This is confirmed by mqsireadbar as well.

mqsireadbar -b App.bar -- returns nothing
mqsireadbar -b App.bar -r ---> returns the deployment descriptor

The CMP API however, does not seem to have any -r equivalent; The documentation states that to obtain the deployment descriptor one needs to query the BarFile object.
https://www.ibm.com/support/knowledgecenter/SSMKHH_9.0.0/com.ibm.etools.mft.cmp.doc/index.html?lang=en

However, this returns a null - this is consistent with the mqsireadbar (without -r),

What's the equivalent of mqsireadbar -r in the CMP ?
_________________
Regards
Back to top
View user's profile Send private message Visit poster's website
stoney
PostPosted: Sun Apr 10, 2016 10:23 am    Post subject: Reply with quote

Centurion

Joined: 03 Apr 2013
Posts: 140

The BarFile object for the top level App.bar is not the one you want.
You need to get the BarFile object for App.appzip instead.
That BarFile object will have the deployment descriptor that you are after.
Here's some code that will do the trick:

Code:

    BarFile barFile = BarFile.loadBarFile("App.bar");
    BarEntry appBarEntry = barFile.getBarEntryByName("App.appzip");
    BarFile appBarFile = BarFile.loadBarFile(appBarEntry.getBytes(), appBarEntry.getFullName());
    DeploymentDescriptor desc = appBarFile.getDeploymentDescriptor();
    Enumeration<String> props = desc.getPropertyIdentifiers();
    while (props.hasMoreElements()) {
      String prop = props.nextElement();
      System.out.println("Found property: " + prop);
    }


All mqsireadbar -r does is iterate over the BarEntry objects in the top level BarFile using getBarEntryNames() & getBarEntryByName().
If it finds an application or library, then it loads it into a new BarFile object as above.
Back to top
View user's profile Send private message
akil
PostPosted: Sun Apr 10, 2016 11:59 am    Post subject: Reply with quote

Partisan

Joined: 27 May 2014
Posts: 338
Location: Mumbai

Thank you!. Thank you! Thank you!.

How do you know this ? Is it mentioned anywhere in any documentation? Thank you !.
_________________
Regards
Back to top
View user's profile Send private message Visit poster's website
stoney
PostPosted: Sun Apr 10, 2016 11:21 pm    Post subject: Reply with quote

Centurion

Joined: 03 Apr 2013
Posts: 140

I have access to the source code, so that helps
I can't see that process mentioned in the Javadoc for the Integration API anywhere - I'll look at getting it updated.
Back to top
View user's profile Send private message
akil
PostPosted: Mon Apr 11, 2016 7:24 am    Post subject: Reply with quote

Partisan

Joined: 27 May 2014
Posts: 338
Location: Mumbai

Oh alright . I didn't know you were from labs. Thank you once again
_________________
Regards
Back to top
View user's profile Send private message Visit poster's website
akil
PostPosted: Sun May 08, 2016 8:53 am    Post subject: Reply with quote

Partisan

Joined: 27 May 2014
Posts: 338
Location: Mumbai

I was attempting to use this technique to call setOverride on the deploymentDescriptor.

As per the document i've to call save to make the changes persistent.

Calling save on the top-level barFile has no effect.
Calling save on the bar created from the byte[] throws an exception when save is called ( seems that it expects it to be a file).

Any suggestions on what to do?
_________________
Regards
Back to top
View user's profile Send private message Visit poster's website
fjb_saper
PostPosted: Mon May 09, 2016 2:28 pm    Post subject: Reply with quote

Grand High Poobah

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

akil wrote:
I was attempting to use this technique to call setOverride on the deploymentDescriptor.

As per the document i've to call save to make the changes persistent.

Calling save on the top-level barFile has no effect.
Calling save on the bar created from the byte[] throws an exception when save is called ( seems that it expects it to be a file).

Any suggestions on what to do?

Saving in this case is often streaming from the source bar file to a destination bar file...
_________________
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 » WebSphere Message Broker (ACE) Support » IIB9: CMP API getDeploymentDescriptor
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.