Skip to main content

Posts

Showing posts from November, 2013

Monitor Glassfish Server With Python

Before monitoring Glassfish Server, it should be configured for this purpose. In admin service, you should edit jmx connector settings properly. For detailed explanation, please visit this link . When the editing is done, it is time to code. First, connection to jmx service should be established. However, to achieve this, JMX java library is required. Oracle doesn't provide this library in any other languages, therefore we are forced to take this action in java. Fortunately, in python, with the help of jpype library, we can open a jvm and use the library. Jython is another option to use java libraries in python environment. For this tutorial, we will use jpype, so it is better to quickly install it.

How to open a new database and a new collection in Mongodb

As contrast to relational databases, mongodb doesn't explicitly open a new database or a collection. User just says to mongodb to use a database no matter it is available currently or not. When a save action is performed, this database is automatically created by mongodb. I will take following actions in mongo shell. Currently, I have following databases in mongodb:  > show dbs local 0.078125GB monitoring 0.203125GB test 0.203125GB