<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>PlanetMysql.ru - информация о СУБД MySQL &#187; rails</title>
	<atom:link href="http://planetmysql.ru/category/rails/feed/" rel="self" type="application/rss+xml" />
	<link>http://planetmysql.ru</link>
	<description>Блог о самой популярной СУБД MySQL</description>
	<lastBuildDate>Fri, 10 Feb 2012 22:53:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>DbCharmer 1.7.0 Release: Rails 3.0 Support and Forced Slave Reads</title>
		<link>http://feedproxy.google.com/~r/Homo-Adminus/~3/3Legwu10f_g/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=dbcharmer-1-7-0-release-rails-3-0-support-and-forced-slave-reads</link>
		<comments>http://feedproxy.google.com/~r/Homo-Adminus/~3/3Legwu10f_g/#comments</comments>
		<pubDate>Thu, 01 Sep 2011 00:46:58 +0000</pubDate>
		<dc:creator>Alexey Kovyrin</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[DbCharmer]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[My Projects]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[sharding]]></category>

		<guid isPermaLink="false">http://kovyrin.net/?p=526</guid>
		<description><![CDATA[This week, after 3 months in the works, we&#8217;ve finally released version 1.7.0 of DbCharmer ruby gem &#8211; Rails plugin that significantly extends ActiveRecord’s ability to work with multiple databases and/or database servers by adding features like multiple databases support, master/slave topologies support, sharding, etc. 
New features in this release: 

Rails 3.0 support. We&#8217;ve worked really hard to bring all the features we supported in Rails 2.X to the new version of Rails and now I&#8217;m proud that we&#8217;ve implemented them all and the implementation looks much cleaner and more universal (all kinds of relations in rails 3 work in exactly the same way and we do not need to implement connection switching for all kinds of weird corner-cases in ActiveRecord).
Forced Slave Reads functionality. Now we could have models with slaves that are not used by default, but could be turned on globally (per-controller, per-action or in a block). This is a new feature that brings our master/slave routing capabilities to a really new level &#8211; we could now use it for  a really mission-critical models on demand and not be afraid of breaking major functionality of our applications by switching them to slave reads. 
Lots of changes were made in the structure of our code and tests to make sure it would be much easier for new developers to understand DbCharmer internals and make changes in its code. 

Along with the new release we&#8217;ve got a brand new web site. You can find much better, cleaner and, most importantly, correct documentation for the library on the web site. We&#8217;ll be adding more examples, will try to add more in-depth explanation of our core functions, etc. 
If you have any questions about the release, feel free to ask them in our new mailing list: DbCharmer Users Group. 
For more updates in our releases, you can follow @DbCharmer on Twitter.]]></description>
			<content:encoded><![CDATA[<p>This week, after 3 months in the works, we&#8217;ve finally released version 1.7.0 of <a href="https://rubygems.org/gems/db-charmer">DbCharmer</a> ruby gem &#8211; Rails plugin that significantly extends ActiveRecord’s ability to work with multiple databases and/or database servers by adding features like multiple databases support, master/slave topologies support, sharding, etc. </p>
<p>New features in this release: </p>
<ul>
<li><strong>Rails 3.0 support.</strong> We&#8217;ve worked really hard to bring all the features we supported in Rails 2.X to the new version of Rails and now I&#8217;m proud that we&#8217;ve implemented them all and the implementation looks much cleaner and more universal (all kinds of relations in rails 3 work in exactly the same way and we do not need to implement connection switching for all kinds of weird corner-cases in ActiveRecord).</li>
<li><strong>Forced Slave Reads functionality</strong>. Now we could have models with slaves that are not used by default, but could be turned on globally (per-controller, per-action or in a block). This is a new feature that brings our master/slave routing capabilities to a really new level &#8211; we could now use it for  a really mission-critical models on demand and not be afraid of breaking major functionality of our applications by switching them to slave reads. </li>
<li>Lots of changes were made in the <strong>structure of our code and tests</strong> to make sure it would be much easier for new developers to understand DbCharmer internals and make changes in its code. </li>
</ul>
<p>Along with the new release we&#8217;ve got a <a href="http://kovyrin.github.com/db-charmer/">brand new web site</a>. You can find much better, cleaner and, most importantly, correct documentation for the library on the web site. We&#8217;ll be adding more examples, will try to add more in-depth explanation of our core functions, etc. </p>
<p>If you have any questions about the release, feel free to ask them in our new mailing list: <a href="http://groups.google.com/group/db-charmer">DbCharmer Users Group</a>. </p>
<p><strong>For more updates in our releases, you can follow <a href="http://twitter.com/#!/DbCharmer">@DbCharmer</a> on Twitter.</strong></p>

<p><a href="http://feedads.g.doubleclick.net/~a/a8INx0JT6w6oqO_mP7jLj5Iyv30/0/da"><img src="http://feedads.g.doubleclick.net/~a/a8INx0JT6w6oqO_mP7jLj5Iyv30/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/a8INx0JT6w6oqO_mP7jLj5Iyv30/1/da"><img src="http://feedads.g.doubleclick.net/~a/a8INx0JT6w6oqO_mP7jLj5Iyv30/1/di" border="0" ismap="true"></img></a></p><div>
<a href="http://feeds.feedburner.com/~ff/Homo-Adminus?a=3Legwu10f_g:Xmz9rMRIRxg:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/Homo-Adminus?i=3Legwu10f_g:Xmz9rMRIRxg:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Homo-Adminus?a=3Legwu10f_g:Xmz9rMRIRxg:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/Homo-Adminus?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Homo-Adminus?a=3Legwu10f_g:Xmz9rMRIRxg:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Homo-Adminus?i=3Legwu10f_g:Xmz9rMRIRxg:V_sGLiPBpWU" border="0"></img></a>
</div><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=29860&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=29860&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2011/09/01/dbcharmer-1-7-0-release-rails-3-0-support-and-forced-slave-reads/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>On Password Strength</title>
		<link>http://openquery.com/blog/password-strength?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=on-password-strength</link>
		<comments>http://openquery.com/blog/password-strength#comments</comments>
		<pubDate>Thu, 11 Aug 2011 00:38:41 +0000</pubDate>
		<dc:creator>Open Query</dc:creator>
				<category><![CDATA[application]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[entropy]]></category>
		<category><![CDATA[Good practice / Bad practice]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[MariaDB]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[xkcd]]></category>

		<guid isPermaLink="false">http://openquery.com/blog/?p=1520</guid>
		<description><![CDATA[XKCD (as usual) makes a very good point &#8211; this time about password strength, and I reckon it&#8217;s something app developers need to consider urgently. Geeks can debate the exact amount of entropy, but that&#8217;s not really the issue: insisting on mixed upper/lower and/or non-alpha and/or numerical components to a user password does not really improve security, and definitely makes life more difficult for users.
So basically, the functions that do a &#8220;is this a strong password&#8221; should seriously reconsider their approach, particularly if they&#8217;re used to have the app decide whether to accept the password as &#8220;good enough&#8221; at all.]]></description>
			<content:encoded><![CDATA[<p><a href="http://xkcd.com/936/" >XKCD</a> (as usual) makes a very good point &#8211; this time about password strength, and I reckon it&#8217;s something app developers need to consider urgently. Geeks can debate the exact amount of entropy, but that&#8217;s not really the issue: insisting on mixed upper/lower and/or non-alpha and/or numerical components to a user password does not really improve security, and definitely makes life more difficult for users.</p>
<p>So basically, the functions that do a &#8220;is this a strong password&#8221; should seriously reconsider their approach, particularly if they&#8217;re used to have the app decide whether to accept the password as &#8220;good enough&#8221; at all.</p>
<p><a href="http://xkcd.com/936/" ><img class="alignnone" src="http://imgs.xkcd.com/comics/password_strength.png" alt="" width="518" height="421" /></a></p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=29671&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=29671&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2011/08/11/on-password-strength/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Encoding and JRuby on Rails</title>
		<link>http://tomasmuller.com.br/2011/02/28/encoding-and-jruby-on-rails/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=encoding-and-jruby-on-rails</link>
		<comments>http://tomasmuller.com.br/2011/02/28/encoding-and-jruby-on-rails/#comments</comments>
		<pubDate>Tue, 01 Mar 2011 00:45:02 +0000</pubDate>
		<dc:creator>Tom&#225;s Augusto M&#252;ller</dc:creator>
				<category><![CDATA[JRuby]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://tomasmuller.com.br/?p=621</guid>
		<description><![CDATA[Studing JRuby and Rails, I faced some encoding problems. The solution was very easy. First you must have to create your database using utf8 character set. In case you are using MySQL, just do the following:
CREATE DATABASE `yourdatabasename` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;

or
ALTER DATABASE yourdatabasename CHARACTER SET utf8 COLLATE utf8_general_ci;

If you already have a database with records, read this post from @akitaonrails.
In my case, I&#8217;m using the activerecord-jdbc-adapter gem, and connecting to the database through the MySQL JDBC Connector.
At this time, I just have downloaded the JDBC driver (.jar file), and copied to $JRUBY_HOME/lib folder (if you are using RVM, find the JRuby installation folder using the rvm debug or rvm info command).
Lastly, I just have set the following parameters into connection string (in database.yml file):
jdbc:mysql://localhost:3306/yourdatabasename?characterSetResults=UTF-8&#38;characterEncoding=UTF-8&#38;useUnicode=yes
Maybe this will be useful to someone.
See ya!
&#160;]]></description>
			<content:encoded><![CDATA[<p>Studing JRuby and Rails, I faced some encoding problems. The solution was very easy. First you must have to create your database using utf8 character set. In case you are using MySQL, just do the following:</p>
<pre>CREATE DATABASE `yourdatabasename` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
</pre>
<p>or</p>
<pre>ALTER DATABASE yourdatabasename CHARACTER SET utf8 COLLATE utf8_general_ci;
</pre>
<p>If you already have a database with records, read <a title="http://akitaonrails.com/2010/01/01/convertendo-meu-banco-de-latin1-para-utf-8" href="http://akitaonrails.com/2010/01/01/convertendo-meu-banco-de-latin1-para-utf-8">this post</a> from <a href="http://twitter.com/akitaonrails">@akitaonrails</a>.</p>
<p>In my case, I&#8217;m using the <a href="https://github.com/nicksieger/activerecord-jdbc-adapter">activerecord-jdbc-adapter</a> gem, and connecting to the database through the <a href="http://www.mysql.com/downloads/connector/j/">MySQL JDBC Connector</a>.</p>
<p>At this time, I just have downloaded the JDBC driver (.jar file), and copied to $JRUBY_HOME/lib folder (if you are using RVM, find the JRuby installation folder using the rvm debug or rvm info command).</p>
<p>Lastly, I just have set the following parameters into connection string (in database.yml file):</p>
<pre>jdbc:mysql://localhost:3306/yourdatabasename?characterSetResults=UTF-8&amp;characterEncoding=UTF-8&amp;useUnicode=yes</pre>
<p>Maybe this will be useful to someone.<br />
See ya!</p>
<p>&nbsp;</p><br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tomasmuller.wordpress.com/621/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tomasmuller.wordpress.com/621/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tomasmuller.wordpress.com/621/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tomasmuller.wordpress.com/621/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/tomasmuller.wordpress.com/621/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/tomasmuller.wordpress.com/621/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/tomasmuller.wordpress.com/621/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/tomasmuller.wordpress.com/621/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tomasmuller.wordpress.com/621/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tomasmuller.wordpress.com/621/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tomasmuller.wordpress.com/621/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tomasmuller.wordpress.com/621/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tomasmuller.wordpress.com/621/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tomasmuller.wordpress.com/621/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tomasmuller.com.br&amp;blog=4832129&amp;post=621&amp;subd=tomasmuller&amp;ref=&amp;feed=1" width="1" height="1" />
<p><a href="http://feedads.g.doubleclick.net/~a/wTejzv30lirU1O5UyC0kcYXLkD8/0/da"><img src="http://feedads.g.doubleclick.net/~a/wTejzv30lirU1O5UyC0kcYXLkD8/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/wTejzv30lirU1O5UyC0kcYXLkD8/1/da"><img src="http://feedads.g.doubleclick.net/~a/wTejzv30lirU1O5UyC0kcYXLkD8/1/di" border="0" ismap="true"></img></a></p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=27461&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=27461&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2011/03/01/encoding-and-jruby-on-rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TOTD #150: Collection of GlassFish, NetBeans, JPA, JSF, JAX-WS, EJB, Jersey, MySQL, Rails, Eclipse, and OSGi tips</title>
		<link>http://blogs.sun.com/arungupta/entry/totd_150_collection_of_glassfish?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=totd-150-collection-of-glassfish-netbeans-jpa-jsf-jax-ws-ejb-jersey-mysql-rails-eclipse-and-osgi-tips</link>
		<comments>http://blogs.sun.com/arungupta/entry/totd_150_collection_of_glassfish#comments</comments>
		<pubDate>Thu, 18 Nov 2010 14:00:23 +0000</pubDate>
		<dc:creator>Arun Gupta</dc:creator>
				<category><![CDATA[eclipse]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[glassfish]]></category>
		<category><![CDATA[jaxws]]></category>
		<category><![CDATA[jersey]]></category>
		<category><![CDATA[jpa]]></category>
		<category><![CDATA[jsf]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[netbeans]]></category>
		<category><![CDATA[osgi]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[totd]]></category>

		<guid isPermaLink="false">http://blogs.sun.com/arungupta/entry/totd_150_collection_of_glassfish</guid>
		<description><![CDATA[This is the 150th tip published on this blog so decided to make it a collection of all the previous ones. Here is a tag cloud (created from wordle.net/create) from title of all the tips:

As expected GlassFish is the most prominent topic. And then there are several entries on NetBeans, JRuby/Rails, several Java EE 6 technologies like JPA, JAX-WS, JAX-RS, EJB, and JSF, and more entries on Eclipse, OSGi and some other tecnhologies too. Here is a complete collection of all the tips published so far:

    #149: How to clean IntelliJ cache, preferences, etc on Mac OS X ?
    #148: JPA2 Metamodel Classes in NetBeans 7.0 - Writing type-safe Criteria API
    #147: Java Server Faces 2.0 Composite Components using NetBeans - DRY your code
    #146: Understanding the EJB 3.1 Timer service in Java EE 6 - Programmatic, Deployment Descriptor, @Schedule
    #145: CDI Events - a light-weight producer/consumer in Java EE 6
    #144: CDI @Produces for container-managed @Resource
    #143: Retrieve Twitter user timeline using using Jersey and OAuth
    #142: GlassFish 3.1 - SSH Provisioning and Start/Stop instance/cluster on local/remote machines
    #141: Running GlassFish 3.1 on Ubuntu 10.04 AMI on Amazon EC2
    #140: Moving GlassFish Installation - Referenced file does not exist &#34;osgi-main.jar&#34;
    #139: Asynchronous Request Processing using Servlets 3.0 and Java EE 6
    #138: GlassFish 3.1 Milestone 1 - Clustering and Application Versioning Demos
    #137: Asynchronous EJB, a light-weight JMS solution - Feature-rich Java EE 6
    #136: Default Error Page using Servlets 3.0 - Improved productivity using Java EE 6
    #135: JSF2 Composite Components using NetBeans IDE - lightweight Java EE 6
    #134: Interceptors 1.1 in Java EE 6 - What and How ?
    #133: JPA2 (JPQL &#38; Criteria), JavaDB, and embedded GlassFish - perfect recipe for testing
    #132: Servlets 3.0 in Embedded GlassFish Reloaded - lightweight Java EE 6
    #131: Dynamic OSGi services in GlassFish - Using ServiceTracker
    #130: Invoking a OSGi service from a JAX-WS Endpoint - OSGi and Enterprise Java
    #129: Managed Beans 1.0 in Java EE 6 - What and How ?
    #128: EJBContainer.createEJBContainer: Embedded EJB using GlassFish v3
    #127: Embedding GlassFish in an existing OSGi runtime - Eclipse Equinox
    #126: Creating an OSGi bundles using Eclipse and deploying in GlassFish
    #125: Creating an OSGi bundles using NetBeans and deploying in GlassFish
    #124: OSGi Declarative Services in GlassFish - Accessed from a Java EE client
    #124: Using CDI + JPA with JAX-RS and JAX-WS
    #123: f:ajax, Bean Validation for JSF, CDI for JSF and JPA 2.0 Criteria API - all in one Java EE 6 sample application
    #122: Creating a JPA Persistence Unit using NetBeans 6.8
    #121: JDBC resource for MySQL and Oracle sample database in GlassFish v3
    #120: Deployment Descriptor-free Java EE 6 application using JSF 2.0 + EJB 3.1 + Servlets 3.0
    #119: Telnet to GlassFish v3 with NetBeans 6.8 - &#34;Could not open connection to the host&#34;
    #118: Managing OSGi bundles in GlassFish v3 - asadmin, filesystem, telnet console, web browser, REST, osgish
    #117: Invoke a JAX-WS Web service from a Rails app deployed in GlassFish
    #116: GlassFish v3 Administration using JavaFX front-end - JNLP available
    #115: GlassFish in Eclipse - Integrated Bundle, Install Stand-alone or Update Existing plugin
    #114: How to enable Java Console in Mac OS X, Windows, ... ?
    #113: JavaFX front-end for GlassFish v3 Administration - Using REST interface
    #112: Exposing Oracle database tables as RESTful entities using JAX-RS, GlassFish, and NetBeans
    #111: Rails Scaffold for a pre-existing table using Oracle and GlassFish
    #110: JRuby on Rails application using Oracle on GlassFish
    #109: How to convert a JSF managed bean to JSR 299 bean (Web Beans) ?
    #108: Java EE 6 web application (JSF 2.0 + JPA 2.0 + EJB 3.1) using Oracle, NetBeans, and GlassFish
    #107: Connect to Oracle database using NetBeans
    #106: How to install Oracle Database 10g on Mac OS X (Intel) ?
    TOTD #105: GlassFish v3 Monitoring – How to monitor a Rails app using asadmin, JavaScript, jConsole, REST ?
    #104: Popular Ruby-on-Rails applications on GlassFish v3 – Redmine, Typo, Substruct
    #103: GlassFish v3 with different OSGi runtimes – Felix, Equinox, and Knoplerfish
    #102: Java EE 6 (Servlet 3.0 and EJB 3.1) wizards in Eclipse
    #101: Applying Servlet 3.0/Java EE 6 “web-fragment.xml” to Lift – Deploy on GlassFish v3
    #100: Getting Started with Scala Lift on GlassFish v3
    #99: Creating a Java EE 6 application using MySQL, JPA 2.0 and Servlet 3.0 with GlassFish Tools Bundle for Eclipse
    #98: Create a Metro JAX-WS Web service using GlassFish Tools Bundle for Eclipse
    #97: GlassFish Plugin with Eclipse 3.5
    #96: GlassFish v3 REST Interface to Monitoring and Management - JSON, XML, and HTML representations
    #95: EJB 3.1 + Java Server Faces 2.0 + JPA 2.0 web application - Getting Started with Java EE 6 using NetBeans 6.8 M1 &#38; GlassFish v3
    #94: A simple Java Server Faces 2.0 + JPA 2.0 application - Getting Started with Java EE 6 using NetBeans 6.8 M1 &#38; GlassFish v3
    #93: Getting Started with Java EE 6 using NetBeans 6.8 M1 &#38; GlassFish v3 - A simple Servlet 3.0 + JPA 2.0 app
    #92: Session Failover for Rails applications running on GlassFish
    #91: Applying Java EE 6 &#34;web-fragment.xml&#34; to Apache Wicket - Deploy on GlassFish v3
    #90: Migrating from Wicket 1.3.x to 1.4 - &#34;Couldn't load DiskPageStore index from file&#34; error
    #89: How to add pagination to an Apache Wicket application
    #88: How add pagination to Rails - will_paginate
    #87: How to fix the error undefined method `new' for &#34;Rack::Lock&#34;:String caused by Warbler/JRuby-Rack ?
    #86: Getting Started with Apache Wicket on GlassFish
    #85: Getting Started with Django Applications on GlassFish v3
    #84: Using Apache + mod_proxy_balancer to load balance Ruby-on-Rails running on GlassFish
    #83: Eclipse Tools Bundle for GlassFish 1.0 - Now Available!
    #82: Getting Started with Servlet 3.0 and EJB 3.1 in Java EE 6 using NetBeans 6.7
    #81: How to use nginx to load balance a cluster of GlassFish Gem ?
    #80: Sinatra CRUD application using Haml templates with JRuby and GlassFish Gem
    #79: Getting Started with Sinatra applications on JRuby and GlassFish Gem
    #78: GlassFish, EclipseLink, and MySQL efficient pagination using LIMIT
    #77: Running Seam examples with GlassFish
    #76: JRuby 1.2, Rails 2.3, GlassFish Gem 0.9.3, ActiveRecord JDBC Adapter 0.9.1 - can they work together ?
    #75: Getting Started with Grails using GlassFish v3 Embedded
    #74: JRuby and GlassFish Integration Test #5: JRuby 1.2.0 RC2 + Rails 2.x.x + GlassFish + Redmine
    #73: JRuby and GlassFish Integration Test #4: JRuby 1.2.0 RC2 + Rails 2.2.x + GlassFish v2 + Warbler
    #72: JRuby and GlassFish Integration Test #3: JRuby 1.2.0 RC2 + Rails 2.2.x + GlassFish v3
    #71: JRuby and GlassFish Integration Test #2: JRuby 1.2.0 RC1 + Rails 2.2.x + GlassFish v3 Prelude
    #70: JRuby and GlassFish Integration Test# 1: JRuby 1.2.0 RC1 + Rails 2.2.x + GlassFish Gem
    #69: GlassFish High Availability/Clustering using Sun Web Server + Load Balancer Plugin on Windows Vista
    #68: Installing Zones in Open Solaris 2008/11 on Virtual Box
    #67: How to front-end a GlassFish Cluster with Apache + mod_jk on Mac OSX Leopard ?
    #66: GlassFish Eclipse Plugin 1.0.16 - Install v3 Prelude from the IDE
    #65: Windows 7 Beta 1 Build 7000 on Virtual Box: NetBeans + Rails + GlassFish + MySQL
    #64: OpenSolaris 2008/11 using Virtual Box
    #63: jmx4r gem - How to manage/monitor your Rails/Merb applications on JRuby/GlassFish ?
    #62: How to remotely manage/monitor your Rails/Merb applications on JRuby/GlassFish using JMX API ?
    #61: How to locally manage/monitor your Rails/Merb applications on JRuby/GlassFish using JMX ?
    #60: Configure MySQL 6.0.x-alpha to NetBeans 6.5
    #59: How to add Twitter feeds to blogs.sun.com ? + Other Twitter Tools
    #58: Jersey and GlassFish - how to process POST requests ?
    #57: Jersey Client API - simple and easy to use
    #56: Simple RESTful Web service using Jersey and Embeddable GlassFish - Text and JSON output
    #55: How to build GlassFish v3 Gem ?
    #54: Java Server Faces with Eclipse IDE
    #53: Scaffold in Merb using JRuby/GlassFish
    #52: Getting Started with Merb using GlassFish Gem
    #51: Embedding Google Maps in Java Server Faces using GMaps4JSF
    #50: Mojarra 2.0 EDR2 is now available - Try them with GlassFish v3 and NetBeans 6.5
    #49: Converting a JSF 1.2 application to JSF 2.0 - @ManagedBean
    #48: Converting a JSF 1.2 application to JSF 2.0 - Facelets and Ajax
    #47: Getting Started with Mojarra 2.0 nightly on GlassFish v2
    #46: Facelets with Java Server Faces 1.2
    #45: Ajaxifying Java Server Faces using JSF Extensions
    #44: JDBC Connection Pooling for Rails on GlassFish v3
    #43: GlassFish v3 Build Flavors
    #42: Hello JavaServer Faces World with NetBeans and GlassFish
    #41: How I created transparent logo of GlassFish using Gimp ?
    #40: jQuery Autcomplete widget with MySQL, GlassFish, NetBeans
    #39: Prototype/Script.aculo.us Autcomplete widget with MySQL, GlassFish, NetBeans
    #38: Creating a MySQL Persistence Unit using NetBeans IDE
    #37: SQLite3 with Ruby-on-Rails on GlassFish Gem
    #36: Writing First Test for a Rails Application
    #35: Rails Database Connection on Solaris
    #34: Using Felix Shell with GlassFish
    #33: Building GlassFish v3 Workspace
    #32: Rails Deployment on GlassFish v3 from NetBeans IDE
    #31: CRUD Application using Grails - Hosted on GlassFish and MySQL
    #30: CRUD Application using Grails - Hosted on Jetty and HSQLDB
    #29: Enabling &#34;Available Plugins&#34; tab in NetBeans IDE
    #28: Getting Started with Rails 2.0 Scaffold
    #27: Configurable Multiple Ruby Platforms in NetBeans 6.1 M1
    #26: Overriding Database Defaults in Rails 2.0.2
    #25: Rails application with PostgreSQL database using NetBeans
    #24: Getting Started with Rails 2.0.x in JRuby 1.0.3 and JRuby 1.1RC1
    #23: JavaFX Client invoking a Metro endpoint
    #22: Java SE client for a Metro endpoint
    #21: Metro 1.1 with GlassFish v2 UR1 and NetBeans 6
    #20: How to create a new jMaki widget ?
    #19: How to Add Metro Quality-of-Service to Contract-First Endpoint ?
    #18: How to Build The GlassFish v3 Gem for JRuby ?
    #17: Backing Up your Blog Posts on Roller
    #16: Optimizing Metro Stubs by locally packaging the WSDL
    #15: Delete/Update Row from Database using jMaki Data Table
    #14: How to generate JRuby-on-Rails Controller on Windows (#9893)
    #13: Setup Mongrel for JRuby-on-Rails applications on Windows
    #12: Invoking a Java EE 5 Web service endpoint from JRuby
    #11: Setup Mongrel cluster for JRuby-on-Rails applications on Unix
    #10: Consuming JSON and XML representations generated by a Jersey endpoint in a jMaki Table widget
    #9: Using JDBC connection pool/JNDI name from GlassFish in Rails Application
    #8: Generating JSON using JAXB annotations in Jersey
    #7: Switch between JRuby and CRuby interpreter in NetBeans 6
    #6: Difference between Ruby Gem and Rails Plugin
    #5: Loading data from beans in jMaki widgets
    #4: How to convert a Session EJB to a Web service ?
    #3: Using JavaDB with JRuby on Rails
    #2: Change the endpoint address on a pre-generated Web services Stub
    #1: SOAP Messaging Logging in Metro

Just for fun, here is another tag cloud:

You can access all the tips here. And keep those suggestions coming!
Technorati: totd glassfish netbeans jpa jsf jaxws jersey mysql rails osgi eclipse]]></description>
			<content:encoded><![CDATA[<p>This is the 150th tip published on <a href="http://blogs.sun.com/arungupta">this blog</a> so decided to make it a collection of all <a href="http://blogs.sun.com/arungupta/tags/totd">the previous ones</a>. Here is a tag cloud (created from <a href="http://wordle.net/create">wordle.net/create</a>) from title of all the tips:</p>
<p><img height="259" style="margin: 5px" width="700" alt="" src="http://blog.arungupta.me/wp-content/uploads/2010/11/totd150-tag-cloud.png" /></p>
<p>As expected <a href="http://glassfish.org">GlassFish</a> is the most prominent topic. And then there are several entries on NetBeans, JRuby/Rails, several Java EE 6 technologies like JPA, JAX-WS, JAX-RS, EJB, and JSF, and more entries on Eclipse, OSGi and some other tecnhologies too. Here is a complete collection of all the tips published so far:</p>
<ul>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_149_how_to_clean">#149: How to clean IntelliJ cache, preferences, etc on Mac OS X ?</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_148_jpa2_metamodel_classes">#148: JPA2 Metamodel Classes in NetBeans 7.0 - Writing type-safe Criteria API</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_147_java_server_faces">#147: Java Server Faces 2.0 Composite Components using NetBeans - DRY your code</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_146_understanding_the_ejb">#146: Understanding the EJB 3.1 Timer service in Java EE 6 - Programmatic, Deployment Descriptor, @Schedule</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_145_cdi_events_a">#145: CDI Events - a light-weight producer/consumer in Java EE 6</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_144_cdi_produces_for">#144: CDI @Produces for container-managed @Resource</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_143_retrieve_twitter_user">#143: Retrieve Twitter user timeline using using Jersey and OAuth</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/ttod_142_glassfish_3_1">#142: GlassFish 3.1 - SSH Provisioning and Start/Stop instance/cluster on local/remote machines</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_141_running_glassfish_3">#141: Running GlassFish 3.1 on Ubuntu 10.04 AMI on Amazon EC2</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_140_moving_glassfish_installation">#140: Moving GlassFish Installation - Referenced file does not exist &quot;osgi-main.jar&quot;</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_139_asynchronous_request_processing">#139: Asynchronous Request Processing using Servlets 3.0 and Java EE 6</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_138_glassfish_3_1">#138: GlassFish 3.1 Milestone 1 - Clustering and Application Versioning Demos</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_137_asynchronous_ejb_a">#137: Asynchronous EJB, a light-weight JMS solution - Feature-rich Java EE 6</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_136_default_error_page">#136: Default Error Page using Servlets 3.0 - Improved productivity using Java EE 6</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_135_jsf2_custom_components">#135: JSF2 Composite Components using NetBeans IDE - lightweight Java EE 6</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_134_interceptors_1_1">#134: Interceptors 1.1 in Java EE 6 - What and How ?</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_133_jpa2_jpql_criteria">#133: JPA2 (JPQL &amp; Criteria), JavaDB, and embedded GlassFish - perfect recipe for testing</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_132_servlets_3_0">#132: Servlets 3.0 in Embedded GlassFish Reloaded - lightweight Java EE 6</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_131_dynamic_osgi_services">#131: Dynamic OSGi services in GlassFish - Using ServiceTracker</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_130_invoking_a_osgi">#130: Invoking a OSGi service from a JAX-WS Endpoint - OSGi and Enterprise Java</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_129_managed_beans_1">#129: Managed Beans 1.0 in Java EE 6 - What and How ?</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_128_ejbcontainer_createejbcontainer_embedded">#128: EJBContainer.createEJBContainer: Embedded EJB using GlassFish v3</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_127_embedding_glassfish_in">#127: Embedding GlassFish in an existing OSGi runtime - Eclipse Equinox</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_126_creating_an_osgi">#126: Creating an OSGi bundles using Eclipse and deploying in GlassFish</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_125_creating_an_osgi">#125: Creating an OSGi bundles using NetBeans and deploying in GlassFish</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_124_osgi_declarative_services">#124: OSGi Declarative Services in GlassFish - Accessed from a Java EE client</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_124_using_cdi_jpa">#124: Using CDI + JPA with JAX-RS and JAX-WS</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_123_f_ajax_bean">#123: f:ajax, Bean Validation for JSF, CDI for JSF and JPA 2.0 Criteria API - all in one Java EE 6 sample application</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_122_creating_a_jpa">#122: Creating a JPA Persistence Unit using NetBeans 6.8</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/ttd_121_jdbc_resource_for">#121: JDBC resource for MySQL and Oracle sample database in GlassFish v3</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_120_deployment_descriptor_free">#120: Deployment Descriptor-free Java EE 6 application using JSF 2.0 + EJB 3.1 + Servlets 3.0</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_119_telnet_to_glassfish">#119: Telnet to GlassFish v3 with NetBeans 6.8 - &quot;Could not open connection to the host&quot;</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_118_managing_osgi_bundles">#118: Managing OSGi bundles in GlassFish v3 - asadmin, filesystem, telnet console, web browser, REST, osgish</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_117_invoke_a_jax">#117: Invoke a JAX-WS Web service from a Rails app deployed in GlassFish</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_116_glassfish_v3_administration">#116: GlassFish v3 Administration using JavaFX front-end - JNLP available</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_115_glassfish_in_eclipse">#115: GlassFish in Eclipse - Integrated Bundle, Install Stand-alone or Update Existing plugin</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_114_how_to_enable">#114: How to enable Java Console in Mac OS X, Windows, ... ?</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_113_javafx_front_end">#113: JavaFX front-end for GlassFish v3 Administration - Using REST interface</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_112_exposing_oracle_database">#112: Exposing Oracle database tables as RESTful entities using JAX-RS, GlassFish, and NetBeans</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/http_blog_arungupta_me_2009">#111: Rails Scaffold for a pre-existing table using Oracle and GlassFish</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_110_jruby_on_rails">#110: JRuby on Rails application using Oracle on GlassFish</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_109_how_to_convert">#109: How to convert a JSF managed bean to JSR 299 bean (Web Beans) ?</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_108_java_ee_6">#108: Java EE 6 web application (JSF 2.0 + JPA 2.0 + EJB 3.1) using Oracle, NetBeans, and GlassFish</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_107_connect_to_oracle">#107: Connect to Oracle database using NetBeans</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_105_how_to_install">#106: How to install Oracle Database 10g on Mac OS X (Intel) ?</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_104_glassfish_v3_monitoring">TOTD #105: GlassFish v3 Monitoring – How to monitor a Rails app using asadmin, JavaScript, jConsole, REST ?</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/popular_ruby_on_rails_applications">#104: Popular Ruby-on-Rails applications on GlassFish v3 – Redmine, Typo, Substruct</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_103_glassfish_v3_with">#103: GlassFish v3 with different OSGi runtimes – Felix, Equinox, and Knoplerfish</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_102_java_ee_6">#102: Java EE 6 (Servlet 3.0 and EJB 3.1) wizards in Eclipse</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_101_applying_servlet_3">#101: Applying Servlet 3.0/Java EE 6 “web-fragment.xml” to Lift – Deploy on GlassFish v3</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_100_getting_started_with">#100: Getting Started with Scala Lift on GlassFish v3</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_99_creating_a_java">#99: Creating a Java EE 6 application using MySQL, JPA 2.0 and Servlet 3.0 with GlassFish Tools Bundle for Eclipse</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_98_create_a_metro">#98: Create a Metro JAX-WS Web service using GlassFish Tools Bundle for Eclipse</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_97_glassfish_plugin_with">#97: GlassFish Plugin with Eclipse 3.5</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_96_glassfish_v3_rest">#96: GlassFish v3 REST Interface to Monitoring and Management - JSON, XML, and HTML representations</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_95_ejb_3_1">#95: EJB 3.1 + Java Server Faces 2.0 + JPA 2.0 web application - Getting Started with Java EE 6 using NetBeans 6.8 M1 &amp; GlassFish v3</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_94_a_simple_java">#94: A simple Java Server Faces 2.0 + JPA 2.0 application - Getting Started with Java EE 6 using NetBeans 6.8 M1 &amp; GlassFish v3</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_93_getting_started_with">#93: Getting Started with Java EE 6 using NetBeans 6.8 M1 &amp; GlassFish v3 - A simple Servlet 3.0 + JPA 2.0 app</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_92_session_failover_for">#92: Session Failover for Rails applications running on GlassFish</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_91_applying_java_ee">#91: Applying Java EE 6 &quot;web-fragment.xml&quot; to Apache Wicket - Deploy on GlassFish v3</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_90_migrating_from_wicket">#90: Migrating from Wicket 1.3.x to 1.4 - &quot;Couldn't load DiskPageStore index from file&quot; error</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_89_how_to_add">#89: How to add pagination to an Apache Wicket application</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_88_how_add_pagination">#88: How add pagination to Rails - will_paginate</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_87_how_to_fix">#87: How to fix the error undefined method `new' for &quot;Rack::Lock&quot;:String caused by Warbler/JRuby-Rack ?</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_86_getting_started_with">#86: Getting Started with Apache Wicket on GlassFish</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_85_getting_started_with">#85: Getting Started with Django Applications on GlassFish v3</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_84_using_apache_mod">#84: Using Apache + mod_proxy_balancer to load balance Ruby-on-Rails running on GlassFish</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_82_eclipse_tools_bundle">#83: Eclipse Tools Bundle for GlassFish 1.0 - Now Available!</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_81_getting_started_with">#82: Getting Started with Servlet 3.0 and EJB 3.1 in Java EE 6 using NetBeans 6.7</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_81_how_to_use">#81: How to use nginx to load balance a cluster of GlassFish Gem ?</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_80_sinatra_crud_application">#80: Sinatra CRUD application using Haml templates with JRuby and GlassFish Gem</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_79_getting_started_with">#79: Getting Started with Sinatra applications on JRuby and GlassFish Gem</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_78_glassfish_eclipselink_and">#78: GlassFish, EclipseLink, and MySQL efficient pagination using LIMIT</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_77_running_seam_examples">#77: Running Seam examples with GlassFish</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_76_jruby_1_2">#76: JRuby 1.2, Rails 2.3, GlassFish Gem 0.9.3, ActiveRecord JDBC Adapter 0.9.1 - can they work together ?</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_75_getting_started_with">#75: Getting Started with Grails using GlassFish v3 Embedded</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_74_jruby_and_glassfish">#74: JRuby and GlassFish Integration Test #5: JRuby 1.2.0 RC2 + Rails 2.x.x + GlassFish + Redmine</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_73_jruby_and_glassfish">#73: JRuby and GlassFish Integration Test #4: JRuby 1.2.0 RC2 + Rails 2.2.x + GlassFish v2 + Warbler</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_72_jruby_and_glassfish">#72: JRuby and GlassFish Integration Test #3: JRuby 1.2.0 RC2 + Rails 2.2.x + GlassFish v3</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_71_jruby_and_glassfish">#71: JRuby and GlassFish Integration Test #2: JRuby 1.2.0 RC1 + Rails 2.2.x + GlassFish v3 Prelude</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_70_jruby_and_glassfish">#70: JRuby and GlassFish Integration Test# 1: JRuby 1.2.0 RC1 + Rails 2.2.x + GlassFish Gem</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_69_glassfish_high_availability">#69: GlassFish High Availability/Clustering using Sun Web Server + Load Balancer Plugin on Windows Vista</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_68_installing_zones_in">#68: Installing Zones in Open Solaris 2008/11 on Virtual Box</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_67_how_to_front">#67: How to front-end a GlassFish Cluster with Apache + mod_jk on Mac OSX Leopard ?</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_66_glassfish_eclipse_plugin">#66: GlassFish Eclipse Plugin 1.0.16 - Install v3 Prelude from the IDE</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_65_windows_7_beta">#65: Windows 7 Beta 1 Build 7000 on Virtual Box: NetBeans + Rails + GlassFish + MySQL</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_64_opensolaris_2008_11">#64: OpenSolaris 2008/11 using Virtual Box</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_63_jmx4r_gem_how">#63: jmx4r gem - How to manage/monitor your Rails/Merb applications on JRuby/GlassFish ?</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_62_how_to_remotely">#62: How to remotely manage/monitor your Rails/Merb applications on JRuby/GlassFish using JMX API ?</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_61_how_to_locally">#61: How to locally manage/monitor your Rails/Merb applications on JRuby/GlassFish using JMX ?</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_60_configure_mysql_6">#60: Configure MySQL 6.0.x-alpha to NetBeans 6.5</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_59_how_to_add">#59: How to add Twitter feeds to blogs.sun.com ? + Other Twitter Tools</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_58_jersey_and_glassfish">#58: Jersey and GlassFish - how to process POST requests ?</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_57_jersey_client_api">#57: Jersey Client API - simple and easy to use</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_56_simple_restful_web">#56: Simple RESTful Web service using Jersey and Embeddable GlassFish - Text and JSON output</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_55_how_to_build">#55: How to build GlassFish v3 Gem ?</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_54_java_server_faces">#54: Java Server Faces with Eclipse IDE</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_53_scaffold_in_merb">#53: Scaffold in Merb using JRuby/GlassFish</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/getting_started_with_merb_using">#52: Getting Started with Merb using GlassFish Gem</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_51_embedding_google_maps">#51: Embedding Google Maps in Java Server Faces using GMaps4JSF</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_50_mojarra_2_0">#50: Mojarra 2.0 EDR2 is now available - Try them with GlassFish v3 and NetBeans 6.5</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_49_converting_a_jsf">#49: Converting a JSF 1.2 application to JSF 2.0 - @ManagedBean</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_48_converting_a_jsf">#48: Converting a JSF 1.2 application to JSF 2.0 - Facelets and Ajax</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_47_getting_started_with">#47: Getting Started with Mojarra 2.0 nightly on GlassFish v2</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_46_facelets_with_java">#46: Facelets with Java Server Faces 1.2</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_45_ajaxifying_java_server">#45: Ajaxifying Java Server Faces using JSF Extensions</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_44_jdbc_connection_pooling">#44: JDBC Connection Pooling for Rails on GlassFish v3</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_43_glassfish_v3_build">#43: GlassFish v3 Build Flavors</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_42_hello_javaserver_faces">#42: Hello JavaServer Faces World with NetBeans and GlassFish</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_41_how_i_created">#41: How I created transparent logo of GlassFish using Gimp ?</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_40_jquery_autcomplete_widget">#40: jQuery Autcomplete widget with MySQL, GlassFish, NetBeans</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_39_prototype_script_aculo">#39: Prototype/Script.aculo.us Autcomplete widget with MySQL, GlassFish, NetBeans</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_38_creating_a_mysql">#38: Creating a MySQL Persistence Unit using NetBeans IDE</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_37_sqlite3_with_ruby">#37: SQLite3 with Ruby-on-Rails on GlassFish Gem</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_36_writing_first_test">#36: Writing First Test for a Rails Application</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_35_rails_database_connection">#35: Rails Database Connection on Solaris</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_34_using_felix_shell">#34: Using Felix Shell with GlassFish</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_33_building_glassfish_v3">#33: Building GlassFish v3 Workspace</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_32_rails_deployment_on">#32: Rails Deployment on GlassFish v3 from NetBeans IDE</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_31_crud_application_using">#31: CRUD Application using Grails - Hosted on GlassFish and MySQL</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_30_crud_application_using">#30: CRUD Application using Grails - Hosted on Jetty and HSQLDB</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_29_enabling_available_plugins">#29: Enabling &quot;Available Plugins&quot; tab in NetBeans IDE</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_28_getting_started_with">#28: Getting Started with Rails 2.0 Scaffold</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_27_configurable_multiple_ruby">#27: Configurable Multiple Ruby Platforms in NetBeans 6.1 M1</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_26_overriding_database_defaults">#26: Overriding Database Defaults in Rails 2.0.2</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_25_rails_application_with">#25: Rails application with PostgreSQL database using NetBeans</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_24_getting_started_with">#24: Getting Started with Rails 2.0.x in JRuby 1.0.3 and JRuby 1.1RC1</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_23_javafx_client_invoking">#23: JavaFX Client invoking a Metro endpoint</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_22_java_se_client">#22: Java SE client for a Metro endpoint</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_21_metro_1_1">#21: Metro 1.1 with GlassFish v2 UR1 and NetBeans 6</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_19_how_to_create">#20: How to create a new jMaki widget ?</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_18_how_to_add">#19: How to Add Metro Quality-of-Service to Contract-First Endpoint ?</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_18_how_to_build1">#18: How to Build The GlassFish v3 Gem for JRuby ?</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_17_backin_up_your">#17: Backing Up your Blog Posts on Roller</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_16_optimizing_metro_stubs">#16: Optimizing Metro Stubs by locally packaging the WSDL</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_15_delete_update_row">#15: Delete/Update Row from Database using jMaki Data Table</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_14_how_to_generate">#14: How to generate JRuby-on-Rails Controller on Windows (#9893)</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_13_setup_mongrel_for">#13: Setup Mongrel for JRuby-on-Rails applications on Windows</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_12_invoking_a_java">#12: Invoking a Java EE 5 Web service endpoint from JRuby</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_11_setup_mongrel_cluster">#11: Setup Mongrel cluster for JRuby-on-Rails applications on Unix</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_10_consuming_json_and">#10: Consuming JSON and XML representations generated by a Jersey endpoint in a jMaki Table widget</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_9_using_jdbc_connection">#9: Using JDBC connection pool/JNDI name from GlassFish in Rails Application</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_8_generating_json_using">#8: Generating JSON using JAXB annotations in Jersey</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_7_switch_between_jruby">#7: Switch between JRuby and CRuby interpreter in NetBeans 6</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_6_difference_between_ruby">#6: Difference between Ruby Gem and Rails Plugin</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_5_loading_data_from">#5: Loading data from beans in jMaki widgets</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_4_how_to_convert">#4: How to convert a Session EJB to a Web service ?</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_3_using_javadb_with">#3: Using JavaDB with JRuby on Rails</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_2_change_the_endpoint">#2: Change the endpoint address on a pre-generated Web services Stub</a></li>
    <li><a href="http://blogs.sun.com/arungupta/entry/totd_1_soap_messaging_logging">#1: SOAP Messaging Logging in Metro</a></li>
</ul>
<p>Just for fun, here is another tag cloud:</p>
<p><img height="264" style="margin: 5px" width="700" alt="" src="http://blog.arungupta.me/wp-content/uploads/2010/11/totd150-tag-cloud2.png" /></p>
<p>You can access all the tips <a href="http://blogs.sun.com/arungupta/tags/totd">here</a>. And keep those suggestions coming!</p>
<p><small>Technorati: <a href="http://technorati.com/tags/totd">totd</a> <a href="http://technorati.com/tags/glassfish">glassfish</a> <a href="http://technorati.com/tags/netbeans">netbeans</a> <a href="http://technorati.com/tags/jpa">jpa</a> <a href="http://technorati.com/tags/jsf">jsf</a> <a href="http://technorati.com/tags/jaxws">jaxws</a> <a href="http://technorati.com/tags/jersey">jersey</a> <a href="http://technorati.com/tags/mysql">mysql</a> <a href="http://technorati.com/tags/rails">rails</a> <a href="http://technorati.com/tags/osgi">osgi</a> <a href="http://technorati.com/tags/eclipse">eclipse</a></small></p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=26501&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=26501&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2010/11/18/totd-150-collection-of-glassfish-netbeans-jpa-jsf-jax-ws-ejb-jersey-mysql-rails-eclipse-and-osgi-tips/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DbCharmer – Rails Can Scale!</title>
		<link>http://feedproxy.google.com/~r/Homo-Adminus/~3/pRvMOlkGJ0A/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=dbcharmer-%25e2%2580%2593-rails-can-scale</link>
		<comments>http://feedproxy.google.com/~r/Homo-Adminus/~3/pRvMOlkGJ0A/#comments</comments>
		<pubDate>Fri, 16 Apr 2010 21:33:18 +0000</pubDate>
		<dc:creator>Alexey Kovyrin</dc:creator>
				<category><![CDATA[activerecord]]></category>
		<category><![CDATA[Databases]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[My Projects]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[scalability]]></category>
		<category><![CDATA[sharding]]></category>

		<guid isPermaLink="false">http://kovyrin.net/?p=397</guid>
		<description><![CDATA[Back in November 2009 I was working on a project to port Scribd.com code base to Rails 2.2 and noticed that some old plugins we were using in 2.1 were abandoned by their authors. Some of them were just removed from the code base, but one needed a replacement &#8211; that was an old plugin called acts_as_readonlyable that helped us to distribute our queries among a cluster of MySQL slaves. There were some alternatives but we didn&#8217;t like them for one or another reasons so we&#8217;ve decided to go with creating our own ActiveRecord plugin, that would help us scale our databases out. That&#8217;s the story behind the first release of DbCharmer.
Today, six months after the first release of the gem and we&#8217;ve moved it to gemcutter (which is now the official gems hosting) and we&#8217;re already at version 1.6.11. The gem was downloaded more than 2000 times. There are (at least) 10+ large users that rely on this gem to scale their products out. And (this is the most exciting) we&#8217;ve added tons of new features to the product. 
Here are the main features added since the first release:

Much better multi-database migrations support including default migrations connection changing.
We&#8217;ve added ActiveRecord associations preload support that makes it possible to move eager loading queries to the same connection where your finder queries go to.
We&#8217;ve improved ActiveRecord&#8217;s query logging feature and now you can see what connections your queries executed on (and yes, all those improvements are colorized  ).
We&#8217;ve added an ability to temporary remap any ActiveRecord connections to any other connections for a block of code (really useful when you need to make sure all your queries would go to some non-default slave and you do not want to mess with all your models).
The most interesting change: we&#8217;ve implemented some basic sharding functionality in ActiveRecord which currently is being used in production in our application.

As you can see now DbCharmer helps you to do three major scalability tasks in your Rails projects:

Master-Slave clusters to scale out your Rails models reads.
Vertical sharding by moving some of your models to a separate (maybe even dedicated) servers and still keep using AR associations
Horizontal sharding by slicing your models data to pieces and placing those pieces into different databases and/or servers.

 So, If you didn&#8217;t check DbCharmer out yet and you&#8217;re working on some large rails project that is (or going to be) facing scalability problems, go read the docs, download/install the gem and prove them that Rails CAN scale!



  
]]></description>
			<content:encoded><![CDATA[<p>Back in November 2009 I was working on a project to port <a href="http://www.scribd.com">Scribd.com</a> code base to Rails 2.2 and noticed that some old plugins we were using in 2.1 were abandoned by their authors. Some of them were just removed from the code base, but one needed a replacement &#8211; that was an old plugin called acts_as_readonlyable that helped us to distribute our queries among a cluster of MySQL slaves. There were some alternatives but we didn&#8217;t like them for one or another reasons so we&#8217;ve decided to go with creating our own ActiveRecord plugin, that would help us scale our databases out. That&#8217;s the story behind the <a href="http://kovyrin.net/2009/11/03/db-charmer-activerecord-connection-magic-plugin/">first release of DbCharmer</a>.</p>
<p>Today, six months after the first release of <a href="http://rubygems.org/gems/db-charmer">the gem</a> and we&#8217;ve moved it to gemcutter (which is now the official gems hosting) and we&#8217;re already at <a href="http://rubygems.org/gems/db-charmer/versions">version 1.6.11</a>. The gem was downloaded more than 2000 times. There are (at least) 10+ large users that rely on this gem to scale their products out. And (this is the most exciting) we&#8217;ve added tons of new features to the product. </p>
<p>Here are the main features added since the first release:</p>
<ul>
<li>Much better <strong>multi-database migrations</strong> support including default migrations connection changing.</li>
<li>We&#8217;ve added <strong>ActiveRecord associations preload</strong> support that makes it possible to move eager loading queries to the same connection where your finder queries go to.</li>
<li>We&#8217;ve improved <strong>ActiveRecord&#8217;s query logging</strong> feature and now you can see what connections your queries executed on (and yes, all those improvements are colorized <img src="http://kovyrin.net/wp-includes/images/smilies/icon_smile.gif" alt=":-)" class="wp-smiley" /> ).</li>
<li>We&#8217;ve added an ability to temporary<strong> remap any ActiveRecord connections</strong> to any other connections for a block of code (really useful when you need to make sure all your queries would go to some non-default slave and you do not want to mess with all your models).</li>
<li>The most interesting change: we&#8217;ve implemented some basic <strong>sharding functionality in ActiveRecord</strong> which currently is being used in production in our application.</li>
</ul>
<p>As you can see now DbCharmer helps you to do three major scalability tasks in your Rails projects:</p>
<ol>
<li><strong>Master-Slave clusters</strong> to scale out your Rails models reads.</li>
<li><strong>Vertical sharding</strong> by moving some of your models to a separate (maybe even dedicated) servers and still keep using AR associations</li>
<li><strong>Horizontal sharding</strong> by slicing your models data to pieces and placing those pieces into different databases and/or servers.</li>
</ol>
<p> So, If you didn&#8217;t check DbCharmer out yet and you&#8217;re working on some large rails project that is (or going to be) facing scalability problems, go <a href="http://github.com/kovyrin/db-charmer/blob/master/README.rdoc">read the docs</a>, download/install the <a href="http://rubygems.org/gems/db-charmer">gem</a> and prove them that <strong>Rails CAN scale</strong>!</p>

<p><a href="http://feedads.g.doubleclick.net/~a/C50kaw-zPALIf9S7psJCrd2YGWE/0/da"><img src="http://feedads.g.doubleclick.net/~a/C50kaw-zPALIf9S7psJCrd2YGWE/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/C50kaw-zPALIf9S7psJCrd2YGWE/1/da"><img src="http://feedads.g.doubleclick.net/~a/C50kaw-zPALIf9S7psJCrd2YGWE/1/di" border="0" ismap="true"></img></a></p><div>
<a href="http://feeds.feedburner.com/~ff/Homo-Adminus?a=pRvMOlkGJ0A:KhLs4uvpOsE:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/Homo-Adminus?i=pRvMOlkGJ0A:KhLs4uvpOsE:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Homo-Adminus?a=pRvMOlkGJ0A:KhLs4uvpOsE:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/Homo-Adminus?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Homo-Adminus?a=pRvMOlkGJ0A:KhLs4uvpOsE:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Homo-Adminus?i=pRvMOlkGJ0A:KhLs4uvpOsE:V_sGLiPBpWU" border="0"></img></a>
</div><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=24400&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=24400&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2010/04/17/dbcharmer-%e2%80%93-rails-can-scale/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reusing models outside of Rails</title>
		<link>http://blogs.sun.com/philip/entry/reusing_models_outside_of_rails?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=reusing-models-outside-of-rails</link>
		<comments>http://blogs.sun.com/philip/entry/reusing_models_outside_of_rails#comments</comments>
		<pubDate>Wed, 06 Jan 2010 15:34:17 +0000</pubDate>
		<dc:creator>Philip Antoniades</dc:creator>
				<category><![CDATA[activerecord]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://blogs.sun.com/philip/entry/reusing_models_outside_of_rails</guid>
		<description><![CDATA[If you have done a good job of building your rails models, you may find that they are helpful for your non-rails system maintenance and such. They may even be necessary to reuse if you follow the rails model of using activerecord validations (rather that database RI) to preserve the integrity of your data. 
  Or you may just find yourself rewriting the same code again and again, and want all that good railsiness to make it easier to write and maintain. Personally I find myself in some instance of ./script/console as often as irb just so I can get the activesupport helper methods ( 4.days.from_now and such) that many rails developers are surprised to find are not actually a standard part of ruby. 
  So, the good news is it is easy to reuse rails code outside of rails. 
  Let's say you want to do some data manipulation (reporting, loading, scrubbing, etc) in your rails db, and want to use your models to do it. A few imports in your ruby script gets the necessary environment in place:
  require 'rubygems'require 'yaml'require 'active_record'require 'logger'
  and a few more will load up your models (note: they're probably not in the same location as mine, unless you are also working on an app called 'seweb' in your home dir):
  PROJECT_HOME = &#34;#{ENV['HOME']}/seweb/&#34;require &#34;#{PROJECT_HOME}/app/models/sales_rep.rb&#34;require &#34;#{PROJECT_HOME}/app/models/organization.rb&#34;require &#34;#{PROJECT_HOME}/app/models/team.rb&#34;
  Then connect to the appropriate database (note I'm connecting to the development environment - can you guess how I'd connect to 'test' or 'production'?), with rails logging enabled:
  ActiveRecord::Base.logger = Logger.new( STDERR )db_config = YAML::load( File.open(&#34;#{seweb_home}/config/database.yml&#38;quot)ActiveRecord::Base.establish_connection( db_config[&#34;development&#34;])
  And you are good! If you are using a transactional database (such as my personal favorite, MySQL with InnoDB), you can make nice transaction wrappers for your work thusly:
  ActiveRecord::Base.transaction do
  &#160;&#160;&#160;&#160;&#160;&#160;&#160; rep = SalesRep.find_or_initialize_by_name( 'Kyllin D. Quota' )&#160;&#160;&#160; &#160;&#160;&#160; # create the component parts&#160;&#160;&#160; &#160;&#160;&#160; if( rep.changed? )&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; rep.organization = Organization.find_or_create_by_name 'APAC'&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; rep.team = Team.find_or_create_by_name 'Enterprise'&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; rep.save!&#160;&#160;&#160; &#160;&#160;&#160; end
  &#160;&#160;&#160; &#160;&#160;&#160; rescue Exception&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; raise ActiveRecord::Rollback, &#34;Invalid record for #{rep.name}&#34;&#160;&#160;&#160; &#160;&#160;&#160; end
  end
  Pow. You get your rails sugar, rails validations, rails logging. Are you happy? Why yes, yes you are.]]></description>
			<content:encoded><![CDATA[<p><p>If you have done a good job of building your rails models, you may find that they are helpful for your non-rails system maintenance and such. They may even be <i>necessary</i> to reuse if you follow the rails model of using activerecord validations (rather that database RI) to preserve the integrity of your data. </p><br/>
  <p>Or you may just find yourself rewriting the same code again and again, and want all that good railsiness to make it easier to write and maintain. Personally I find myself in some instance of ./script/console as often as irb just so I can get the activesupport helper methods ( 4.days.from_now and such) that many rails developers are surprised to find are not actually a standard part of ruby. </p><br/>
  <p>So, the good news is it is easy to reuse rails code outside of rails. </p><br/>
  <p>Let's say you want to do some data manipulation (reporting, loading, scrubbing, etc) in your rails db, and want to use your models to do it. A few imports in your ruby script gets the necessary environment in place:</p><br/>
  <p>require 'rubygems'<br />require 'yaml'<br />require 'active_record'<br />require 'logger'</p><br/>
  <p>and a few more will load up your models (note: they're probably not in the same location as mine, unless you are also working on an app called 'seweb' in your home dir):</p><br/>
  <p>PROJECT_HOME = &quot;#{ENV['HOME']}/seweb/&quot;<br />require &quot;#{PROJECT_HOME}/app/models/sales_rep.rb&quot;<br />require &quot;#{PROJECT_HOME}/app/models/organization.rb&quot;<br />require &quot;#{PROJECT_HOME}/app/models/team.rb&quot;</p><br/>
  <p>Then connect to the appropriate database (note I'm connecting to the development environment - can you guess how I'd connect to 'test' or 'production'?), with rails logging enabled:</p><br/>
  <p>ActiveRecord::Base.logger = Logger.new( STDERR )<br />db_config = YAML::load( File.open(&quot;#{seweb_home}/config/database.yml&quot<img src="http://blogs.sun.com/images/smileys/wink.gif" class="smiley" alt=";)" title=";)" />)<br />ActiveRecord::Base.establish_connection( db_config[&quot;development&quot;])<br /></p><br/>
  <p>And you are good! If you are using a transactional database (such as my personal favorite, MySQL with InnoDB), you can make nice transaction wrappers for your work thusly:</p><br/>
  <p>ActiveRecord::Base.transaction do</p><br/>
  <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rep = SalesRep.find_or_initialize_by_name( 'Kyllin D. Quota' )<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; # create the component parts<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if( rep.changed? )<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; rep.organization = Organization.find_or_create_by_name 'APAC'<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; rep.team = Team.find_or_create_by_name 'Enterprise'<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; rep.save!<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; end</p><br/>
  <p>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; rescue Exception<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; raise ActiveRecord::Rollback, &quot;Invalid record for #{rep.name}&quot;<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; end</p><br/>
  <p>end</p><br/>
  <p>Pow. You get your rails sugar, rails validations, rails logging. Are you happy? Why yes, yes you are.<br /></p></p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22933&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22933&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2010/01/06/reusing-models-outside-of-rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reusing models outside of Rails</title>
		<link>http://blogs.sun.com/philip/entry/reusing_models_outside_of_rails?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=reusing-models-outside-of-rails</link>
		<comments>http://blogs.sun.com/philip/entry/reusing_models_outside_of_rails#comments</comments>
		<pubDate>Wed, 06 Jan 2010 15:34:17 +0000</pubDate>
		<dc:creator>Philip Antoniades</dc:creator>
				<category><![CDATA[activerecord]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://blogs.sun.com/philip/entry/reusing_models_outside_of_rails</guid>
		<description><![CDATA[If you have done a good job of building your rails models, you may find that they are helpful for your non-rails system maintenance and such. They may even be necessary to reuse if you follow the rails model of using activerecord validations (rather that database RI) to preserve the integrity of your data. 
  Or you may just find yourself rewriting the same code again and again, and want all that good railsiness to make it easier to write and maintain. Personally I find myself in some instance of ./script/console as often as irb just so I can get the activesupport helper methods ( 4.days.from_now and such) that many rails developers are surprised to find are not actually a standard part of ruby. 
  So, the good news is it is easy to reuse rails code outside of rails. 
  Let's say you want to do some data manipulation (reporting, loading, scrubbing, etc) in your rails db, and want to use your models to do it. A few imports in your ruby script gets the necessary environment in place:
  require 'rubygems'require 'yaml'require 'active_record'require 'logger'
  and a few more will load up your models (note: they're probably not in the same location as mine, unless you are also working on an app called 'seweb' in your home dir):
  PROJECT_HOME = &#34;#{ENV['HOME']}/seweb/&#34;require &#34;#{PROJECT_HOME}/app/models/sales_rep.rb&#34;require &#34;#{PROJECT_HOME}/app/models/organization.rb&#34;require &#34;#{PROJECT_HOME}/app/models/team.rb&#34;
  Then connect to the appropriate database (note I'm connecting to the development environment - can you guess how I'd connect to 'test' or 'production'?), with rails logging enabled:
  ActiveRecord::Base.logger = Logger.new( STDERR )db_config = YAML::load( File.open(&#34;#{seweb_home}/config/database.yml&#38;quot)ActiveRecord::Base.establish_connection( db_config[&#34;development&#34;])
  And you are good! If you are using a transactional database (such as my personal favorite, MySQL with InnoDB), you can make nice transaction wrappers for your work thusly:
  ActiveRecord::Base.transaction do
  &#160;&#160;&#160;&#160;&#160;&#160;&#160; rep = SalesRep.find_or_initialize_by_name( 'Kyllin D. Quota' )&#160;&#160;&#160; &#160;&#160;&#160; # create the component parts&#160;&#160;&#160; &#160;&#160;&#160; if( rep.changed? )&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; rep.organization = Organization.find_or_create_by_name 'APAC'&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; rep.team = Team.find_or_create_by_name 'Enterprise'&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; rep.save!&#160;&#160;&#160; &#160;&#160;&#160; end
  &#160;&#160;&#160; &#160;&#160;&#160; rescue Exception&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; raise ActiveRecord::Rollback, &#34;Invalid record for #{rep.name}&#34;&#160;&#160;&#160; &#160;&#160;&#160; end
  end
  Pow. You get your rails sugar, rails validations, rails logging. Are you happy? Why yes, yes you are.]]></description>
			<content:encoded><![CDATA[<p><p>If you have done a good job of building your rails models, you may find that they are helpful for your non-rails system maintenance and such. They may even be <i>necessary</i> to reuse if you follow the rails model of using activerecord validations (rather that database RI) to preserve the integrity of your data. </p><br/>
  <p>Or you may just find yourself rewriting the same code again and again, and want all that good railsiness to make it easier to write and maintain. Personally I find myself in some instance of ./script/console as often as irb just so I can get the activesupport helper methods ( 4.days.from_now and such) that many rails developers are surprised to find are not actually a standard part of ruby. </p><br/>
  <p>So, the good news is it is easy to reuse rails code outside of rails. </p><br/>
  <p>Let's say you want to do some data manipulation (reporting, loading, scrubbing, etc) in your rails db, and want to use your models to do it. A few imports in your ruby script gets the necessary environment in place:</p><br/>
  <p>require 'rubygems'<br />require 'yaml'<br />require 'active_record'<br />require 'logger'</p><br/>
  <p>and a few more will load up your models (note: they're probably not in the same location as mine, unless you are also working on an app called 'seweb' in your home dir):</p><br/>
  <p>PROJECT_HOME = &quot;#{ENV['HOME']}/seweb/&quot;<br />require &quot;#{PROJECT_HOME}/app/models/sales_rep.rb&quot;<br />require &quot;#{PROJECT_HOME}/app/models/organization.rb&quot;<br />require &quot;#{PROJECT_HOME}/app/models/team.rb&quot;</p><br/>
  <p>Then connect to the appropriate database (note I'm connecting to the development environment - can you guess how I'd connect to 'test' or 'production'?), with rails logging enabled:</p><br/>
  <p>ActiveRecord::Base.logger = Logger.new( STDERR )<br />db_config = YAML::load( File.open(&quot;#{seweb_home}/config/database.yml&quot<img src="http://blogs.sun.com/images/smileys/wink.gif" class="smiley" alt=";)" title=";)" />)<br />ActiveRecord::Base.establish_connection( db_config[&quot;development&quot;])<br /></p><br/>
  <p>And you are good! If you are using a transactional database (such as my personal favorite, MySQL with InnoDB), you can make nice transaction wrappers for your work thusly:</p><br/>
  <p>ActiveRecord::Base.transaction do</p><br/>
  <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rep = SalesRep.find_or_initialize_by_name( 'Kyllin D. Quota' )<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; # create the component parts<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if( rep.changed? )<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; rep.organization = Organization.find_or_create_by_name 'APAC'<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; rep.team = Team.find_or_create_by_name 'Enterprise'<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; rep.save!<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; end</p><br/>
  <p>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; rescue Exception<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; raise ActiveRecord::Rollback, &quot;Invalid record for #{rep.name}&quot;<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; end</p><br/>
  <p>end</p><br/>
  <p>Pow. You get your rails sugar, rails validations, rails logging. Are you happy? Why yes, yes you are.<br /></p></p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22933&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22933&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2010/01/06/reusing-models-outside-of-rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

