Add and Remove targets from a Deploy-able system resource:
o You should be able to see the new target in the Admin Console (Service > JDBC > DataSources > DS1 > Targets Tab)
• You should be able to see the new target in the Admin Console (Service > JDBC > DataSources > DS1 > Targets Tab)
@Deepti : i wrote this post for you babie...
• Any deploy-able weblogic system resource (JDBC Data Source, JMS Connection Factory, JMS Servers, JDBC Multi Pools, Web deployment, etc) implement the 'DeploymentMBean' interface.
• A deploy-able Systme resource is any MBean that may be deployed on one or more targets, such as a JMS Front-end or back-end or a JDBC connection pool.
• Any deploy-able resource (MBean) has targets, which specify which servers the deployment should be deployed / pinned on.
• All these deploy-able resources (MBean) leverage 'addTarget' and 'removeTarget' methods , which they inherit from the 'DeploymentMBean' interface.
o addTarget(target)
- This method adds a target to specify additional servers / clusters on which the deployable Mbean can be deployed
- here, target - is the reference variable of type: TargetMBean, [a server MBean is acceptable], see example below
o removeTarget(target)
- This method removes the value of the addTarget attribute
- here, target - is the reference variable of type: TargetMBean, [a server MBean is acceptable], see example below
o In this example we will use a JDBC Data Source to demonstrate this:
o Prerequisites
- WebLogic Domain with an admin server and a managed server named 'MS1'
- Create a JDBC Datasource named 'DS1', and deploy it ONLY on 'Admin Server'
- Make sure that both the servers are running and DS1 is also running
o Demonstration for adding a target to a Data Source:
- open a command window (CMD)
- set the environment by running the 'setdomainenv.cmd' from the 'domain\bin' dir
- execute 'java weblogic.WLST'
- connect to the Admin Server using 'connect' command
o You should be able to see the new target in the Admin Console (Service > JDBC > DataSources > DS1 > Targets Tab)
o Demonstration for removing a target to a Data Source:
- open a command window (CMD)
- set the environment by running the 'setdomainenv.cmd' from the 'domain\bin' dir
- execute 'java weblogic.WLST'
- connect to the Admin Server using 'connect' command
• You should be able to see the new target in the Admin Console (Service > JDBC > DataSources > DS1 > Targets Tab)
Holla :)
Unni,
Rocking unni :D
ReplyDeleteIs this for all of us or only your babie can use this ;)
ReplyDelete@ ur own risk :P
ReplyDeletefeel free to drop a comment if you have any questions !!
i want to delete all datasource existing on the weblogic domain. please help me on this.
ReplyDeleteThanks in advance