Ah, what a fun weekend.. I’m working on a few projects using Seam right now, and I wanted a way to deploy them out onto an actual server so that other people could look at them. Normally, you’d have a dedicated server for running Java apps, but those are kinda pricey, especially for while you are just prototyping - and if you are like me and have about 90% of your projects that never leave prototyping :)
So, I decided to stick it on a VPS for now, since a VPS can be had for $50 or less per month. The one I am using is from Rackforce - they have decent prices and, more importantly, their VPS is the only one I’ve been able to allocate enough memory on to run a Java server of any sort.
So, anyway, we run into a few problems when trying to do this:
1) Seam requires an EJB3 container, and you can only get EJB3 with JBoss AS if you use the gui installer.
2) Memory
So, first we are faced with how to actually install JBoss on our VPS, since we can’t run the gui installer. The answer is actually really simple - just run the gui on your desktop, zip up the result, and upload it to your server. When I did this, I didn’t have to make a single change to the configuration. Yes, it really is that simple :)
Now, when you go to actually run it, you’ll probably get an error right when it tries to start up, due to not being able to allocate enough memory. By default, JBoss AS tries to allocate 512MB - more than most VPS systems have access to. You’ll need to change this to something smaller, but not so small that the app server can’t run. I found 256MB to be the sweet spot on my box. To change it, open up
You’ll also probably want to set it up as a service, following these instructions.
Have fun :)
8 Responses
Jeff
April 7th, 2007 at 12:45 pm
1Thanks for the article. I have jboss up and running on my VPS. I verfied this with nmap -st -O local host and it is running on 8080. I can telnet to it from my VPS such as telent 127.0.0.1 8080
However I cannot connect to it from the outside world. There is no firewall either. ANy ideas as to the problem?
Thanks,
jeff
suresk
April 8th, 2007 at 8:48 pm
2Hmm.. What happens? It just never connects?
Who is your VPS provider?
Fijai
July 12th, 2007 at 4:32 pm
3Hi,
Do you mind sharing what your experience on the VPS has been so far? I’m at a bit of a crossroads myself. My dilemma is whether to ship my Mac Mini of to a colocator for $25/month or to sign up for a VPS. As one of my friends put it, “its like sending your kid away to camp”.
suresk
July 12th, 2007 at 8:07 pm
4Can’t say I’m a huge fan of VPS accounts now, although they certainly have their uses.
For the php and rails stuff I use, Dreamhost has been fine for my needs and is considerably cheaper.
For Java stuff, the memory issues with VPS accounts can be a bit of a pain. Experimenting with app servers alone on a VPS is pretty tricky, I don’t think I’d want to run a production app on one.
Fijai
July 12th, 2007 at 10:22 pm
5Thanks. It looks like I’ll have to go the co-location route. Java is really starting to be a pain. It hurts to gain all this Java knowledge from my day job and to be unable to use it for any side projects. Rails here I come.
suresk
July 12th, 2007 at 10:42 pm
6Yes, it sucks. I spend all day at work doing cool stuff with Java, but for stuff on the side it is simply too bulky and expensive to deploy smaller apps. There has been a ton of progress made recently in making Java faster to develop with, but comparatively little process to make it easier to deploy on smaller scales.
Rails or Java? A Java developers dilemma by SpencerUresk
July 14th, 2007 at 2:47 pm
7[…] I know a lot of other Java developers face this dilemma. I’ve had numerous conversations with co-workers about this very topic. A previous post where I showed how to get JBoss AS (and Seam) running on a VPS generated some comments on the blog and via private email about this issue. So, I guess I’m curious to see how others have dealt with this? And, is there any hope for easier Java app deployment in the future? […]
Run Rate
October 11th, 2007 at 8:50 pm
8Glad to see someone is staying on top of things.
RSS feed for comments on this post · TrackBack URI
Leave a reply
Categories
Archives
Links
Meta
Recent Entries
Recent Comments
Most Commented
SpencerUresk is proudly powered by WordPress - BloggingPro theme by: DesignDisease