Redeploying libraries in iterative development

iterative.jpg

Deployment command and tools deal with libraries in the same way as applications. The same set of commands are supported for libraries as for applications. There are, however, additional restrictions on library undeployment and redeployment. Undeployment or redeployment of a library is disallowed in case there are any deployed applications that refer to it in a running server. This does not necessarily interfere with upgrade scenarios. The recommended practice for upgrading shared libraries is to use versions and not to use "exact-match" while referring to libraries. A new version of library may be deployed without touching the older version. The applications that need to be upgraded may then simply be redeployed.

There is, however, a need for developers who create these libraries to test a change in deployed libraries in an iterative development scenario. If the developer does not mind loosing application state, she could use getReferencingRuntimes() methods of LibraryRuntimeMBean to identify referring applications and perform the following steps:


  1. Undeploy referring applications

  2. Redeploy library

  3. Deploy applications from the list gathered in #1

Here is a simple function that implements steps 1 - 3:


def redeployLibraryWithApps(libraryName):
serverRuntime()
cd('LibraryRuntimes/'+libraryName)
apps=cmo.getReferencingRuntimes()
appPaths={}
domainConfig()
cd('AppDeployments')
for app in apps:
appId = app.getApplicationIdentifier()
cd(appId)
appPaths[appId] = cmo.getAbsoluteSourcePath()
cd('..')
undeploy(appId)
redeploy(libraryName)
for appId in appPaths.keys():
deploy(appId, appPaths[appId])
return

Such a function may then be used in WLST scripts:


if (len(sys.argv) < 4):
print "Usage java weblogic.WLST redeployLib.py [username] [password] [library-name]"
exit()
connect(sys.argv[1],sys.argv[2])
redeployLibraryWithApps(sys.argv[3])
disconnect()

(Picture licensed from quapan under Creative Commons)

Comments:

hey. after i build my app, i saw that best is to redeploy the application from WebLogic. The question is: After i redeploy the app, is it ok to restart the WL? are there any chances that something not to work if i don't restart the WL? thanks - is it necessary, or safe to restart the WL after redeploy?

Posted by godra on November 08, 2009 at 11:55 PM PST #

Godra: It okay & safe to restart the server but it is not necessary. Redeploying the application is enough to pick up the new application bits.

Posted by Aseem Bajaj on November 09, 2009 at 01:05 AM PST #

If use ant, the same results can be achieved with wldeploy ant task.

Posted by Jean Drolet on November 20, 2009 at 05:27 AM PST #

Undeniably believe that which you said. Your favorite justification appeared to be on the web the simplest thing to be aware of. I say to you, I certainly get irked while people think about worries that they plainly do not know about. You managed to hit the nail upon the top and also defined out the whole thing without having side effect , people can take a signal. Will probably be back to get more. Thanks

Posted by posicionamiento seo on February 03, 2011 at 06:02 AM PST #

I'll gear this review to 2 types of people: current Zune owners who are considering an upgrade, and people trying to decide between a Zune and an iPod. (There are other players worth considering out there, like the Sony Walkman X, but I hope this gives you enough info to make an informed decision of the Zune vs players other than the iPod line as well.)

Posted by www.amazon.com on March 06, 2011 at 12:32 AM PST #

The new Zune browser is surprisingly good, but not as good as the iPod's. It works well, but isn't as fast as Safari, and has a clunkier interface. If you occasionally plan on using the web browser that's not an issue, but if you're planning to browse the web alot from your PMP then the iPod's larger screen and better browser may be important.

Posted by amazon.com on March 06, 2011 at 03:40 AM PST #

The new Zune browser is surprisingly good, but not as good as the iPod's. It works well, but isn't as fast as Safari, and has a clunkier interface. If you occasionally plan on using the web browser that's not an issue, but if you're planning to browse the web alot from your PMP then the iPod's larger screen and better browser may be important.

Posted by amazon.com on March 06, 2011 at 04:13 AM PST #

This is really interesting, You are a very skilled blogger. I've joined your rss feed and look forward to seeking more of your excellent post. Also, I have shared your website in my social networks!

Posted by księgowość wrocław on March 13, 2011 at 12:11 PM PDT #

Wouldn't see this more in newspapers if this were the case? I almost never observe of this on the MSM. Either this article is ahead of the curve, or you have overextended your interpretation.

Posted by Comforter sets on April 20, 2011 at 07:55 AM PDT #

really thanks i needed this

Posted by akciğer kanseri belirtileri on April 20, 2011 at 07:04 PM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

The official blog for Oracle WebLogic Server fans and followers!

Stay Connected

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
5
6
7
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today