<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: An Easier Java ORM Part 4</title>
	<atom:link href="http://www.codecommit.com/blog/java/an-easier-java-orm-part-4/feed" rel="self" type="application/rss+xml" />
	<link>http://www.codecommit.com/blog/java/an-easier-java-orm-part-4</link>
	<description>(permanently in beta)</description>
	<lastBuildDate>Sun, 29 Aug 2010 20:01:44 -0700</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: foo</title>
		<link>http://www.codecommit.com/blog/java/an-easier-java-orm-part-4/comment-page-1#comment-4833</link>
		<dc:creator>foo</dc:creator>
		<pubDate>Sat, 25 Apr 2009 02:25:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.danielspiewak.com/java/an-easier-java-orm-part-4#comment-4833</guid>
		<description>Have you seen this one: http://www.mollypages.org/dbo ?</description>
		<content:encoded><![CDATA[<p>Have you seen this one: <a href="http://www.mollypages.org/dbo" rel="nofollow">http://www.mollypages.org/dbo</a> ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christian</title>
		<link>http://www.codecommit.com/blog/java/an-easier-java-orm-part-4/comment-page-1#comment-3153</link>
		<dc:creator>Christian</dc:creator>
		<pubDate>Thu, 28 Feb 2008 07:29:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.danielspiewak.com/java/an-easier-java-orm-part-4#comment-3153</guid>
		<description>Thanks for your fast Reply Daniel.

If every do things in same way is not a proof that it is a good solution also :-) Hmmm seems ... if I realy want to get rid of the em I have to write some kind of wrapper classes. Maybe I will do this in future. Since I will need the lib for beanshell scripts maybe its a bit easier to handle the objects.

Christian

PS I realy like ActiveObjects - its my favior ORM. I have tested for a few days Apache Cayenne, Oracle TopLink, Hibernate and ActiveObjects.</description>
		<content:encoded><![CDATA[<p>Thanks for your fast Reply Daniel.</p>
<p>If every do things in same way is not a proof that it is a good solution also <img src='http://www.codecommit.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  Hmmm seems &#8230; if I realy want to get rid of the em I have to write some kind of wrapper classes. Maybe I will do this in future. Since I will need the lib for beanshell scripts maybe its a bit easier to handle the objects.</p>
<p>Christian</p>
<p>PS I realy like ActiveObjects &#8211; its my favior ORM. I have tested for a few days Apache Cayenne, Oracle TopLink, Hibernate and ActiveObjects.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel Spiewak</title>
		<link>http://www.codecommit.com/blog/java/an-easier-java-orm-part-4/comment-page-1#comment-3142</link>
		<dc:creator>Daniel Spiewak</dc:creator>
		<pubDate>Wed, 27 Feb 2008 18:04:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.danielspiewak.com/java/an-easier-java-orm-part-4#comment-3142</guid>
		<description>There&#039;s no way that you&#039;re going to be able to get rid of EntityManager entirely (this restriction is fairly standard for ORMs).  This is because to even create the instances of the interface, EntityManager must be invoked.  You don&#039;t actually extend Entity with a class, but rather with an interface (which cannot be instantiated).</description>
		<content:encoded><![CDATA[<p>There&#8217;s no way that you&#8217;re going to be able to get rid of EntityManager entirely (this restriction is fairly standard for ORMs).  This is because to even create the instances of the interface, EntityManager must be invoked.  You don&#8217;t actually extend Entity with a class, but rather with an interface (which cannot be instantiated).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christian</title>
		<link>http://www.codecommit.com/blog/java/an-easier-java-orm-part-4/comment-page-1#comment-3141</link>
		<dc:creator>Christian</dc:creator>
		<pubDate>Wed, 27 Feb 2008 15:42:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.danielspiewak.com/java/an-easier-java-orm-part-4#comment-3141</guid>
		<description>Hello!

I have just started using Java and ActiveObjects for a library project. The goal is to use perisistant objects not in case of an application but get easy access via a lib. What I would like to develop is kind of typical access without a client need of EntityManager.

Person me = new Person();
me.setName(&quot;Christian&quot;);
me.save();

Person i = new Person(&quot;name=?&quot;, &quot;Christian&quot;);
System.out.println(i.getName);

Since I am a Java newbee too, how can I extend the interface with constructors?

Thank You Christian</description>
		<content:encoded><![CDATA[<p>Hello!</p>
<p>I have just started using Java and ActiveObjects for a library project. The goal is to use perisistant objects not in case of an application but get easy access via a lib. What I would like to develop is kind of typical access without a client need of EntityManager.</p>
<p>Person me = new Person();<br />
me.setName(&#8220;Christian&#8221;);<br />
me.save();</p>
<p>Person i = new Person(&#8220;name=?&#8221;, &#8220;Christian&#8221;);<br />
System.out.println(i.getName);</p>
<p>Since I am a Java newbee too, how can I extend the interface with constructors?</p>
<p>Thank You Christian</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: daniel</title>
		<link>http://www.codecommit.com/blog/java/an-easier-java-orm-part-4/comment-page-1#comment-2131</link>
		<dc:creator>daniel</dc:creator>
		<pubDate>Sat, 18 Aug 2007 00:12:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.danielspiewak.com/java/an-easier-java-orm-part-4#comment-2131</guid>
		<description>Hmm, ActiveObjects out of the box sort of hides all that from you, so you can&#039;t get to it directly.  The idea is if you want to do anything advanced with either the pooling or the JDBC drivers, you&#039;ll need to extend either the existing pool provider, or create a new pool provider yourself.  This will allow you to completely control all aspects of the database pooling and even implement a library yourself.  The downside to this is you must then manually pass this database provider to EntityManager thusly:

DatabaseProvider provider = new MyPoolProvider(new MySQLDatabaseProvider(uri, username, password));
EntityManager manager = new EntityManager(provider);

The &quot;manager&quot; instance will then use the MyPoolProvider functionality to encapsulate its database access.  In fact, this is actually how the new EntityManager(String, String, String) auto-magical constructor works under the surface, just with the addition of two enums which allow auto-detection of database driver and available pool providers.

Oh, a pool provider is actually just a DatabaseProvider which delegates all of its functionality to a specified DatabaseProvider instance with the exception of the getConnection() method, which is handled in a pool-specific way.  There is a PoolProvider abstract super-class which makes the implementation of new pool providers fairly trivial.</description>
		<content:encoded><![CDATA[<p>Hmm, ActiveObjects out of the box sort of hides all that from you, so you can&#8217;t get to it directly.  The idea is if you want to do anything advanced with either the pooling or the JDBC drivers, you&#8217;ll need to extend either the existing pool provider, or create a new pool provider yourself.  This will allow you to completely control all aspects of the database pooling and even implement a library yourself.  The downside to this is you must then manually pass this database provider to EntityManager thusly:</p>
<p>DatabaseProvider provider = new MyPoolProvider(new MySQLDatabaseProvider(uri, username, password));<br />
EntityManager manager = new EntityManager(provider);</p>
<p>The &#8220;manager&#8221; instance will then use the MyPoolProvider functionality to encapsulate its database access.  In fact, this is actually how the new EntityManager(String, String, String) auto-magical constructor works under the surface, just with the addition of two enums which allow auto-detection of database driver and available pool providers.</p>
<p>Oh, a pool provider is actually just a DatabaseProvider which delegates all of its functionality to a specified DatabaseProvider instance with the exception of the getConnection() method, which is handled in a pool-specific way.  There is a PoolProvider abstract super-class which makes the implementation of new pool providers fairly trivial.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin Hoang Le</title>
		<link>http://www.codecommit.com/blog/java/an-easier-java-orm-part-4/comment-page-1#comment-2130</link>
		<dc:creator>Kevin Hoang Le</dc:creator>
		<pubDate>Sat, 18 Aug 2007 00:05:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.danielspiewak.com/java/an-easier-java-orm-part-4#comment-2130</guid>
		<description>Thanks, but in your built-in integration, how do pick up the configuration, such as the max number of connections, an SQL statement to ping the DB if supported by the CP, other properties, etc.  Or is there an overloaded version of EntityManager() where you could pass in the additional above-mentioned properties?  Thanks</description>
		<content:encoded><![CDATA[<p>Thanks, but in your built-in integration, how do pick up the configuration, such as the max number of connections, an SQL statement to ping the DB if supported by the CP, other properties, etc.  Or is there an overloaded version of EntityManager() where you could pass in the additional above-mentioned properties?  Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: daniel</title>
		<link>http://www.codecommit.com/blog/java/an-easier-java-orm-part-4/comment-page-1#comment-2129</link>
		<dc:creator>daniel</dc:creator>
		<pubDate>Fri, 17 Aug 2007 23:48:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.danielspiewak.com/java/an-easier-java-orm-part-4#comment-2129</guid>
		<description>It requires an external pooling *library*, but integration with these libraries is built in.  All you have to do is put the pooling library on your classpath, and ActiveObjects will use it.  For example, I use commons-pool/commons-dbcp by placing the JARs on the classpath and then calling new EntityManager(uri, username, password) just as before.  I could also use C3P0 or Proxool if I wanted to.  Alternatively, I could leave the pool libraries completely off the classpath, and ActiveObjects would use the JDBC driver directly, without pooling.</description>
		<content:encoded><![CDATA[<p>It requires an external pooling *library*, but integration with these libraries is built in.  All you have to do is put the pooling library on your classpath, and ActiveObjects will use it.  For example, I use commons-pool/commons-dbcp by placing the JARs on the classpath and then calling new EntityManager(uri, username, password) just as before.  I could also use C3P0 or Proxool if I wanted to.  Alternatively, I could leave the pool libraries completely off the classpath, and ActiveObjects would use the JDBC driver directly, without pooling.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin Hoang Le</title>
		<link>http://www.codecommit.com/blog/java/an-easier-java-orm-part-4/comment-page-1#comment-2128</link>
		<dc:creator>Kevin Hoang Le</dc:creator>
		<pubDate>Fri, 17 Aug 2007 23:32:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.danielspiewak.com/java/an-easier-java-orm-part-4#comment-2128</guid>
		<description>Daniel,

I apologize because I have not read all 4 parts before asking questions.  Does AO require an external connection pooling implementation or do you have CP built-in inside AO?  Thanks</description>
		<content:encoded><![CDATA[<p>Daniel,</p>
<p>I apologize because I have not read all 4 parts before asking questions.  Does AO require an external connection pooling implementation or do you have CP built-in inside AO?  Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel Spiewak</title>
		<link>http://www.codecommit.com/blog/java/an-easier-java-orm-part-4/comment-page-1#comment-2102</link>
		<dc:creator>Daniel Spiewak</dc:creator>
		<pubDate>Wed, 01 Aug 2007 01:43:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.danielspiewak.com/java/an-easier-java-orm-part-4#comment-2102</guid>
		<description>Yeah, I would expect that.  Right now in trunk/ the migrations feature isn&#039;t fully wired up.  I haven&#039;t actually written the &quot;glue code&quot; to connect the migrate() method to the schema reading and diffing features.  In other words, it&#039;s trying to create the schema all over again each time you call the method.  :-S</description>
		<content:encoded><![CDATA[<p>Yeah, I would expect that.  Right now in trunk/ the migrations feature isn&#8217;t fully wired up.  I haven&#8217;t actually written the &#8220;glue code&#8221; to connect the migrate() method to the schema reading and diffing features.  In other words, it&#8217;s trying to create the schema all over again each time you call the method.  :-S</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Marko</title>
		<link>http://www.codecommit.com/blog/java/an-easier-java-orm-part-4/comment-page-1#comment-2103</link>
		<dc:creator>David Marko</dc:creator>
		<pubDate>Tue, 31 Jul 2007 08:32:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.danielspiewak.com/java/an-easier-java-orm-part-4#comment-2103</guid>
		<description>Just used ActiveObjects from trunk and tried migration feature. On firt run AO created a new table correctly. Then I changed a JAVA class(add some additional property) and called migrate once again. This is what a got:(subdomain is a JAVA bean a store in database)


org.postgresql.util.PSQLException: ERROR: relation &quot;subdomain&quot; already exists
	at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1548)
	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1316)
	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:191)
	at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:452)
	at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:337)
	at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:283)
	at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
	at net.java.ao.schema.Generator.migrate(Generator.java:150)
	at net.java.ao.EntityManager.migrate(EntityManager.java:143)</description>
		<content:encoded><![CDATA[<p>Just used ActiveObjects from trunk and tried migration feature. On firt run AO created a new table correctly. Then I changed a JAVA class(add some additional property) and called migrate once again. This is what a got:(subdomain is a JAVA bean a store in database)</p>
<p>org.postgresql.util.PSQLException: ERROR: relation &#8220;subdomain&#8221; already exists<br />
	at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1548)<br />
	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1316)<br />
	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:191)<br />
	at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:452)<br />
	at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:337)<br />
	at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:283)<br />
	at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)<br />
	at net.java.ao.schema.Generator.migrate(Generator.java:150)<br />
	at net.java.ao.EntityManager.migrate(EntityManager.java:143)</p>
]]></content:encoded>
	</item>
</channel>
</rss>
