473,397 Members | 2,028 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Configure Websphere from Shell Script

107 100+
Hi All,

Is it possible to configure websphere application server console from shell script. Configurations like Datasource & JNDI creation, Bus, Queue, Activation Specification creation and so on..

If its possible, what are the neccessary steps needed to write the shell script?

Please reply..

Thanks in Advance
Raju
Oct 15 '13 #1
4 1908
sicarie
4,677 Expert Mod 4TB
I'm not familiar with Websphere, however I found a simple Google search to show many promising links. Have you tried researching this on your own and run into a specific issue we can help with?
Oct 17 '13 #2
rajujrk
107 100+
I found the solution for this. I got it by using Shell Script integrated with JACL and finished.

Anyhow Thanks for your response Sicarie.
Oct 18 '13 #3
sicarie
4,677 Expert Mod 4TB
Awesome, glad you were able to find it!

Would you mind posting what you did so that someone else with the same question might benefit as well?
Oct 18 '13 #4
rajujrk
107 100+
I used wsadmin scripting tool and jacl to achieve this, i have given below the sample shell script and jacl to create the JDBC Provider in webshere Appserver

jdbcprovider.sh

Expand|Select|Wrap|Line Numbers
  1. # Used to Fetch the KEY and VALUES from properties file
  2. get_prop(){ 
  3.     propfile=$1
  4.     key=$2
  5.     grep  "^${2}=" ${1}| sed "s%${2}=\(.*\)%\1%"
  6. }
  7.  
  8. NODE_NAME=`get_prop AppServerConfig.properties NODE_NAME`
  9. CELL_NAME=`get_prop AppServerConfig.properties CELL_NAME`
  10. SERVER_NAME=`get_prop AppServerConfig.properties SERVER_NAME`
  11.  
  12. APP_SERVER_JDBC_PROVIDER=`get_prop AppServerConfig.properties JDBC_PROVIDER`
  13. APP_SERVER_JDBC_IMPLCLS=`get_prop AppServerConfig.properties JDBC_IMPLCLS`
  14. APP_SERVER_JDBC_CLSPATH=`get_prop AppServerConfig.properties JDBC_CLASPTH`
  15.  
  16. echo ""
  17. echo "*************************************************************************"
  18. echo ""
  19. echo "Starting JDBC provider creation"
  20. echo ""
  21. echo "*************************************************************************"
  22. echo ""
  23.  
  24. sh /hosting/products/WebSphereD01/bin/wsadmin.sh -f JDBCProvider/wsjdbcprovider.jacl $CELL_NAME $NODE_NAME $APP_SERVER_JDBC_PROVIDER $APP_SERVER_JDBC_IMPLCLS $APP_SERVER_JDBC_CLSPATH
  25.  
  26.  
And the jacl file is JDBCProvider\wsjdbcprovider.jacl

Expand|Select|Wrap|Line Numbers
  1.  
  2. if { !($argc == 5) } {
  3.   puts "This script requires 5 parameters:"
  4.   puts "Arg #1. NODE NAME "
  5.   puts "Arg #2. CELL NAME "
  6.   puts "Arg #3. JDBC Provider Name "
  7.   puts "Arg #4. Implementation Class Name "
  8. }else{
  9. set cellNm         [lindex $argv 0]
  10. set nodeNm         [lindex $argv 1]
  11. set jdbcName      [lindex $argv 2]
  12. set implName      [lindex $argv 3]
  13. set clsPath         [lindex $argv 4]
  14. set node [$AdminConfig  getid  /Cell:$cellNm/Node:$nodeNm/]
  15.  
  16. set n1[list name $jdbcName]
  17.  
  18. set implCN[list implementationClassName $implName]
  19.  
  20. set clspth[list classpath $clsPath]
  21.  
  22. set desc[list description $jdbcName]
  23.  
  24. set  jdbcAttrs[list  $n1  $implCN $clspth $desc]
  25.  
  26. puts "************************************************************"
  27. puts ""
  28. puts "Creating new JDBC provider $n1"
  29. puts ""
  30. puts "************************************************************"
  31.  
  32. $AdminConfig create JDBCProvider $node $jdbcAttrs
  33.  
  34. puts ""
  35. puts "$n1 JDBC Provider Created."
  36. puts ""
  37. puts "Saving Configuration..."
  38. $AdminConfig save
  39. puts ""
  40. puts "Saved."
  41. }
  42.  
Hope it will be useful.

Thanks Sicarie..

Thanks and Regards
Rajkumar
Oct 30 '13 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: FPGA05 | last post by:
Hello All, I am developing a small application in which I would need a C++ application to read the output from a shell script. A shell script keeps looking for user inputs and once the user...
1
by: news | last post by:
At the end of a PHP script, I'm sending a file via FTP to a server. I thought it'd be best to use a shell script in order to automate the FTP (logging in, changing to binary, putting the file,...
2
by: Gerard Flanagan | last post by:
Hello, I have a third party shell script which updates multiple environment values, and I want to investigate (and ultimately capture to python) the environment state after the script has run....
3
by: telduivel | last post by:
Can someone please help me with this: I have a python script, that at some point calls a linux bash script (.sh). Starting the shell script is the last thing my python script needs to do, so I...
2
by: ellennolan | last post by:
Hello, I wonder if anyone can help with calling external shell script in c++. Basically, in the shellscript, I want to pass src, dst, md5. If the src's md5 matches md5 given, it will be link to...
5
by: inetquestion | last post by:
I am looking for a web interface for shell commands or shell scripts. Does anyone know of any exexisting php scripts which would solve this requirement? PHP form accepts input from a user, then...
7
by: Samuel A. Falvo II | last post by:
I have a shell script script.sh that launches a Java process in the background using the &-operator, like so: #!/bin/bash java ... arguments here ... & In my Python code, I want to invoke...
4
by: devi thapa | last post by:
Hi, I am executing a python script in a shell script. The python script actually returns a value. So, can I get the return value in a shell script? If yes, then help me out. Regards, Devi
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.