ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum IndexWebSphere Application ServerUsing WebSphereAS Jython Interpreter

Post new topicReply to topic
Using WebSphereAS Jython Interpreter View previous topic :: View next topic
Author Message
belchman
PostPosted: Tue Oct 20, 2015 5:51 am Post subject: Using WebSphereAS Jython Interpreter Reply with quote

Master

Joined: 31 Mar 2006
Posts: 278
Location: Ohio, USA

Before I waste more of my time trying to figure out how, is it possible to use the Jython interpreter @ {installroot}/optionalLibraries/jython for performing tasks that are not wsadmin tasks?

If yes, where is the executable? What do I enter on the command line to get something as simple as the below to work?

Quote:
jython --help

_________________
Make three correct guesses consecutively and you will establish a reputation as an expert. ~ Laurence J. Peter
Back to top
View user's profile Send private message
Gaya3
PostPosted: Tue Oct 20, 2015 6:15 am Post subject: Reply with quote

Jedi

Joined: 12 Sep 2006
Posts: 2493
Location: Boston, US

jython jar file comes along with WAS package, this is mainly used for programming and by wsadmin.

you need a jython interpreter to execute the standalone Jython/python scripts. it requires to be dowloaded and installed in the server.
_________________
Regards
Gayathri
-----------------------------------------------
Do Something Before you Die
Back to top
View user's profile Send private message
belchman
PostPosted: Tue Oct 20, 2015 6:27 am Post subject: Reply with quote

Master

Joined: 31 Mar 2006
Posts: 278
Location: Ohio, USA

Thanks Gaya3.

So I assume that wsadmin interprets the jython on its own when I pass a jython script to it.

I just want to do some work on the WAS admin host that is not necessarily WAS admin work. In other words, the jython script will not necessarily contain any wsadmin commands.

If I call wsadmin and pass a jython file that contains no wsadmin commands, I assume it will work but will waste some resources as it loads wsadmin and connects to the dmgr soap port for no good reason. Are my assumptions good?

Getting things installed in our organization is not as simple as it should be
_________________
Make three correct guesses consecutively and you will establish a reputation as an expert. ~ Laurence J. Peter
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Oct 20, 2015 6:29 am Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17187

Is there a particular reason you want to keep non-was config in a was tool?

Typically one would do this kind of work in an os-level script, that also called jython/wsadmin.

Or some other provisioning tool - ant/maven/chef/etc.
_________________
Read, Think, Try, Repeat
Back to top
View user's profile Send private message
belchman
PostPosted: Tue Oct 20, 2015 6:52 am Post subject: Reply with quote

Master

Joined: 31 Mar 2006
Posts: 278
Location: Ohio, USA

MQjeff,

Let me describe my challenge and maybe it will be clear.

I need to feed certain data about our middleware systems, that include WAS, WMQ, IHS etc, into our CMDB. The interface to our CMDB is a Excel spreadsheet. So when I have all the properties of our CI gathered, I need to create a spreadsheet that describes the WAS object (CI) and pass it to the CMDB for input into their system.

Gathering (extracting) the properties of the WAS CI can easily be done using wsadmin/jython. The issue is I have is in transforming the property names and values so that they meet the requirements of the interface. So the transformation process will not necessarily be executing wsadmin functions.

Clear as mud?

Getting something like python or jython installed on all of our hosting systems is a big barrier to hurdle. So, If I can use what is already on the systems (like the jython WAS already installed), that is sweet.
_________________
Make three correct guesses consecutively and you will establish a reputation as an expert. ~ Laurence J. Peter
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Oct 20, 2015 7:01 am Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17187

I see, you're not provisioning the system, you're extracting info/verifying it.

I don't know jython.

You could write standard java, and use System calls to get the info you need, including running jython/wasadmin.

If was doesn't come with a JVM, then ... I think you have installed WAS wrong...
_________________
Read, Think, Try, Repeat
Back to top
View user's profile Send private message
Gaya3
PostPosted: Tue Oct 20, 2015 7:22 am Post subject: Reply with quote

Jedi

Joined: 12 Sep 2006
Posts: 2493
Location: Boston, US

Jeff question is very right-

its better to keep away any non-was config, thinking about security.

I totally agree running python/jython through wsadmin does not looks good.
_________________
Regards
Gayathri
-----------------------------------------------
Do Something Before you Die
Back to top
View user's profile Send private message
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexWebSphere Application ServerUsing WebSphereAS Jython Interpreter
Jump to:



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP


Theme by Dustin Baccetti
Powered by phpBB 2001, 2002 phpBB Group

Copyright MQSeries.net. All rights reserved.