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 » Deleting all resources from one integration server

Post new topic  Reply to topic
 Deleting all resources from one integration server « View previous topic :: View next topic » 
Author Message
gappodi
PostPosted: Wed Jun 01, 2016 11:19 pm    Post subject: Deleting all resources from one integration server Reply with quote

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
View user's profile Send private message
mqjeff
PostPosted: Thu Jun 02, 2016 4:16 am    Post subject: Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Thu Jun 02, 2016 4:18 am    Post subject: Reply with quote

Grand High Poobah

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

You should be able to do that using the broker API
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
gappodi
PostPosted: Sat Jun 04, 2016 10:39 am    Post subject: Reply with quote

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
View user's profile Send private message
mqjeff
PostPosted: Sun Jun 05, 2016 9:50 am    Post subject: Reply with quote

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
View user's profile Send private message
stoney
PostPosted: Sun Jun 05, 2016 10:41 am    Post subject: Reply with quote

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
View user's profile Send private message
gappodi
PostPosted: Mon Jun 06, 2016 2:41 am    Post subject: Reply with quote

Voyager

Joined: 05 Sep 2014
Posts: 76

Thanks everyone for their valuable suggestions.

Regards,
Maneesh Sharma
Back to top
View user's profile Send private message
zpat
PostPosted: Tue Sep 06, 2016 2:33 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5849
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
View user's profile Send private message
mqjeff
PostPosted: Tue Sep 06, 2016 4:40 am    Post subject: Reply with quote

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
View user's profile Send private message
Armageddon123
PostPosted: Tue Sep 06, 2016 8:29 am    Post subject: Reply with quote

Acolyte

Joined: 11 Feb 2014
Posts: 61

https://developer.ibm.com/answers/questions/193853/how-do-i-clear-all-deployable-resources-from-the-c.html
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Sep 06, 2016 8:37 am    Post subject: Reply with quote

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
View user's profile Send private message
Armageddon123
PostPosted: Tue Sep 06, 2016 10:19 am    Post subject: Reply with quote

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
View user's profile Send private message
mqjeff
PostPosted: Tue Sep 06, 2016 10:41 am    Post subject: Reply with quote

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
View user's profile Send private message
timber
PostPosted: Thu Sep 08, 2016 12:20 am    Post subject: Reply with quote

Grand Master

Joined: 25 Aug 2015
Posts: 1280

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
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 » WebSphere Message Broker (ACE) Support » Deleting all resources from one integration server
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.