Construct additional Pylons

Yes indeed. With the recent release of Jython 2.5.0, we felt that only supporting Django wasn't good enough. After a bit of work, I'm proud to announce that GlassFish will soon support Pylons , a much lighter-weight framework than Django. I say "soon support" since it's currently checked in on a branch rather than being included in any official releases, so you'll have to be a bit brave and experimental to go try it out. Don't let that dissuade you, pylons is just an svn checkout and mvn install away!

 Just like the support for Rails/merb/sinatra, Glassfish will automatically detect if a python app is a Django app or a Pylons app, and do the right thing. Just like the support for Rails/merb/sinatra/Django, there are a few Java properties that you'll want to set. Depending on how you are starting Glassfish, you'll either pass them in with -D or add them directly to your domain.xml file.

jython.home={Path to Jython} This one is fairly obvious. This is the path to the Jython installation that you want Glassfish to use. If you are using virtualenv for your app, make sure that you point this at the virtualenv Jython installation, rather than your system Jython installation.

  jython.mediaRoot={Path to your app's static content} The Jython container will attempt to handle static content in your app for you, and this is the directory that it will try to serve that content out of. If you are using a context root within GlassFish (which you probably are), don't forget to make the appropriate config changes so that you remember to try to fetch /contextroot/media/welcome.jpg rather than /media/welcome.jpg (which will 404).

jython.frameworkRoot={Path to your framework installation} This one is sometimes unneeded, but it's useful to mention anyway. Because Jython has a much more loose package structure than Ruby, the directory containing Pylons (or Django, or whatever) may not be on Jython's load path. Putting that path in here will ensure that it's properly added and that Jython can find it.

And, with those three options and a fresh build, the world of applications that GlassFish will deploy automatically for you grows a little bit larger.


Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

Jacob Kessler

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today