Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1251
  • Last Modified:

Jython Script for JDBC and Virtual Host

Hello HonorGod,

Thank you very much all you help with MQ queue Creation script and Namespace export and import script. Now I need two Jython dscripts:

1. Script to create different JDBCProvides and DataSource. I have seen that you have worked on similar kind of script in below the link. I need only JDBCProvides and DataSource part of it.
http://www.experts-exchange.com/Software/Server_Software/Application_Servers/Java/IBM_Websphere/Q_26219904.html

2. Script to create Virtual Host by taking the values from properties files.
0
k_satish22
Asked:
k_satish22
  • 11
  • 10
1 Solution
 
HonorGodCommented:
Presumably you would like to have both use a properties file?

Or, if the script was general enough, a single script would suffice?
0
 
k_satish22Author Commented:
Thank you somuch HonorGod.

Yes Both the scripts should take the values from properties file.
0
 
k_satish22Author Commented:
Hi HonorGod.

Any Luck??
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
HonorGodCommented:
Let's look at them 1 at a time.

For the virtual host, what information do you want to be able to provide / define in the properties file?

For example, if we execute the following statements in an interactive session:

we get information about the aliases (hostname, and portnumber values), followed by a long list of mimeTypes...
wsadmin>vh = AdminConfig.list( 'VirtualHost' ).splitlines()[ 0 ]
wsadmin>print AdminConfig.showall( vh )

Open in new window

0
 
k_satish22Author Commented:
In properties file I would like to pass  something like below ...

virtual_host_name=Main
host_port_list=*:40980, *:40983
0
 
HonorGodCommented:
Will the virtual hosts being created all be at the same scope?

Or, does the properties file need to allow the creation of virtual hosts entries at multiple scopes?
0
 
k_satish22Author Commented:
I think there will be no scope required for virtual hosts .
0
 
HonorGodCommented:
Virtual Hosts may be created at the Cell level, or at a node level.

For a stand-alone Application server, almost all VirtualHosts are defined at the Cell level.

Consider a multi-node cell in a distributed manager environment though.
Does it make sense to define a non-wildcard hostname HostAlias at the cell level?  I think not.
0
 
HonorGodCommented:
for example
wsadmin>print AdminConfig.parents( 'VirtualHost' )
Cell
Node

Open in new window

0
 
k_satish22Author Commented:
Got it. I would like to specify the scope also in properties file. Thank you for the clarification.
0
 
HonorGodCommented:
Yes, but are multiple scopes needed, or will all virtual hosts in the properties file be created at the same scope?
0
 
k_satish22Author Commented:
All the virtual hosts in the properties file be created at the same scope specified in the properties file
0
 
HonorGodCommented:
ok, let me work on it.  Thanks for the input.
0
 
k_satish22Author Commented:
Thank you
0
 
HonorGodCommented:
Please take a look at this, and let me know what you think.

To see usage information, simply execute the file.

For example:

./wsadmin.sh -f createVhost.py
createVhost.py
createVhost.prop.txt
0
 
k_satish22Author Commented:
Excellent. The Script is working as expected. Thank you so much.
0
 
HonorGodCommented:
Can we "close" this question, and open a new one for the other script?
0
 
k_satish22Author Commented:
I have opend a new question for JDBC Script.
http://www.experts-exchange.com/Software/Server_Software/Application_Servers/Q_27035089.html

I will close this question tomorrow. I need to test few more scenarios

Thank you somuch for all your help.
0
 
HonorGodCommented:
Great.  Thanks!

Don't forget to check this one as well: http://e-e.com/Q_26933403.html  ;-)
0
 
k_satish22Author Commented:
I have tested locally and the export/import Namespace Bindings scripts  are working fine. I looking for a window to test it on actual Server. Sorry for the delay in closing it.

More Script on there way :)
0
 
HonorGodCommented:
Thanks for the grade & points.

Good luck & have a great day.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

  • 11
  • 10
Tackle projects and never again get stuck behind a technical roadblock.
Join Now