473,323 Members | 1,574 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,323 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 1904
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: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.