<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.2.1" -->
<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/"
	>

<channel>
	<title>Reiner Saddey's Place</title>
	<link>http://blog.saddey.net</link>
	<description>Just another WordPress weblog for Reiner Saddey</description>
	<pubDate>Sat, 06 Mar 2010 17:00:05 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.1</generator>
	<language>en</language>
			<item>
		<title>How to Deploy a Grails Application to JBoss 5</title>
		<link>http://blog.saddey.net/2010/03/06/how-to-deploy-a-grails-application-to-jboss-5/</link>
		<comments>http://blog.saddey.net/2010/03/06/how-to-deploy-a-grails-application-to-jboss-5/#comments</comments>
		<pubDate>Sat, 06 Mar 2010 09:27:47 +0000</pubDate>
		<dc:creator>Reiner</dc:creator>
		
		<category><![CDATA[Hibernate]]></category>

		<category><![CDATA[Grails]]></category>

		<category><![CDATA[English]]></category>

		<guid isPermaLink="false">http://blog.saddey.net/2010/03/06/how-to-deploy-a-grails-application-to-jboss-5/</guid>
		<description><![CDATA[Complete Grails sample application prepared for JBoss 5 deployment and a diagram sketching Grails logging architecture. Bonus track: Work-around for Hibernate issue which prevents a Grails 1.2.0 and 1.2.1 applications from starting.]]></description>
			<content:encoded><![CDATA[<p>As outlined at <a href="http://blog.saddey.net/2010/02/07/grails-how-to-use-native-server-logging-configuration-eg-tomcat-glassfish-jboss/" title="Reiner Saddey's Place - Grails - How to Use Native Server Logging Configuration (e.g. Tomcat GlassFish JBoss)" target="_blank">Grails - How to Use Native Server Logging Configuration (e.g. Tomcat GlassFish JBoss)</a>, it may be advisable to remove any conflicting logging implementation when deploying a Grails application into a production environment. I&#8217;ll give a full source example on how to achieve this and how to work-around an issue which prevents a Grails 1.2.0 and 1.2.1 applications from starting.</p>
<p>Unfortunately, each server provides a distinct set of logging frameworks. Still worse, servers can be reconfigured to use alternate logging frameworks (e.g. JBoss can be configured to use Java Logging instead of its default Log4J implementation and Tomcat 6 can be configured to use Log4J instead of its default Java Logging implementation).</p>
<p>Thus you either have to prepare a war which has been set-up for a specific target environment or completely remove <em>any</em> logging implementation from your Grails war and add missing jars to the lib directory of your target server instead.  Which one to choose may depend on whether access to the server configuration is permitted (e.g. its lib directory), how many different servers your application is to be deployed to and how hard it is for your build process to reliably produce variants specifically tailored for a particular deployment site.</p>
<p>Before presenting the code for a deployment to JBoss 5.1.0GA, let&#8217;s have a look at <strong>Grails&#8217; logging architecture</strong>. In its infancy Grails just used Apache Commons Logging (JCL) to provide an abstraction level and Log4J to implement the actual logging. Although even now, all <em>log</em> instances injected into Grails applications still implement org.appache.commons.logging.Log, Grails no longer uses JCL, but meanwhile has moved on to SLF4J:</p>
<p><img src="http://yuml.me/diagram/scruffy;scale:80/class/%5B%3C%3CInterface%3E%3E%3Bcommons.logging.Log%5D%5E-.-%20implements%5Bjcl-over-slf4j%5D%2C%20%5B%3C%3CUtility%3E%3E%3Bcommons.logging.LogFactory%5D1-++%5Bjcl-over-slf4j%5D%2C%20%5Bjcl-over-slf4j%5Duses%20-.-%3E%5Bslf4j-api%5D%2C%20%5Bslf4j-api%5Duses%20-.-%3E%5Bslf4j-log4j12%5D%2C%20%5Bslf4j-log4j12%5Duses%20-.-%3E%5Blog4j%5D" style="background: #c0c0c0 none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial" title="Grails logging architecture" alt="Grails logging architecture" width="403" /></p>
<p>Starting with Grails 1.2, an additional bridge <em>jul-to-slf4j</em> which delegates Java Logging (Jul) to Slf4j is enabled by setting <em>grails.logging.jul.usebridge = true</em>. Be warned though, that for performance reasons <a href="http://www.slf4j.org/legacy.html#jul-to-slf4j" title="Bridging legacy APIs - JUL to SLF4J" target="_blank">this bridge should not be used when expecting heavy logging</a>.</p>
<p>Now for the good news: With <strong>JBoss 5</strong>, all of the above (but excluding jul-to-slf4j) has <strong>already been integrated into the server configuration and libraries</strong>. In order to deploy a Grails application to JBoss 5, we&#8217;ll just need to get rid of the jars within your war and prevent Grails from trying to configure the logging. How to achieve this?</p>
<p>Within <em>grails-app/conf/BuildConfig.groovy</em> we&#8217;ll <strong>remove offending jars</strong> when building the war:</p>
<pre>// TODO JBOSS - Remove own log4j and use the one supplied by JBoss instead
grails.war.resources = {stagingDir -&gt;
    def toRemove = [
          "$stagingDir/WEB-INF/lib/log4j-1.2.14.jar", // log4j supplied by JBoss
          "$stagingDir/WEB-INF/lib/log4j-1.2.15.jar", // log4j supplied by JBoss
          "$stagingDir/WEB-INF/classes/log4j.properties", // logging conf done in JBoss only
          "$stagingDir/WEB-INF/lib/slf4j-api-1.5.6.jar", // slf4j supplied by JBoss 5+
          "$stagingDir/WEB-INF/lib/slf4j-api-1.5.8.jar", // slf4j supplied by JBoss 5+
          "$stagingDir/WEB-INF/lib/slf4j-log4j12-1.5.6.jar", // slf4j supplied by JBoss 5+
          "$stagingDir/WEB-INF/lib/slf4j-log4j12-1.5.8.jar", // slf4j supplied by JBoss 5+
          "$stagingDir/WEB-INF/lib/jcl-over-slf4j-1.5.6.jar", // jcl supplied by JBoss as well
          "$stagingDir/WEB-INF/lib/jcl-over-slf4j-1.5.8.jar", // jcl supplied by JBoss as well
        // see also Config.grails.logging.jul.usebridge - shouldn't be used
        //     http://www.slf4j.org/legacy.html#jul-to-slf4j
        //          "$stagingDir/WEB-INF/lib/jul-to-slf4j-1.5.6.jar",
        //          "$stagingDir/WEB-INF/lib/jul-to-slf4j-1.5.8.jar",
        // you might want to remove JDBC drivers when using server supplied JNDI...
        //          "$stagingDir/WEB-INF/lib/hsqldb-1.8.0.5.jar",
    ].each {
        delete(file: it)
    }
}</pre>
<p>Within <em>scripts/_Events.groovy</em> we&#8217;ll <strong>disable Grails logging configuration</strong> components:</p>
<pre>import groovy.xml.StreamingMarkupBuilder

/**
 * TODO JBOSS - Remove log4j configuration stuff (when running with JBoss or GlassFish a.s.o)
 */
eventWebXmlEnd = {String tmpfile -&gt;

    def root = new XmlSlurper().parse(webXmlFile)

    // When running with JBoss (or GlassFish a.s.o) remove log4j configuration stuff
    def log4j = root.listener.findAll {node -&gt;
        node.'listener-class'.text() == 'org.codehaus.groovy.grails.web.util.Log4jConfigListener'
    }
    log4j.replaceNode {}

    def log4jFile = root.'context-param'.findAll {node -&gt;
        node.'param-name'.text() == 'log4jConfigLocation'
    }
    log4jFile.replaceNode {}

    webXmlFile.text = new StreamingMarkupBuilder().bind {
        mkp.declareNamespace("": "http://java.sun.com/xml/ns/j2ee")
        mkp.yield(root)
    }
}</pre>
<p>You are now set to control logging within JBoss jboss-log4j.xml.</p>
<p>If you&#8217;re using Grails 1.2.0 or 1.2.1, JBoss <strong>still refuses</strong> to deploy your war. This is caused by version conflicts within <strong>Hibernate </strong>jars (used to be work-arounded by deleting all Hibernate jars from JBoss lib directory) and they have been fixed by <a href="http://jira.codehaus.org/browse/GRAILS-5606?focusedCommentId=212135&amp;page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_212135" title="GRAILS-5606 - Deploy on JBoss 5.1.0 GA" target="_blank">GRAILS-5606</a> for (not yet released) Grails 1.2.2.</p>
<p>Graeme Rocher as well supplies a work-around for 1.2.x:</p>
<blockquote><p><em>Fixed in latest hibernate plugin 1.3.0.BUILD-SNAPSHOT</em></p>
<p><em>It seems in order to use the latest version of Hibernate on JBoss you must include Hibernate validator otherwise you run into this classloading error. This means the hibernate plugin is forced to include hibernate-validator as a dependency even if we don&#8217;t use it which is a pretty annoying.</em></p>
<p><em>Anyway you can fix this yourselves in 1.2.x by adding the following dependency to BuildConfig.groovy:</em></p>
<pre>runtime('org.hibernate:hibernate-validator:3.1.0.GA') {
    excludes 'sl4j-api', 'hibernate.core',
             'hibernate-commons-annotations', 'hibernate-entitymanager'
    }</pre>
<p><em>Be sure to uncomment the jboss maven repository so the dependency resolvers</em></p></blockquote>
<p>This work-around is included within sample sources. Just search for <em>TODO</em> tags.</p>
<p>Links:</p>
<ul>
<li><a href="https://docs.google.com/leaf?id=0B5F8upNsB6rGYjZhYzQ3YWEtYjQ3OC00ZTMxLWJkYTYtZTNjZmU5NjcxOTdj&amp;hl=en" title="Source Code and war for this post" target="_blank">Source Code and war</a></li>
<li><a href="http://buildchimp.com/wordpress/?p=249" title="Build Lackey Blog - Using Log4j with Grails Apps on JBoss" target="_blank">Build Lackey Blog - Using Log4j with Grails Apps on JBoss</a></li>
<li><a href="http://www.thejavajar.com/2009/11/03/grails-on-jboss-as-510-ga/" title="thejavajar Blog - Grails on JBoss AS 5.1.0 GA" target="_blank">thejavajar Blog - JBoss AS 5.1.0 GA</a></li>
<li><a href="http://jira.codehaus.org/browse/GRAILS-5606?focusedCommentId=212135&amp;page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_212135" title="Grails Issues - GRAILS-5606 - Deploy on JBoss 5.1.0 GA" target="_blank">GRAILS-5606 - Deploy on JBoss 5.1.0 GA</a></li>
<li><a href="http://yuml.me/diagram/scruffy/class/edit/[%3C%3CInterface%3E%3E;commons.logging.Log]%5E-.-%20implements[jcl-over-slf4j],%20[%3C%3CUtility%3E%3E;commons.logging.LogFactory]1-++[jcl-over-slf4j],%20[jcl-over-slf4j]uses%20-.-%3E[slf4j-api],%20[slf4j-api]uses%20-.-%3E[slf4j-log4j12],%20[slf4j-log4j12]uses%20-.-%3E[log4j]" target="_blank">This diagram</a> has been prepared using <a href="http://yuml.me/" title="yUML - Create UML diagrams online in seconds, no special tools needed." target="_blank">yUML</a> (avoid IE, if you can)</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.saddey.net/2010/03/06/how-to-deploy-a-grails-application-to-jboss-5/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Teaching Mavenized Grails to Survive mvn release:prepare release:perform with Hudson</title>
		<link>http://blog.saddey.net/2010/02/10/teaching-mavenized-grails-to-survive-mvn-releaseprepare-releaseperform-with-hudson/</link>
		<comments>http://blog.saddey.net/2010/02/10/teaching-mavenized-grails-to-survive-mvn-releaseprepare-releaseperform-with-hudson/#comments</comments>
		<pubDate>Wed, 10 Feb 2010 17:06:13 +0000</pubDate>
		<dc:creator>Reiner</dc:creator>
		
		<category><![CDATA[Maven]]></category>

		<category><![CDATA[Grails]]></category>

		<category><![CDATA[English]]></category>

		<guid isPermaLink="false">http://blog.saddey.net/2010/02/10/teaching-mavenized-grails-to-survive-mvn-releaseprepare-releaseperform-with-hudson/</guid>
		<description><![CDATA[A mavenized Grails project has 2 competing sources stating the version of the application

&#60;version&#62; within pom.xml
app.version within application.properties

If 2. does not match 1. the grails-maven-plugin will abort the build, urging you to manually fix the version mismatch. Although somewhat clumsy, the release will still succeed if you edit application.properties and re-start the failing mvn release:prepare. [...]]]></description>
			<content:encoded><![CDATA[<p>A mavenized Grails project has 2 competing sources stating the version of the application</p>
<ol>
<li>&lt;version&gt; within pom.xml</li>
<li>app.version within application.properties</li>
</ol>
<p>If 2. does not match 1. the grails-maven-plugin will abort the build, urging you to manually fix the version mismatch. Although somewhat clumsy, the release will still succeed if you edit application.properties and re-start the failing mvn release:prepare. However, you&#8217;re somewhat stuck, if the release is to be performed from within a continous integration server (e.g. Hudson).</p>
<p>Thus I devised a work-around, that will compare both versions and update the version within application.properties if required. My work-around is far from perfect, as I was unable to integrate it within the Maven lifecycle defined by the grails-maven-plugin. This lifecycle will always and unconditionally bind its own code to the validate phase first (aborting on version mismatches). Therefore I resorted to binding my repair action to the clean phase and changed the goals of the maven-release-plugin to perform a clean before invoking the deploy. Note that this will produce a consistent war (both pom and application.properties set to the release version), but will <em>not</em> resolve the discrepancy within the tagged sources (i.e. application.properties will still state the snapshot version).</p>
<p>Here&#8217;s my code. It uses a profile, which is only activated, if the file application.properties is actually present. Thus the code can be included within a parent pom.xml that might be used with non-Grails projects as well:</p>
<pre>&lt;profiles&gt;
 &lt;profile&gt;
  &lt;id&gt;enable-reset.application.properties&lt;/id&gt;
  &lt;activation&gt;
   &lt;activeByDefault&gt;false&lt;/activeByDefault&gt;
   &lt;file&gt;
    &lt;exists&gt;application.properties&lt;/exists&gt;
   &lt;/file&gt;
  &lt;/activation&gt;
  &lt;build&gt;
   &lt;pluginManagement&gt;
    &lt;plugins&gt;
     &lt;plugin&gt;
      &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
      &lt;artifactId&gt;maven-release-plugin&lt;/artifactId&gt;
      &lt;configuration&gt;
       &lt;!-- invoke clean first - see below --&gt;
       &lt;goals&gt;clean deploy&lt;/goals&gt;
      &lt;/configuration&gt;
     &lt;/plugin&gt;
    &lt;/plugins&gt;
   &lt;/pluginManagement&gt;

   &lt;plugins&gt;
    &lt;!--
     Allow release:prepare/perform to succeed with Grails
     app. Reset application.properties.app.version to
     project.version Sorta hack on clean, as
     grails-maven-plugin:validate ALWAYS runs first and
     connot be preceeded by any other execution
    --&gt;
    &lt;plugin&gt;
     &lt;artifactId&gt;maven-antrun-plugin&lt;/artifactId&gt;
     &lt;version&gt;1.3&lt;/version&gt;
     &lt;executions&gt;
      &lt;execution&gt;
       &lt;id&gt;reset.application.properties&lt;/id&gt;
       &lt;phase&gt;clean&lt;/phase&gt;
       &lt;goals&gt;
        &lt;goal&gt;run&lt;/goal&gt;
       &lt;/goals&gt;
       &lt;configuration&gt;
        &lt;tasks&gt;
         &lt;taskdef resource="net/sf/antcontrib/antlib.xml"
          classpathref="maven.plugin.classpath" /&gt;
         &lt;if&gt;
          &lt;available file="application.properties" /&gt;
          &lt;then&gt;
           &lt;property file="application.properties"
            prefix="application.properties" /&gt;
           &lt;if&gt;
            &lt;not&gt;
             &lt;equals arg1="${project.version}"
              arg2="${application.properties.app.version}" /&gt;
            &lt;/not&gt;
            &lt;then&gt;
             &lt;propertyfile file="application.properties"
              comment="Grails Metadata file"&gt;
              &lt;entry operation="=" type="string" key="app.version"
               value="${project.version}" /&gt;
             &lt;/propertyfile&gt;
            &lt;/then&gt;
           &lt;/if&gt;
          &lt;/then&gt;
         &lt;/if&gt;
        &lt;/tasks&gt;
       &lt;/configuration&gt;
      &lt;/execution&gt;
     &lt;/executions&gt;

     &lt;dependencies&gt;
      &lt;dependency&gt;
       &lt;groupId&gt;org.apache.ant&lt;/groupId&gt;
       &lt;artifactId&gt;ant&lt;/artifactId&gt;
       &lt;version&gt;1.7.1&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
       &lt;groupId&gt;org.apache.ant&lt;/groupId&gt;
       &lt;artifactId&gt;ant-nodeps&lt;/artifactId&gt;
       &lt;version&gt;1.7.1&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
       &lt;groupId&gt;ant-contrib&lt;/groupId&gt;
       &lt;artifactId&gt;ant-contrib&lt;/artifactId&gt;
       &lt;version&gt;1.0b3&lt;/version&gt;
       &lt;exclusions&gt;
        &lt;exclusion&gt;
         &lt;groupId&gt;ant&lt;/groupId&gt;
         &lt;artifactId&gt;ant&lt;/artifactId&gt;
        &lt;/exclusion&gt;
       &lt;/exclusions&gt;
      &lt;/dependency&gt;
     &lt;/dependencies&gt;
    &lt;/plugin&gt;
   &lt;/plugins&gt;
  &lt;/build&gt;
 &lt;/profile&gt;
&lt;/profiles&gt;</pre>
<p>Links:</p>
<ul>
<li><a href="http://jira.codehaus.org/browse/GRAILS-5859?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel" title="GRAILS-5859 - maven release:prepare fails because of version not changed in application.properties" target="_blank">GRAILS-5859 - maven release:prepare fails because of version not changed in application.properties</a></li>
<li><a href="http://n4.nabble.com/maven-release-fails-because-of-app-version-td1366290.html" title="Grails User - maven release fails because of app.version" target="_blank">Grails User - maven release fails because of app.version</a></li>
<li><a href="http://wiki.hudson-ci.org/display/HUDSON/M2+Release+Plugin" title="Hudson - M2 Release Plugin" target="_blank">Hudson - M2 Release Plugin</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.saddey.net/2010/02/10/teaching-mavenized-grails-to-survive-mvn-releaseprepare-releaseperform-with-hudson/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Maven - Never Say Never in an updatePolicy</title>
		<link>http://blog.saddey.net/2010/02/07/maven-never-say-never-in-an-updatepolicy/</link>
		<comments>http://blog.saddey.net/2010/02/07/maven-never-say-never-in-an-updatepolicy/#comments</comments>
		<pubDate>Sun, 07 Feb 2010 13:36:42 +0000</pubDate>
		<dc:creator>Reiner</dc:creator>
		
		<category><![CDATA[Maven]]></category>

		<category><![CDATA[English]]></category>

		<guid isPermaLink="false">http://blog.saddey.net/2010/02/07/maven-never-say-never-in-an-updatepolicy/</guid>
		<description><![CDATA[I want to share a misconception that caused Maven to fail when looking for artifacts. Im my example I was upgrading from Grails 1.2.0 to 1.2.1 and including a dependency to grails.org:grails-core:[1.2.1,1.2.1]. Maven would just complain with Couldn&#8217;t find a version in &#8230;, although I verified that this particular version is indeed available at the [...]]]></description>
			<content:encoded><![CDATA[<p>I want to share a misconception that caused Maven to fail when looking for artifacts. Im my example I was upgrading from Grails 1.2.0 to 1.2.1 and including a dependency to grails.org:grails-core:[1.2.1,1.2.1]. Maven would just complain with <em>Couldn&#8217;t find a version in &#8230;</em>, although I verified that this particular version is indeed available at the remote repository.</p>
<p>My misconception was, that when declaring a remote release repository &lt;updatePolicy&gt;never&lt;/updatePolicy&gt; would only apply to <em>existing </em>artifacts, which - of course - need not be checked for remote changes (release artifacts must not change once they are released).</p>
<p>However, <strong>updatePolicy also applies to Maven meta data</strong>, i.e. which versions are available (and which one is the most current one). Thus, if there are any artifact versions already present in your local Maven repository, Maven will <strong>never</strong><em> </em>download any version that is not yet present in your local repository <img src='http://blog.saddey.net/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </p>
<p>See also <a href="http://jira.codehaus.org/browse/MNG-3006" title="[#MNG-3006] Maven does not always download artifacts from specified repos - jira.codehaus.org" target="_blank">Maven does not always download artifacts from specified repos</a>.</p>
<p>With release repositories, the default value for updatePolicy is &lt;updatePolicy&gt;daily&lt;/updatePolicy&gt;, which should be appropriate for most <em>external </em>Maven release repositories.</p>
<p>As we&#8217;re using a local <a href="http://nexus.sonatype.org/" title="Nexus | the repository manager" target="_blank">Nexus</a> for both hosting our own company repositories and for proxying external repositories as well, updatePolicy daily is too slow to avoid confusion when accessing internal releases from the Public Repositories group. So I chose to use &lt;updatePolicy&gt;always&lt;/updatePolicy&gt; instead and let Nexus settings determine the interval at which it refreshes external repository artifacts:</p>
<pre>&lt;repository&gt;
 &lt;!-- Use our local Nexus Public Repositories Group --&gt;
 &lt;id&gt;public&lt;/id&gt;
 &lt;name&gt;Public Repositories&lt;/name&gt;
 &lt;url&gt;http://ournexus.mycompany.com:8081/nexus/content/groups/public&lt;/url&gt;
 &lt;releases&gt;
  &lt;enabled&gt;true&lt;/enabled&gt;
  &lt;updatePolicy&gt;always&lt;/updatePolicy&gt;
  &lt;/releases&gt;
 &lt;snapshots&gt;
  &lt;enabled&gt;false&lt;/enabled&gt;
 &lt;/snapshots&gt;
&lt;/repository&gt;</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.saddey.net/2010/02/07/maven-never-say-never-in-an-updatepolicy/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Grails - How to Use Native Server Logging Configuration (e.g. Tomcat GlassFish JBoss)</title>
		<link>http://blog.saddey.net/2010/02/07/grails-how-to-use-native-server-logging-configuration-eg-tomcat-glassfish-jboss/</link>
		<comments>http://blog.saddey.net/2010/02/07/grails-how-to-use-native-server-logging-configuration-eg-tomcat-glassfish-jboss/#comments</comments>
		<pubDate>Sun, 07 Feb 2010 12:18:11 +0000</pubDate>
		<dc:creator>Reiner</dc:creator>
		
		<category><![CDATA[Grails]]></category>

		<category><![CDATA[English]]></category>

		<guid isPermaLink="false">http://blog.saddey.net/2010/02/07/grails-how-to-use-native-server-logging-configuration-eg-tomcat-glassfish-jboss/</guid>
		<description><![CDATA[Grails comes complete with logging out-of-the-box. However, if a Grails application is being deployed to a  production servlet container, it may be advisable or even required for Grails to step aside and let the server admins do their jobs  
Update: There&#8217;s a follow up that includes full source and a ready-to-deploy war. See [...]]]></description>
			<content:encoded><![CDATA[<p>Grails comes complete with logging out-of-the-box. However, if a Grails application is being deployed to a  production servlet container, it may be advisable or even required for Grails to step aside and let the server admins do their jobs <img src='http://blog.saddey.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p><strong>Update:</strong> There&#8217;s a follow up that includes full source and a ready-to-deploy war. See <a href="http://blog.saddey.net/2010/03/06/how-to-deploy-a-grails-application-to-jboss-5/" title="How to Deploy a Grails Application to JBoss 5">How to Deploy a Grails Application to JBoss 5</a>.</p>
<p>You need not avoid the loggers injected by Grails in order to use the native logging provided by servlet containers (e.g. Tomcat, GlassFish, JBoss). Grails loggers (always have implemented and now still) implement org.apache.commons.log.Log through jcl-over-slf4j delegating to some slf4j implementation adapter. You&#8217;re free to choose which logging system will ultimately perform the &#8220;real&#8221; logging. This is what we do:</p>
<ol>
<li>Use the slf4j Implementation adapter that delegates to the native logging supplied by the web server container, e.g. slf4j-log4j12 for JBoss or slf4j-jdk14 for GlassFish / standard Tomcat 6. One (and only one) of those must be packaged within the war.</li>
<li>Remove any logging implementation from our war (e.g. log4j), as it will be supplied by the  servlet container (e.g.  Log4j with JBoss or  Java-logging with GlassFish / standard Tomcat 6.x).</li>
<li>Disable Grails logging configurator.</li>
<li>Use whatever means the web server container offers to configure its logging.</li>
</ol>
<p>Step 2 can be implemented within grails-app/BuildConfig.groovy similar to:</p>
<pre>grails.war.resources = {stagingDir -&gt;
  def toRemove = [
          "$stagingDir/WEB-INF/lib/log4j-1.2.14.jar", // Logging -&gt; native GlassFish/Tomcat/JBoss
          "$stagingDir/WEB-INF/lib/log4j-1.2.15.jar", // "
          "$stagingDir/WEB-INF/classes/log4j.properties", // "
          "$stagingDir/WEB-INF/lib/slf4j-log4j12-1.5.6.jar", // "
          "$stagingDir/WEB-INF/lib/slf4j-log4j12-1.5.8.jar", // "
  ].each {
    delete(file: it)
  }
}</pre>
<p>Step 3 can be achieved by altering the web.xml, either verbatim or by means of a grails-app/scripts/_Events.groovy which might looks similar to:</p>
<pre>import groovy.xml.StreamingMarkupBuilder

eventWebXmlEnd = {String tmpfile -&gt;

 def root = new XmlSlurper().parse(webXmlFile)

 // remove some log4j stuff
 def log4j = root.listener.findAll {node -&gt;
   node.'listener-class'.text() == 'org.codehaus.groovy.grails.web.util.Log4jConfigListener'
 }
 log4j.replaceNode {}

 def log4jFile = root.'context-param'.findAll {node -&gt;
   node.'param-name'.text() == 'log4jConfigLocation'
 }
 log4jFile.replaceNode {}

 webXmlFile.text = new StreamingMarkupBuilder().bind {
   mkp.declareNamespace("": "http://java.sun.com/xml/ns/j2ee")
   mkp.yield(root)
 }
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.saddey.net/2010/02/07/grails-how-to-use-native-server-logging-configuration-eg-tomcat-glassfish-jboss/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Grails - UTF-8 Form Input Garbled when Running Within Tomcat</title>
		<link>http://blog.saddey.net/2010/02/06/grails-utf-8-form-input-garbled-when-running-within-tomcat/</link>
		<comments>http://blog.saddey.net/2010/02/06/grails-utf-8-form-input-garbled-when-running-within-tomcat/#comments</comments>
		<pubDate>Sat, 06 Feb 2010 13:05:57 +0000</pubDate>
		<dc:creator>Reiner</dc:creator>
		
		<category><![CDATA[Grails]]></category>

		<category><![CDATA[English]]></category>

		<guid isPermaLink="false">http://blog.saddey.net/2010/02/06/grails-utf-8-form-input-garbled-when-running-within-tomcat/</guid>
		<description><![CDATA[There are numerous articles describing charset problems when using Tomcat to run Grails applications that are supposed to accept UTF-8 characters (e.g. German umlauts äöüÄÖÜß). Most of them don&#8217;t mention a subtle cause that may jeopardize all your efforts to properly interpret UTF-8 form input. And fiddling around with Tomcat&#8217;s defaults was not an option [...]]]></description>
			<content:encoded><![CDATA[<p>There are numerous articles describing charset problems when using Tomcat to run Grails applications that are supposed to accept UTF-8 characters (e.g. German umlauts äöüÄÖÜß). Most of them don&#8217;t mention a subtle cause that may jeopardize all your efforts to properly interpret UTF-8 form input. And fiddling around with Tomcat&#8217;s defaults was not an option for me, as the same Tomcat instance is to run other non-Grails legacy applications that rely on ISO-8859-1 being the default character set.</p>
<p>It took me some time to find out that Grails applications (1.2.0) behave just as expected under Tomcat (6.x) without any modification whatsoever, provided you <strong>don&#8217;t use Tomcat&#8217;s RequestDumperValve</strong> within your server.xml or context.xml.</p>
<pre>&lt;!-- Reiner: If you include this in your context.xml or server.xml,
     form input will <strong>always</strong> be interpreted as ISO-8859-1 <img src='http://blog.saddey.net/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' />
&lt;Valve className=&#8221;org.apache.catalina.valves.RequestDumperValve&#8221;/&gt;
&#8211;&gt;</pre>
<p>The reason for RequestDumperValve to garble form input is that it causes POST-parameters to be evaluated (using default ISO-8859-1) <strong>before</strong> Grails request filters have had a chance to set the request encoding to UTF-8. This behaviour is <a href="http://tomcat.apache.org/tomcat-5.5-doc/config/valve.html#Request%20Dumper%20Valve" title="Apache Tomcat 5.5 Configuration - Request Dumper Valve" target="_blank">documented and RequestDumperValve is now deprecated due to its side effects</a>.</p>
<p>The ultimate cause to this problem is that most browsers do not bother to state the character set that has been used to encode POST-parameters, thus leaving it up to the server to guess. Grails does this out-of-the-box within its applicationContext.xml:</p>
<pre>&lt;bean id="characterEncodingFilter"
      class="org.springframework.web.filter.CharacterEncodingFilter"&gt;
      &lt;property name="encoding"&gt;
        &lt;value&gt;utf-8&lt;/value&gt;
      &lt;/property&gt;
&lt;/bean&gt;</pre>
<p>Credits: <a href="http://n4.nabble.com/UTF-8-issues-tomcat-vs-jetty-behaving-differently-tp1386332p1386333.html" title="Grails User - UTF-8 issues, tomcat vs jetty behaving differently" target="_blank">Ales at Grails User forum</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.saddey.net/2010/02/06/grails-utf-8-form-input-garbled-when-running-within-tomcat/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Build Maven, Build ant, Build ivy, Build gradle</title>
		<link>http://blog.saddey.net/2010/01/16/build-maven-build-ant-build-ivy-build-cradle/</link>
		<comments>http://blog.saddey.net/2010/01/16/build-maven-build-ant-build-ivy-build-cradle/#comments</comments>
		<pubDate>Fri, 15 Jan 2010 23:08:24 +0000</pubDate>
		<dc:creator>Reiner</dc:creator>
		
		<category><![CDATA[English]]></category>

		<category><![CDATA[Computers]]></category>

		<guid isPermaLink="false">http://blog.saddey.net/2010/01/16/build-maven-build-ant-build-ivy-build-cradle/</guid>
		<description><![CDATA[Have a look at Google Trends to see who&#8217;s likely to survive  
Ok, I&#8217;ll admit to be a Maven fan - because it&#8217;s the only one that has a holistic concept.
&#8230;that will never make it into the heads of people that attempt to reduce complexity to a hammer and all problems to the shape [...]]]></description>
			<content:encoded><![CDATA[<p>Have a look at <a href="http://www.google.com/trends?q=build+maven,+build+ant,+build+ivy,+build+gradle&amp;ctab=0&amp;geo=all&amp;date=all&amp;sort=0" title="Google Trends - http://www.google.com/trends?q=build+maven,+build+ant,+build+ivy,+build+cradle&amp;ctab=0&amp;geo=all&amp;date=all&amp;sort=0" target="_blank">Google Trends</a> to see who&#8217;s likely to survive <img src='http://blog.saddey.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Ok, I&#8217;ll admit to be a Maven fan - because it&#8217;s the only one that has a holistic concept.</p>
<p>&#8230;that will never make it into the heads of people that attempt to reduce complexity to a hammer and all problems to the shape of a nail.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.saddey.net/2010/01/16/build-maven-build-ant-build-ivy-build-cradle/feed/</wfw:commentRss>
		</item>
		<item>
		<title>How to persuade Hibernate to accept Nullable Timestamp Columns for Optimistic Locking</title>
		<link>http://blog.saddey.net/2010/01/13/how-to-persuade-hibernate-to-accept-nullable-timestamp-columns-for-optimistic-locking/</link>
		<comments>http://blog.saddey.net/2010/01/13/how-to-persuade-hibernate-to-accept-nullable-timestamp-columns-for-optimistic-locking/#comments</comments>
		<pubDate>Wed, 13 Jan 2010 18:13:12 +0000</pubDate>
		<dc:creator>Reiner</dc:creator>
		
		<category><![CDATA[Hibernate]]></category>

		<category><![CDATA[Java]]></category>

		<category><![CDATA[Grails]]></category>

		<category><![CDATA[English]]></category>

		<guid isPermaLink="false">http://blog.saddey.net/2010/01/13/how-to-persuade-hibernate-to-accept-nullable-timestamp-columns-for-optimistic-locking/</guid>
		<description><![CDATA[Lean code example implements Hibernate optimistic locking within a legacy database using a nullable(!) Timestamp/Datetime column.]]></description>
			<content:encoded><![CDATA[<p>Working on a Grails project that needs to access a legacy database, it proved quite time-consuming to implement optimistic locking in a way that can be handled by Hibernate. Optimistic locking used to be implemented within (legacy) application code and should now be handled by Hibernate completely on its own. For each entity, the legacy schema uses two <strong>nullable </strong>columns to both trace creation and last updated times as well as to provide optimistic locking capabilities.  <em>TS_INSERT</em> holds the Timestamp the entity has been created and <em>TS_UPDATE</em> (initially null) records subsequent mutations to an entity. Just <a href="http://denistek.blogspot.com/2009/12/grails-and-legacy-database.html" title="Denis Tek Blog - Grails and Legacy Database" target="_blank">disabling optimistic locking</a> (as well being advertised <a href="http://blog.javabilities.com/2009/06/access-legacy-database-using-gorm-dsl.html" title="The Javabilities Blog - Access a Legacy Database using GORM DSL" target="_blank">here</a>) keeps away run time errors but results in an application that cannot meet production quality demands without additional (awkward) application code.</p>
<p>Annotating the <em>TS_UPDATE</em> column with <em>@Version</em> almost did the trick, except it was unable to successfully update entities that had not yet been updated (<em>TS_UPDATE</em> is <strong>null</strong>). The reason for this behavior is burried within method <em>toStatementString</em> Hibernate <a href="http://www.google.com/codesearch/p?hl=en#IiI0JZ4wesY/hibernate/hibernate-3.1.2.tar.gz%7Cn_wph0kdUXg/hibernate-3.1/src/org/hibernate/sql/Update.java&amp;q=hibernate%20class%20Update" title="Hibernate 3.1 - Update" target="_blank">Update-</a> and <a href="http://www.google.com/codesearch/p?hl=en#IiI0JZ4wesY/hibernate/hibernate-3.1.2.tar.gz%7Cn_wph0kdUXg/hibernate-3.1/src/org/hibernate/sql/Delete.java&amp;q=hibernate%20class%20Delete" title="Hibernate 3.1 - Delete" target="_blank">Delete-</a>Code that use <em>TS_UPDATE=?</em> as part of the sql (prepared) statements in order to check for matching old version values. Of course, this condition will always yield false for null values (remember: <em>null = anything</em> including <em>null = null</em> <strong>always</strong> yields false).</p>
<h4>How to cause <em>TS_UPDATE=?</em> to yield <em>true</em>?</h4>
<p>Short of changing Hibernate source code I designed a <strong>work-around</strong>, that effectively changes the <em>TS_UPDATE=?</em> fragment so that it yields true, even for null values. The work-around replaces the <em>TS_UPDATE=?</em> with <em>COALESCE(TS_UPDATE,{ts &#8216;1900-01-01 00:00:00&#8242;})=COALESCE(?,{ts &#8216;1900-01-01 00:00:00&#8242;})</em>. I  use the <a href="http://en.wikipedia.org/wiki/Null_(SQL)#COALESCE" title="Wikipedia - Null - COALESCE" target="_blank">COALESCE function</a>, because it  is  specified by <a href="http://www.contrib.andrew.cmu.edu/~shadow/sql/sql1992.txt" title="Ansi SQL 92 Standard" target="_blank">Ansi SQL 92 Standard</a> and thus should be implemented by most database vendors.</p>
<h4>How to alter Hibernate sql statements?</h4>
<p>Hibernate provides a rather sophisticated set of <a href="http://www.google.com/codesearch/p?hl=en#IiI0JZ4wesY/hibernate/hibernate-3.1.2.tar.gz%7Cn_wph0kdUXg/hibernate-3.1/src/org/hibernate/Interceptor.java&amp;q=hibernate%20interface%20interceptor" title="Hibernate 3.1 - Interceptor" target="_blank">interceptor</a> methods, that will be called (back) at certain life cycle stages. Using the <strong><em>onPrepareStatement </em></strong>event, <strong>arbitrary </strong>changes can be applied to the sql statements that are then sent to JDBC for execution. This is what my interceptor looks like (note that it looks for <em>and&#8230;</em>  as the version condition will always be appended to the primary key condition - todo: this still needs to be verified for persisting collections):</p>
<pre>package com.carano.fw.hibernate.util.centura;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

import org.hibernate.EmptyInterceptor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * Fixes a shortcoming within Hibernate: Hibernate cannot handle NULL values
 * within optimistic version columns. The where clause will always include
 * e.g. TS_UPDATE=?. We'll try to fix this by changing the sql to e.g.
 * COALESCE(TS_UPDATE,{ts '1900-01-01 00:00:00'})=COALESCE(?,{ts '1900-01-01 00:00:00'}),
 * so that NULL values match.
 */
public class DBcenturaInterceptor extends EmptyInterceptor {

    private static final String PS = "(and) (ts_update)=?";
    private static final String RS = "$1 COALESCE($2,{ts '1900-01-01 00:00:00'})=COALESCE(?,{ts '1900-01-01 00:00:00'})";
    private static final Pattern P = Pattern.compile(PS, Pattern.CASE_INSENSITIVE);

    private final static Logger LOG = LoggerFactory.getLogger(DBcenturaInterceptor.class);

    public DBcenturaInterceptor() {
        super();
        LOG.info("new DBcenturaInterceptor()");
    }

    /**
     * @param sql the sql to be prepared
     * @return and TS_UPDATE=? replaced by
     *         and COALESCE(TS_UPDATE,{ts '1900-01-01 00:00:00'})=COALESCE(?,{ts '1900-01-01 00:00:00'})
     */
    @Override
    public String onPrepareStatement(final String sql) {
        final Matcher m = P.matcher(sql);
        final String result = m.replaceAll(RS);
        if (LOG.isTraceEnabled() &amp;&amp; !result.equals(sql)) {
            LOG.trace("onPrepareStatement(" + sql + ") = " + result);
        }
        return result;
    }

}</pre>
<h4>How to activate the interceptor?</h4>
<p>When creating a session, an interceptor can by passed to the Hibernate <em>SessionFactory.openSession(&#8230;)</em>. As my application is a <a href="http://www.grails.org/" title="Grails - The Search is over." target="_blank">Grails </a>application, I choose to provide my Interceptor by passing it to the Grails Hibernate session factory, so my interceptor will be used for all and every Hibernate session created within my Grails application. Starting from <a href="http://jira.codehaus.org/browse/GRAILS-4651" title="GRAILS-4651 - Allow setting custom entityInterceptor for Hibernate sessionFactory to allow usage of dynamic schemas for all SQL statements" target="_blank">Grails 1.2, just a single statement</a> is needed within <em>grails-app/conf/spring/resources.groovy</em>:</p>
<pre>import com.carano.fw.hibernate.util.centura.DBcenturaInterceptor

// Place your Spring DSL code here
beans = {
  entityInterceptor(com.carano.fw.hibernate.util.centura.DBcenturaInterceptor)
}</pre>
<p>For native Spring applications, have a look at <a href="http://www.nearinfinity.com/blogs/scott_leberknight/using_a_hibernate_interceptor_to.html" title="near infinity blog post - Using a Hibernate Interceptor To Set Audit Trail Properties">Using a Hibernate Interceptor To Set Audit Trail Properties</a>.</p>
<p>That&#8217;s all, take care and have fun <img src='http://blog.saddey.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.saddey.net/2010/01/13/how-to-persuade-hibernate-to-accept-nullable-timestamp-columns-for-optimistic-locking/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Hibernate Reverse Engineering Tool does not create @TYPE Annotation for User Types within POJOs</title>
		<link>http://blog.saddey.net/2010/01/09/hibernate-reverse-engineering-tool-does-not-create-type-annotation-for-user-types-within-pojos/</link>
		<comments>http://blog.saddey.net/2010/01/09/hibernate-reverse-engineering-tool-does-not-create-type-annotation-for-user-types-within-pojos/#comments</comments>
		<pubDate>Sat, 09 Jan 2010 13:32:46 +0000</pubDate>
		<dc:creator>Reiner</dc:creator>
		
		<category><![CDATA[Hibernate]]></category>

		<category><![CDATA[Java]]></category>

		<category><![CDATA[English]]></category>

		<guid isPermaLink="false">http://blog.saddey.net/2010/01/09/hibernate-reverse-engineering-tool-does-not-create-type-annotation-for-user-types-within-pojos/</guid>
		<description><![CDATA[Crafted a work-around for Hibernate Reverse Engineering Tool does not create @TYPE Annotation for User Types within POJOs.]]></description>
			<content:encoded><![CDATA[<p>Working on a Grails project that needs to access a legacy database, I&#8217;ve used the <a href="https://www.hibernate.org/255.html" title="Hibernate Tools for Eclipse and Ant" target="_blank">Hibernate Tools for Eclipse and Ant</a> to create annotated EJB3 entity classes.</p>
<p>As the database model uses some peculiar concepts (e.g. char(1) for booleans), I &#8216;ve created Hibernate custom types that properly map database types to Java types. The Hibernate Reveng Tool can be configured to map certain database columns to custom types, but it <strong>fails to create the @Type annotation</strong> that is required for custom user types. And as numerous reverse engineering cycle are about to be executed, I didn&#8217;t want to <a href="http://arrogantprogrammer.blogspot.com/2008/02/hibernate-reverse-engineering-and.html" title="Arrogant Programmer - Hibernate reverse engineering and " target="_blank">fix the generated sources by hand</a>.</p>
<p>There already exists a bug for this problem, but there has been no attempt to fix it during the past two years <img src='http://blog.saddey.net/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> Thus I&#8217;ve designed a <strong>work-around</strong> and documented it at <a href="http://opensource.atlassian.com/projects/hibernate/browse/HBX-849?focusedCommentId=35164&amp;page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_35164" title="BBX-849 - Tools does not insert @Type in POJOs for user types defined in reveng.xml" target="_blank">Issue HBX-849 - Tools does not insert @Type in POJOs for user types defined in reveng.xml</a> <img src='http://blog.saddey.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.saddey.net/2010/01/09/hibernate-reverse-engineering-tool-does-not-create-type-annotation-for-user-types-within-pojos/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Warum Vodafone und T-Mobile bei Skype zurück rudern</title>
		<link>http://blog.saddey.net/2009/05/13/warum-vodafone-und-t-mobile-bei-skype-zuruck-rudern/</link>
		<comments>http://blog.saddey.net/2009/05/13/warum-vodafone-und-t-mobile-bei-skype-zuruck-rudern/#comments</comments>
		<pubDate>Wed, 13 May 2009 19:37:38 +0000</pubDate>
		<dc:creator>Reiner</dc:creator>
		
		<category><![CDATA[Deutsch]]></category>

		<category><![CDATA[at other Locations]]></category>

		<category><![CDATA[Computers]]></category>

		<category><![CDATA[La Palma]]></category>

		<guid isPermaLink="false">http://blog.saddey.net/2009/05/13/warum-vodafone-und-t-mobile-bei-skype-zuruck-rudern/</guid>
		<description><![CDATA[Z.B. bei heise mobil - 11.05.09 - Vodafone und T-Mobile: Kein Streit mit Nokia wegen Skype-Handy liest man darüber, dass Vodafone und T-Online zuerst jegliche Skype-Nutzung verbieten und blockieren wollten, nun aber doch plötzlich wieder vom Monopol-Saulus zum kundenfreundlichen Paulus mutieren. Warum?
Wahrscheinlich liegt es an der EU!
Bei mir selbst ist das Thema durchaus aktuell: Mein [...]]]></description>
			<content:encoded><![CDATA[<p>Z.B. bei <a href="http://www.heise.de/mobil/Vodafone-und-T-Mobile-Kein-Streit-mit-Nokia-wegen-Skype-Handy--/newsticker/meldung/137636" title="heise mobil - 11.05.09 - Vodafone und T-Mobile: Kein Streit mit Nokia wegen Skype-Handy" target="_blank">heise mobil - 11.05.09 - Vodafone und T-Mobile: Kein Streit mit Nokia wegen Skype-Handy</a> liest man darüber, dass Vodafone und T-Online zuerst jegliche Skype-Nutzung verbieten und blockieren wollten, nun aber doch plötzlich wieder vom Monopol-Saulus zum kundenfreundlichen Paulus mutieren. Warum?</p>
<h4>Wahrscheinlich liegt es an der EU!</h4>
<p>Bei mir selbst ist das Thema durchaus aktuell: Mein Freund sitzt auf einer Datsche auf den Kanaren und ist nur per Handy zu erreichen. Da klingelt die Kasse, egal wer wen in welcher Richtung anruft.</p>
<p>Deshalb wollen wir ausprobieren, ob und wie das mit Skype funktioniert und ich habe jetzt zuvor versucht zu ergooglen, ob der VoIP- und Skype-Ausschluss, die ich mich entsinne noch vor kurzen in diversen AGBs von Vodafone Spain gesehen zu haben, sich auch auf den <em>&#8220;bono prepago&#8221;</em> (z.B. 1 Monat / 1GB / danach Drossel für 60€) beziehen.</p>
<p>Es ist wie im Ministerium für Wahrheit: Der String Skype oder sogar auch nur VOIP sind aus allen spanischen Vodafone-Dokumenten spurenlos getilgt. Dafür steht da jetzt überall nur noch P2P. Ich habe an meinem Verstand gezweifelt, bis ich heute auf eine Artikelsammlung unter dem Titel <a href="http://techblips.dailyradar.com/story/carriers_could_be_forced_by_eu_to_support_voip/" title="TechBlips - Carriers could be forced by EU to support VoIP services - Vodafone, Mobile" target="_blank">Carriers could by forced by EU to support VoIP services</a> stieß. Ach so ist das <img src='http://blog.saddey.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Bin gespannt, ob das nur ein Hütchenspielertrick von Vodafone Spanien ist. Nicht nur technisch ist Skype auch und gerade eine P2P-Anwendung. Die Verbindung und der Transport erfolgen - egal ob Sprache oder File-Transfer - immer direkt zwischen den Skype-Usern.</p>
<p>Die - noch nicht umgesetzte - EU-Drohung könnte auch erklären, warum T-Mobile und Vodafone in Deutschland die Drehrichtung ihrer Schrauben gerade nun  umkehren und japsend und für uns überraschend wieder zurück rudern. Insbesondere da Skype eben nicht nur Lieschen Müller ist, sondern neben seiner eigenen Größe noch dazu zu einer illüstren Familie gehört (eBay und PayPal).</p>
<h4>Nachtrag: Funktioniert super!</h4>
<p>Da müssen Vodafone et al auch Angst bekommen:</p>
<p>Funktioniert 1a - Sprachqualität sogar wesentlich besser (!!!) als per normalem Handy-Anruf, Verbrauch auf der spanischen Handy-Seite 3<br />
kByte/s = 180 kByte/min = ca. 1 Cent pro Minute (bei 60€ / 1 GByte).</p>
<p>Trost für Vodafone: Der Cent geht jetzt direkt zu Vodafone statt zum zum Konkurrenz-Discounter (Yoigo).</p>
<p>Nicht auszudenken, was demnächst alles passieren wird, wenn Nokia jetzt anfängt, Skype flächendeckend in seine Handies einzubauen&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.saddey.net/2009/05/13/warum-vodafone-und-t-mobile-bei-skype-zuruck-rudern/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Google Chrome and Java - Needing Both Java 5 and 6 - an Experience in Nightmares - Possible Solution Provided</title>
		<link>http://blog.saddey.net/2009/03/21/google-chrome-and-java-needing-both-java-5-and-6-an-experience-in-nightmares-possible-solution-provided/</link>
		<comments>http://blog.saddey.net/2009/03/21/google-chrome-and-java-needing-both-java-5-and-6-an-experience-in-nightmares-possible-solution-provided/#comments</comments>
		<pubDate>Sat, 21 Mar 2009 12:55:10 +0000</pubDate>
		<dc:creator>Reiner</dc:creator>
		
		<category><![CDATA[Chrome]]></category>

		<category><![CDATA[Java]]></category>

		<category><![CDATA[English]]></category>

		<category><![CDATA[Computers]]></category>

		<guid isPermaLink="false">http://blog.saddey.net/2009/03/21/google-chrome-and-java-needing-both-java-5-and-6-an-experience-in-nightmares-possible-solution-provided/</guid>
		<description><![CDATA[Java 6 has to be installed before installing Java 5 in order for Google Chrome to run Java applets.]]></description>
			<content:encoded><![CDATA[<p>When you google for Google Chrome and Java you&#8217;ll find poor souls that are driven to distraction by Chrome insisting that there is no Java 6 Update 10 or later installed.</p>
<p>Maybe, there are no problems on a clean virgin-like system in mint condition, just unwrapped from its packaging.  That&#8217;s not mine. I&#8217;m a Java developer and all sorts of Java VMs tend to pile up.  Right now, I&#8217;ll need at least two of them: Java 5 and Java 6.</p>
<p>After an hour of agonizing failures, I found a way to have both Java 5 and Java 6  on my PC and still be able to run Java applets within Google Chrome:</p>
<ol>
<li>Remove all and every bit of Java, including changes to environment variables (e.g. JAVA_HOME and PATH)</li>
<li>Install Java 6 SDK+JRE (as of now it&#8217;s Update 12 - ok for Chrome)</li>
<li>Install Java 5 SDK+JRE unchecking any browser applet integration checkboxes (not sure, whether this is required).</li>
<li>Add any environment variables you might need (pointing to Java 6).</li>
</ol>
<p>Now I have all three of them, Java 5, Java 6 and Chrome running Java 6 applets <img src='http://blog.saddey.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>It still puzzles me, I had to install Java 6 first and then Java 5. The other way around would not allow Chrome to recognize Java 6, regardless of any changes being applied to Java within Control Panel&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.saddey.net/2009/03/21/google-chrome-and-java-needing-both-java-5-and-6-an-experience-in-nightmares-possible-solution-provided/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 4.021 seconds -->
<!-- Cached page served by WP-Cache -->
<!-- Compression = gzip/x-gzip -->