Author |
Message
|
gappodi |
Posted: Wed Jun 01, 2016 11:19 pm Post subject: Deleting all resources from one integration server |
|
|
 Voyager
Joined: 05 Sep 2014 Posts: 76
|
How can I delete all the resources in an integration server by issuing a single mqsi command?
I understand that I can make use of the following command to delete a list of resources.
mqsideploy -n brokerName -e egroup
-d m1.msgflow:m2.subflow:m3.esql:m4.jar
The problem with this is that my bar file has some 150 deployable components. Hence, constructing such a command would increase the chances of having an error in the command itself.
Also, I understand that while deploying a bar I can make use of a -m option to signal deletion of all the resources first and then deploy the bar.
But following is what I am trying to achieve...
1. Delete all the resources from the integration server
2. Issue mqsilist -a -r -d2 command to ensure that no more resources remain deployed in the integration server.
3. Deploy the bar.
Please provide help here.
Thanks and Regards,
Maneesh Sharma |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Jun 02, 2016 4:16 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
... is there a reason you don't want to delete the EG/Integration Node? _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Jun 02, 2016 4:18 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
You should be able to do that using the broker API  _________________ MQ & Broker admin |
|
Back to top |
|
 |
gappodi |
Posted: Sat Jun 04, 2016 10:39 am Post subject: |
|
|
 Voyager
Joined: 05 Sep 2014 Posts: 76
|
@mqjeff.. There is no reason as such. May be I am trying to avoid an additional EG creation command.
@fjb_saper.. I tried using Broker API and wrote a small java program to achieve the the same. However, I am running into following exception..
Exception in thread "main" java.lang.UnsatisfiedLinkError: bipnativetrace (C:\Program Files\IBM\MQSI\9.0.0.1\bin\bipnativetrace.dll is not a valid Win32 application. )
at java.lang.ClassLoader.loadLibraryWithPath(ClassLoader.java:1167)
at java.lang.ClassLoader.loadLibraryWithClassLoader(ClassLoader.java:1131)
at java.lang.System.loadLibrary(System.java:528)
at com.ibm.broker.trace.NativeTracer.<init>(NativeTracer.java:80)
at com.ibm.broker.trace.Trace.<clinit>(Trace.java:106)
at java.lang.J9VMInternals.initializeImpl(Native Method)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:228)
at com.ibm.broker.plugin.MbMessage.<init>(MbMessage.java:165)
at myutils.MBResourceManager.main(MBResourceManager.java:39)
|
|
Back to top |
|
 |
mqjeff |
Posted: Sun Jun 05, 2016 9:50 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
That seems like you're running in a 32-bit JRE. And you need to be running in a 64-bit JRE.
Nothing wrong with not deleting the entire EG. Lots of reasons that would be needed in production. It's just the simple way to do it.
Also, I might tend to put those 150 deployable components into applications and libraries (shared libraries in v10). Then you wouldn't have to delete all of them.
And mqsidelete does actually remove/undeploy the things it's overwriting.
But having a working tool to do a cleanup first, just to belt your suspenders and tie your shoes, is not a bad idea. _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
stoney |
Posted: Sun Jun 05, 2016 10:41 am Post subject: |
|
|
Centurion
Joined: 03 Apr 2013 Posts: 140
|
You can also clear out the contents of an integration server by deploying an empty BAR file and telling it to delete all deployed resources first:
Windows:
Code: |
copy NUL empty.bar
mqsideploy IB10NODE -e default -a empty.bar -m |
UNIX:
Code: |
touch empty.bar
mqsideploy IB10NODE -e default -a empty.bar -m |
|
|
Back to top |
|
 |
gappodi |
Posted: Mon Jun 06, 2016 2:41 am Post subject: |
|
|
 Voyager
Joined: 05 Sep 2014 Posts: 76
|
Thanks everyone for their valuable suggestions.
Regards,
Maneesh Sharma |
|
Back to top |
|
 |
zpat |
Posted: Tue Sep 06, 2016 2:33 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
Is it possible to create an empty bar file that can be deployed (how)?
Or would it need to have some sort of component in it to make it a valid bar file? _________________ Well, I don't think there is any question about it. It can only be attributable to human error. This sort of thing has cropped up before, and it has always been due to human error. |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Sep 06, 2016 4:40 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
zpat wrote: |
Is it possible to create an empty bar file that can be deployed (how)?
Or would it need to have some sort of component in it to make it a valid bar file? |
In theory you could create one by messing with the contents of a bar file created with some component/resource/etc in it.
But what are you hoping to accomplish with an empty bar file?
Also, you should have put this in it's own thread. Mods, please move. _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
Armageddon123 |
Posted: Tue Sep 06, 2016 8:29 am Post subject: |
|
|
Acolyte
Joined: 11 Feb 2014 Posts: 61
|
|
Back to top |
|
 |
mqjeff |
Posted: Tue Sep 06, 2016 8:37 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
I would still delete and rebuild the EG.
Or build a new one and then delete the old one... _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
Armageddon123 |
Posted: Tue Sep 06, 2016 10:19 am Post subject: |
|
|
Acolyte
Joined: 11 Feb 2014 Posts: 61
|
i havent really tried the option of delete EG and create new one.
We have to see if those HTTP(s) ports which we have set on previous EG are restored as is, when we delete and recreate. I have to try and find. |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Sep 06, 2016 10:41 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
You will have some downtime when you clear the EG and redeploy it.
You can take the same amount of downtime (or less) when you stop the old EG and then start a new one that has the same ports. _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
timber |
Posted: Thu Sep 08, 2016 12:20 am Post subject: |
|
|
 Grand Master
Joined: 25 Aug 2015 Posts: 1292
|
Quote: |
We have to see if those HTTP(s) ports which we have set on previous EG are restored as is, when we delete and recreate. |
The port settings will not be remembered. The new EG will be an entirely new object.
Best practice is to create your brokers and EGs using a script so that they are easy to recreate. |
|
Back to top |
|
 |
|