Saturday January 05, 2008
Pramod published an updated JRuby
Gem for GlassFish v3. Download the gem here.
Here are the updates from last
time:
jruby -S rails hellocd hello
jruby script/generate controller say hellovi app/controllers/say_controller.rb @hello_string = "v3 Gem is getting polished!"vi app/views/say/hello.rhtml<%= @hello_string %>cd ..
jruby -S glassfish_rails helloJan 4, 2008 3:35:52 PM
com.sun.grizzly.standalone.StaticResourcesAdapter <init>
INFO: New Servicing page from:
/Users/arungupta/testbed/r126/jruby-1.0.3/bin/hello/public
Jan 4, 2008 3:36:00 PM com.sun.enterprise.v3.server.AppServerStartup run
INFO: Startup service : Application Loader
Jan 4, 2008 3:36:00 PM com.sun.enterprise.v3.server.AppServerStartup run
INFO: Startup service : Grizzly on port 8080
Jan 4, 2008 3:36:00 PM com.sun.enterprise.v3.server.AppServerStartup run
INFO: Glassfish v3 started in 8567 mshttp://localhost:8080/hello/say/hello
and shows the output as:
http://localhost:8080/hello is displayed
in the browser as shown below:
Technorati: ruby jruby glassfish v3 gem
Posted by Arun Gupta in web2.0 | Comments[3]
|
|
|
|
|
Today's Page Hits: 1599
Total # blog entries: 1002
Posted by Arun Gupta's Blog on January 30, 2008 at 10:31 PM PST #
Posted by Arun Gupta's Blog on February 08, 2008 at 04:33 AM PST #
Hi Arun,
I can't have glassfish running multiple concurrent requests:
Try this please:
rails concurrent
cd concurrent
script/generate controller test test
edit app/controllers/test.rb
class TestController < ApplicationController
def test
sleep 10
@value = Time.now
end
end
edit app/views/test/test.test.html.erb
<%= @value %>
edit config/database.yml
production:
adapter: jdbcsqlite3
database: db/production.sqlite3
pool: 5
timeout: 5000
Now launch glassfish gem in production mode:
jruby -S glassfish -e production -n 4 --runtimes-min 4 --runtimes-max 4
Now I try (concurrently) get 4 times the page:
http://localhost:3000/test/test
I receive the results queued (the last result after 40 seconds) seems that glassfish gem cannot handle multiple concurrent requests on multiple separate instances of jruby...
What do you think about this issue ?
May be I'm doing something wrong ?
Posted by Tex on August 24, 2009 at 02:39 AM PDT #