Archive for September, 2008

Java Rebel saves me ….

Today i found one of the most interesting tool called Java Rebel (http://www.zeroturnaround.com/javarebel/).
Before explaining about this tool , i would like to tell what are the steps i was doing for deploying the application.
Running Managed and admin server everytime after you made code changes(Changing logic etc..) in any “.class” file .
These steps will repeat whenever you do code changes. And developer has to wait until the servers has been brought up. This will kill developer time indeed.
But this tool Java Rebel make no more or less chances to re-deploy webapplication after any code changes in your class file.
You can make changes in your code , and see the effect for your change without re-deploying the servers!! , thats amazing one.
JavaRebel is a JVM plugin (-javaagent) that enables to reload changes made to Java class files on-the-fly, saving developers
the time that it takes to redeploy an application or perform a container restart. It is a generic solution that works for Java EE
and Java standalone applications“.
The following classes will be reloaded when they are changed and compiled:

  1. All “.class” classes inside the usual classpath (WEB-INF/classes, etc).  will provide the best JavaRebel experience.

Installation
edit your wisorStartManagedWeblogic.cmd file ,

Add the following to JVM command line (note that it is important that the JAR would be named “javarebel.jar”)

" -noverify -javaagent:/path/to/javarebel.jar "
for example: set JAVA_OPTIONS=-noverify -javaagent:d:\javarebel\javarebel.jar

Add comment September 15, 2008

python to pythoning ……

homepage

Its not a dramatic change in me for switching from “Java” to python And i did not. …. well , all i  wanted to have fun coding in python rather than “Java” …. Intially i was totally confused whether i should  learn ruby or groovy or python or whatever that suppose to make me smile while coding…. But i learned python that its one of the more popular , strong ,dynamic bla bla bla …… And i am still a novice , i started with byte of python tutorial which is excellent tutorial by swaroop (http://www.swaroopch.com/byteofpython/) …. Ya just started out with python shell executing all basic stuffs using IDLE … Its amazing thing to learn python .. if you python then surely you will never turn off from your mind … get addicted to it , like i am . Till now i learned so many things that i wouldn’t have learned from any other language … beacause its very simple , ease … and only thing that you have to apply some common sense while pythoning ….

You can write sophisticated taks within in few lines … what you code in java/c++/c can be done within few lines ….. you will more over concentrate on solution to the problem rather than syntax !… And it has got numerious GUI and Web frameworks and its still amazing .

Today i found libgmail.py library , where i can play around with GMAIL account using python…. (http://libgmail.sourceforge.net/)

Which is a Library to provide access to Gmail via Python

After downloading libgmail … all i have to extract to my /lib directory .

some examples i worked out …..

SEND MAIL

import libgmail
import mechanize as ClientCookie

ga = libgmail.GmailAccount(“username@gmail.com”, “password”)
ga.login()
msg = libgmail.GmailComposedMessage(‘to@gmail.com’,’subject’,'body’)
ga.sendMessage(msg)
print ‘\nEmail sent’

READ MAIL

import libgmail
ga = libgmail.GmailAccount(“username@gmail.com”, “password”)
ga.login()
folder = ga.getMessagesByFolder(“inbox”, True)
for thread in folder:
print “Thread:”, thread.id, “Subject:”, thread.subject
for msg in thread:
print “Msg:”, msg.id, “,Author”, msg.author, “,Subject:”, msg.subject

To send attachment files

import libgmail
ga = libgmail.GmailAccount(“username@gmail.com”, “password”)
ga.login()
myFiles = ["/file1", "/file2", "/file3"]
msg=libgmail.GmailComposedMessage(“friend@gmail.com”, “SubjectHere”, “BodyHere”, filenames=myFiles)
ga.sendMessage(msg)

Infact you can read contacts , read trash , read Unread mails etc ……..

Isnt it amazing !! …. poetic way to python ….

6 comments September 1, 2008


Categories

AD

September 2008
M T W T F S S
« Aug   Nov »
1234567
891011121314
15161718192021
22232425262728
2930  

Archives

1

Blog Stats

Talk To Me

Text