Fix a websphere.py problem
Closed this issue · 1 comments
Hi, friend
I fix a error in the default websphere.py
I am ussing was7 version 7.0.29
I invoke the Python Script with this config in my pom.xml
<plugin>
<groupId>com.orctom.mojo</groupId>
<artifactId>was-maven-plugin</artifactId>
<version>1.0.11</version>
<executions>
<execution>
<id>deploy</id>
<phase>install</phase>
<goals>
<goal>deploy</goal>
</goals>
<configuration>
<wasHome>${env.WAS_HOME}</wasHome>
<applicationName>myEAR</applicationName>
<script>websphere.py</script>
<scriptArgs>-o deploy</scriptArgs>
<cell>myCell</cell>
<host>localhost</host>
<port>8881</port>
<server>server1</server>
<user>admin</user>
<password>admin</password>
<node>myNode</node>
<virtualHost>default_host</virtualHost>
<verbose>true</verbose>
<sharedLibs>mySharedLibs</sharedLibs>
<restartAfterDeploy>false</restartAfterDeploy>
<failOnError>false</failOnError>
</configuration>
</execution>
</executions>
</plugin>
I have a problem to start the application in the function startApplication(self):
def startApplication(self):
print '-'*60
print "[STARTING APPLICATION]", host, applicationName
print time.strftime("%Y-%b-%d %H:%M:%S %Z")
print '-'*60
try:
if "" != cluster:
appManager = AdminControl.queryNames('type=ApplicationManager,process=' + server + ',*')
elif "" != node:
appManager = AdminControl.queryNames('node=' + node + ',type=Server,process=' + server + ',*')
else:
appManager = AdminControl.queryNames('type=Server,process=' + server + ',*')
print AdminControl.invoke(appManager, 'startApplication', applicationName)
#AdminApplication.startApplicationOnCluster(applicationName, cluster)
except:
print "FAILED to start application:"
print '-'*10
traceback.print_exc(file=sys.stdout)
print '-'*10
when i use node and cell i need pass the two params to create AppManager Object
appManager = AdminControl.queryNames('cell=' + cell + ',node=' + node + ',type=ApplicationManager,process=' + server + ',*')
Thx ^^
Thanks for the feedback.
The default script is mainly for clusters (ND version) and covers some standalone versions. I'm not to make it work for all environments, and that's the reason for customized script
.
Maybe we could make a sample-script
folder in the project root, and put your script there (also other ones scripts as well if any), and descriptions on what version of server it works, and what issues it works around.