Friday August 29, 2008
FREE Ticket to Rails Conf Europe 2008
Are you a Start up company interested in jump starting and meets the
following criteria ?
|
![]() |
Posted by Arun Gupta in web2.0 | Comments[1]
|
|
|
|
|
Thursday August 28, 2008
Typo on GlassFish v3 - Ruby-on-Rails Blogging Engine
![]() |
Typo is an open-source Blogging Engine written using Ruby-on-Rails framework. It provides a lean engine that makes blogging easy. It's main attribtues are ease of use, usability, beauty and excellent support of web standards. |
| JRuby
limited openssl loaded. gem install jruby-openssl for full support. http://wiki.jruby.org/wiki/JRuby_Builtin_OpenSSL Building native extensions. This could take a while... /Users/arungupta/tools/rails20/jruby-1.1.3/lib/ruby/1.8/mkmf.rb:7: JRuby does not support native extensions. Check wiki.jruby.org for alternatives. (NotImplementedError) from /Users/arungupta/tools/rails20/jruby-1.1.3/lib/ruby/1.8/mkmf.rb:1:in `require' from extconf.rb:1 ERROR: Error installing typo: ERROR: Failed to build gem native extension. /Users/arungupta/tools/rails20/jruby-1.1.3/bin/jruby extconf.rb install typo Gem files will remain installed in /Users/arungupta/tools/rails20/jruby-1.1.3/lib/ruby/gems/1.8/gems/mysql-2.7 for inspection. Results logged to /Users/arungupta/tools/rails20/jruby-1.1.3/lib/ruby/gems/1.8/gems/mysql-2.7/gem_make.out |
| ~/samples/jruby
>unzip
~/Downloads/typo-5.1.2.zip Archive: /Users/arungupta/Downloads/typo-5.1.2.zip creating: typo-5.1.2/ creating: typo-5.1.2/app/ creating: typo-5.1.2/app/apis/ . . . inflating: typo-5.1.2/vendor/uuidtools/lib/uuidtools.rb inflating: typo-5.1.2/vendor/uuidtools/rakefile inflating: typo-5.1.2/vendor/uuidtools/README |
| ~/samples/jruby >sudo mysqladmin create typo_dev |
| ~/samples/jruby/typo-5.1.2
>~/tools/rails20/jruby-1.1.3/bin/jruby
-S rake db:migrate (in /Users/arungupta/samples/jruby/typo-5.1.2) == 1 InitialSchema: migrating ================================================= -- create_table(:users) -> 0.0377s -- create_table(:articles) -> 0.0189s -- add_index(:articles, :permalink) -> 0.0094s -- create_table(:categories) -> 0.0069s . . . == 69 AddModulesToProfile: migrating ========================================== -- add_column(:profiles, :modules, :text) -> 0.0072s == 69 AddModulesToProfile: migrated (0.0454s) ================================= == 70 AddUsersToNonAdmins: migrating ========================================== == 70 AddUsersToNonAdmins: migrated (0.0488s) ================================= |
| ~/tools/glassfish/v3/8-24
>unzip
~/Downloads/glassfish-snapshot-v3-prelude-08_24_2008.zip Archive: /Users/arungupta/Downloads/glassfish-snapshot-v3-prelude-08_24_2008.zip creating: glassfish/ creating: glassfish/docs/ creating: glassfish/docs/css/ creating: glassfish/docs/graphics/ . . . inflating: glassfish/lib/templates/login.conf inflating: glassfish/lib/templates/profile.properties inflating: glassfish/lib/templates/server.policy |
| ~/tools/glassfish/v3/8-24/glassfish
>java
-DJRUBY_HOME=/Users/arungupta/tools/rails20/jruby-1.1.3 -jar
modules/glassfish-10.0-SNAPSHOT.jar Aug 26, 2008 5:56:10 PM com.sun.enterprise.glassfish.bootstrap.ASMain main INFO: Launching GlassFish on Apache Felix OSGi platform Welcome to Felix. ================= Aug 26, 2008 5:56:11 PM HK2Main start INFO: contextRootDir = /Users/arungupta/tools/glassfish/v3/8-24/glassfish/modules Aug 26, 2008 5:56:11 PM OSGiFactoryImpl initialize . . . INFO: APIClassLoader = Class Loader for Bundle [GlassFish-Application-Common-Module [66] ] Aug 26, 2008 5:56:13 PM CommonClassLoaderManager Skipping creation of CommonClassLoader as there are no libraries available INFO: urls = [] Aug 26, 2008 5:56:13 PM com.sun.enterprise.v3.server.AppServerStartup run INFO: Glassfish v3 started in 2176 ms |
| ~/samples/jruby >~/tools/glassfish/v3/8-24/glassfish/bin/asadmin
deploy typo-5.1.2 Command deploy executed successfully. |







Posted by Arun Gupta in web2.0 | Comments[4]
|
|
|
|
|
Wednesday August 27, 2008
Interested in a 30 second promotion in Rails Conf Europe 2008 ?
|
Are
you deploying Rails
application on GlassFish
in any manner (WAR-based, Gem or Technology Preview 2) ? Are you using Rails and GlassFish combination in a creative way ? Having you been following Rails/GlassFish development/deployment options and have an opinion ? |
Posted by Arun Gupta in web2.0 | Comments[2]
|
|
|
|
| TOTD #43: GlassFish v3 Build Flavors
Here are different flavors of GlassFish v3 builds:
Posted by Arun Gupta in General | Comments[3]
|
|
|
|
|
Tuesday August 26, 2008
LOTD #6: Rails Deployment on GlassFish in 4 steps and 15 minutes
Charlie describes,
in 4 easy steps, how to deploy any Rails
application on GlassFish:

The main steps are:
Step 1: The App Server
Step 2: Package your App
Step 3: Deploy your application
Step 4: Tweaking (Optional)
And it should only take 15 minutes on GlassFish v2!
The conclusion of the blog is:
Hopefully
this walkthrough clears up some confusion around JRuby on Rails
deployment to an app server. It's really a simple process, despite the
not-so-simple history surrounding Enterprise Application Servers, and
GlassFish almost makes it fun :)
The next version, GlassFish
v3, allows Rails application to be deployed natively, i.e. no
packaging is required. You create a Rails application and run it - just
the way you are used to! Read all about it here.
All previous entries in this series are archived at LOTD.
Technorati: lotd
rubyonrails
jruby ruby glassfish
Posted by Arun Gupta in web2.0 | Comments[1]
|
|
|
|
|
Monday August 25, 2008
LOTD #5: Blogging Gold for Sun - Forrester loves it!
A recent
report by Forrester Research published a list of 15 companies
that really get corporate blogging and produce blogs that are
informative, fascinating, and a joy to read even for people who aren’t
die-hard fans of the company. Here is what the report says about Sun
Microsystems:
Like Adobe, Sun allows
their employees to blog. They’ve been doing it for a long time, and
their blog portal has over 4,500 bloggers covering over 110,000 posts.
Some of their blogs, such as that of Web 2.0 and Web Services
Evangelist Arun Gupta, have become quite popular on their own. That’s
110,000 posts of promotional gold for Sun and they know it.
Here are recent statistics of blogs.sun.com:

That's a comment for each post! I'm happy that this blog contibutes
it's share.
All previous entries in this series are archived at LOTD.
Technorati: lotd
milestogo
sun forrester
blogging
Posted by Arun Gupta in General | Comments[0]
|
|
|
|
|
Friday August 22, 2008
GlassFish @ Berlin-Brandenburg JUG and TU Berlin
![]() |
I'll be providing an overview of GlassFish - engineering update on v2 and v3, adoption & success stories, and the vibrant community around it at a joint Berlin-Brandenburg JUG and TU-Berlin meet on Sep 3, 2008. | ![]() |
Posted by Arun Gupta in web2.0 | Comments[3]
|
|
|
|
|
Thursday August 21, 2008
LOTD #4: Rails running on GlassFish @ LinkedIn
Light Engineering team (BumperSticker
fame)
at LinkedIn has
chosen GlassFish
for running their Rails
application. One of the developers on the
team reports:
Using Warbler, we
successfully wrapped our Rails applications into WAR files and deployed
on Glassfish (we’ll probably write a more detailed tutorial of this at
a future date). A WAR file is completely self contained application
that can be deployed simply by copying to an autodeploy directory. No
more Apache/Nginx reverse proxy, no more Capistrano, no more installing
gems on a production container, no more of any of that madness. This
was a huge win, and we broke out the champagne bottles.
Read the complete entry at:
JDBC
Connection Pooling for Rails on GlassFish
Stay tuned for more details!
NetBeans
development and GlassFish
deployment already provide an ideal
environment for Rails deployment. You can read about
successful deployments of Rails and GlassFish here.
All previous entries in this series are archived at LOTD.
Technorati: lotd
rubyonrails
jruby ruby netbeans
glassfish
stories
Posted by Arun Gupta in web2.0 | Comments[0]
|
|
|
|
|
Wednesday August 20, 2008
2000 comments on "Miles to go..."
This blog
has now been commented (including trackbacks) 2000 times.
Here are the statistics as of this morning:

With 671 entries, that makes it approx 3 comments/entry.
And the tag cloud showing the # of blog entries on each topic. GlassFish is certainly
way above others :)

And finally a tool to evaluate blog worth:
| weblogs.java.net/blog/arungupta | blogs.sun.com/arungupta |
|
|
|
Posted by Arun Gupta in General | Comments[2]
|
|
|
|
| TOTD #42: Hello JavaServer Faces World with NetBeans and GlassFish
This TOTD (Tip
Of The Day) shows how to
create a simple Java
Server Faces application using NetBeans IDE 6.1. This
is my first ever Java Server Faces application :) Much more
comprehensive applications are already available in NetBeans
and GlassFish
tutorials.
The application is really simple - it allows you to create a database
of cities/country that you like. You enter the city & country
name on a page and click on Submit. This stores the data entered in the
backend database and displays all the stored values in a new page. This
application demonstrates simple JSF concepts:


| create table cities(id integer AUTO_INCREMENT, city_name varchar(20), country_name varchar(20), PRIMARY KEY(id)); |
| @NamedQuery(name = "Cities.findAll", query = "SELECT c FROM Cities c"), |


| private Cities cities; public void setCities(Cities cities) { this.cities = cities; } |
| <managed-bean> <managed-bean-name>cities</managed-bean-name> <managed-bean-class>server.Cities</managed-bean-class> <managed-bean-scope>request</managed-bean-scope> </managed-bean> <managed-bean> <managed-bean-name>dbUtil</managed-bean-name> <managed-bean-class>server.DatabaseUtil</managed-bean-class> <managed-bean-scope>request</managed-bean-scope> <managed-property> <property-name>cities</property-name> <value>#{cities}</value> </managed-property> </managed-bean> |
|
@PersistenceContext(unitName="CitiesPU") private EntityManager entityManager; @Resource UserTransaction utx; |
| public
Collection<Cities> getAllCities() { Collection<Cities> allCities = new ArrayList<Cities>(); List list = entityManager.createNamedQuery("Cities.findAll").getResultList(); for (int i = 0; i < list.size(); i++) { allCities.add((Cities)list.get(i)); } return allCities; } |
| public String saveCity() throws
NotSupportedException, SystemException, RollbackException,
HeuristicMixedException, HeuristicRollbackException { utx.begin(); entityManager.persist(cities); utx.commit(); return "submit"; } |



| <h2>Detail</h2> <h:form> <h:panelGrid columns="2"> <h:outputText value="Id:"/> <h:outputText value="#{anInstanceOfserver.Cities.id}" title="Id" /> <h:outputText value="CityName:"/> <h:outputText value="#{anInstanceOfserver.Cities.cityName}" title="CityName" /> <h:outputText value="CountryName:"/> <h:outputText value="#{anInstanceOfserver.Cities.countryName}" title="CountryName" /> </h:panelGrid> </h:form> |
| <h2>Detail</h2> <h:form> <h:panelGrid columns="2"> <h:outputText value="CityName:"/> <h:inputText value="#{cities.cityName}" title="CityName" id="cityName" required="true"/> <h:outputText value="CountryName:"/> <h:inputText value="#{cities.countryName}" title="CountryName" id="countryName" required="true"/> </h:panelGrid> </h:form> |
| <h:commandButton action="#{dbUtil.saveCity}" value="submit"/> |
| <br><br> <h:message for="cityName" showSummary="true" showDetail="false" style="color: red"/><br> <h:message for="countryName" showSummary="true" showDetail="false" style="color: red"/> |
| <%@taglib prefix="f"
uri="http://java.sun.com/jsf/core"%> <%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%> |

| <f:view> <h:form> <h1><h:outputText value="List"/></h1> <h:dataTable value="#{arrayOrCollectionOfserver.Cities}" var="item"> <h:column> <f:facet name="header"> <h:outputText value="Id"/> </f:facet> <h:outputText value=" #{item.id}"/> </h:column> <h:column> <f:facet name="header"> <h:outputText value="CityName"/> </f:facet> <h:outputText value=" #{item.cityName}"/> </h:column> <h:column> <f:facet name="header"> <h:outputText value="CountryName"/> </f:facet> <h:outputText value=" #{item.countryName}"/> </h:column> </h:dataTable> </h:form> </f:view> |
| <h:dataTable value="#{dbUtil.allCities}" var="item"> |
| <h:form> <h:commandButton action="back" value="back"/> </h:form> |

|
<navigation-rule> <from-view-id>/welcomeJSF.jsp</from-view-id> <navigation-case> <from-outcome>submit</from-outcome> <to-view-id>/result.jsp</to-view-id> </navigation-case> </navigation-rule> <navigation-rule> <from-view-id>/result.jsp</from-view-id> <navigation-case> <from-outcome>back</from-outcome> <to-view-id>/welcomeJSF.jsp</to-view-id> </navigation-case> </navigation-rule> |




Posted by Arun Gupta in web2.0 | Comments[21]
|
|
|
|
|
Tuesday August 19, 2008
Jacob Kessler
is a new
hire in GlassFish
Scripting team and is blogging, welcome Jacob!
Read
how he will apply Aritificial Intelligence prinicples for dynamic
configuration of JRuby runtime pools in GlassFish :)
Technorati: glassfish
rubyonrails
dynamiclanguages
Posted by Arun Gupta in General | Comments[0]
|
|
|
|
| LOTD #3: Rails 2.2 going multi-threaded
Rails 2.2 is
slated to become
multi-threaded. What does it mean for
JRuby users ? Charles Nutter explains it:
Q/A:
What Thread-Safe Rails Means
One of the key points from the blog is:
Rails deployments on
JRuby will use 1/Nth the amount of memory they use
now, where N is the number of thread-unsafe Rails instances currently
required to handle concurrent requests. Even compared to green-threaded
implementations running thread-safe Rails, it willl likely use 1/Mth
the memory where M is the number of cores, since it can parallelize
happily across cores with only "one" instance.
NetBeans
development and GlassFish
deployment already provide an ideal
environment for Rails deployment.
All previous entries in this series are archived at LOTD.
Technorati: lotd
rubyonrails
jruby ruby netbeans
glassfish
Posted by Arun Gupta in web2.0 | Comments[0]
|
|
|
|
|
Monday August 18, 2008
TOTD# 41: How I created transparent logo of GlassFish using Gimp ?
I followed the original
instructions with Gimp 2.4.5.



Posted by Arun Gupta in General | Comments[3]
|
|
|
|
|
Sunday August 17, 2008
Here are my typical road running routes:
Use GMaps Pedometer to create your own! And while you are at it, here are some useful articles ...Posted by Arun Gupta in Running | Comments[0]
|
|
|
|
|
Friday August 15, 2008
LOTD #2: Phobos - MVC framework based on JavaScript
Phobos is a
lightweight, scripting-friendly, web application environment running on
the Java platform. It provides a complete MVC framework where
Controller is a JavaScript class, View is an Embedded JavaScript (EJS)
file and Model is typically a mix of Java and JavaScript.
The tech tip explains how Phobos and jMaki can be used
to create a simple Ajax-enabled application using NetBeans tooling and GlassFish for
deployment.
Posted by Arun Gupta in web2.0 | Comments[2]
|
|
|
|
|
Today's Page Hits: 1467
Total # blog entries: 1002