<?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>ActivoRicordi Captain's log &#187; sap</title>
	<atom:link href="http://blog.activoricordi.com/category/sap/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.activoricordi.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Wed, 25 Aug 2010 15:22:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Jruby on Rails on SAP NetWeaver Studio</title>
		<link>http://blog.activoricordi.com/2009/08/jruby_on_rails_nwds/</link>
		<comments>http://blog.activoricordi.com/2009/08/jruby_on_rails_nwds/#comments</comments>
		<pubDate>Mon, 31 Aug 2009 10:40:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[JRuby]]></category>
		<category><![CDATA[sap]]></category>
		<category><![CDATA[JRuby on Rails]]></category>
		<category><![CDATA[sap netweaver]]></category>

		<guid isPermaLink="false">http://blog.activoricordi.com/?p=50</guid>
		<description><![CDATA[Many of you have already heard about JRuby and its Rails implementation called JRuby on Rails, for those who do not I would recommend to read the following articles: JRuby: The power of Java and Ruby This article which clearly explain the basics is about JRuby. This article from Java World gives an overview JRuby [...]]]></description>
			<content:encoded><![CDATA[<p>Many of you have already heard about JRuby and its Rails implementation called JRuby on Rails, for those who do not I would recommend to read the following articles:</p>
<ul>
<li><a href="http://www.youtube.com/watch?v=PfnP-8XbJao">JRuby: The power of Java and Ruby</a></li>
<li>This <a href="http://www.javaworld.com/javaworld/jw-07-2006/jw-0717-ruby.html">article</a> which clearly explain the basics is about JRuby.</li>
<li>This <a href="http://www.javaworld.com/javaworld/jw-02-2007/jw-02-jruby.html">article</a> from Java World gives an overview JRuby on Rails. </li>
<li>Additionally, there is another <a href="http://www.developer.com/lang/other/article.php/10942_3662031_2">article</a> from Developer.com which runs over the first steps on creating and deploying a JRuby on Rails application.</li>
</ul>
<p>Ok, once we are all on the same page, I am going to make a more detailed overview, on how to develop a JRuby on Rails project using SAP NetWeaver Studio. Just to mention that I am currently using version 7.1 SP6 which is built over Eclipse 3.3.0 and Java 5 Sdk.  I know it is a little bit more advanced than the most mayority of current SAP projects, which are probably using SAP NetWeaver Studio 7.0 but well, it is what I have.</p>
<p>There is an existing one-click installer from <a href="http://bitnami.org/stack/jrubystack">JRuby on Rails </a>suitable for testing for a company called bitnami, which has a very interesting market proposition. I am myself I use RubyStack with no futher problems.<br />
However, I have done manually to fully understand the development architecture. So let se which are the steps to perform:</p>
<p>1) Download JRuby: As first step, we are going to download latest version of JRuby from <a href="http://jruby.codehaus.org/">JRuby site</a>. In this case is JRuby 1.1.4, which can be download from its <a href="http://dist.codehaus.org/jruby/">repositories</a>. Select what it suits for your operating system.</p>
<p>While you wait it to download, if you like you can read something or you want watch a video related to JRuby on Rails, plese the following video:</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="src" value="http://www.youtube.com/v/PfnP-8XbJao&amp;hl=en&amp;fs=1&amp;rel=0&amp;color1=0x2b405b&amp;color2=0x6b8ab6" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/PfnP-8XbJao&amp;hl=en&amp;fs=1&amp;rel=0&amp;color1=0x2b405b&amp;color2=0x6b8ab6" allowfullscreen="true"></embed></object></p>
<p>Ok, now it is already download, we have to find the file and unzip. Do not underestimate the time it takes to find the file wherever you have download it. <img src='http://blog.activoricordi.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  .</p>
<p>As I always install my Jvm on the root directory of my C: drive (c:\jdk15,c:\jdk16,..) . I am going to follow the same procedure again, as it will ease the procedure of adding it to my PATH route. I do not know you but I am a little tired of adding things to my PATH, that I am not going to use so I have created a .bat file which do this for me. For more details about <a class="wp-caption" title="JRuby Getting Started" href="http://wiki.jruby.org/wiki/Getting_Started" target="_blank">how to getting started</a>. Obviously, it is designed to support my best practices, but you know today is &#8220;Convention over configuration&#8221; or DIY.</p>
<p>Prerequisites</p>
<p>JRuby 1.1.3 or higher<br />
Java 5 or higher<br />
Rails 2.0 or higher</p>
<p> Install Rails Framework &#8216;gems install rails -y&#8217; (if behind a http proxy, set HTTP_PROXY=http://${http-proxy-host}:${http-proxy-port}/)<br />
4. Install activerecord-jdbc &#8216;gems install activerecord-jdbc&#8217;<br />
5. Install database/jdbc driver (for mysql <a href="http://mysql.com/">http://mysql.com/</a>)<br />
6. Generate your Ruby on Rails application (<a href="http://rubyonrails.org/">http://rubyonrails.org/</a>)<br />
7. Modify database.yaml<br />
       development:<br />
           adapter: jdbc<br />
           driver: com.mysql.jdbc.Driver (for mysql)<br />
           url: jdbc:mysql://${database-hostname}/${db-schema}<br />
           username: ${username}<br />
           password: ${password}</p>
<p>8. Modify environment.rb by adding<br />
       require &#8216;active_record/connection_adapters/jdbc_adapter&#8217;</p>
<p>9. Download rails-integration-${version}-SNAPSHOT.jar into the WEB-INF/lib by checking out and building the rails-integration project<br />
svn://rubyforge.org/var/svn/jruby-extras/trunk/rails-integration<br />
10. Modify the template web.xml(see references below) with the right value of jruby.home<br />
11. Create a WEB-INF directory in the RoR application directory<br />
12. Copy web.xml to WEB-INF and rails-integration-${version}-SNAPSHOT.jar under WEB-INF/lib<br />
13. Jar up the RoR application directory contents as a WAR file</p>
<p>Requests to appropriate context-root of the deployed web application should invoke your Ruby code !</p>
<p>If you&#8217;d like to automate the building of a war file:<br />
Edit rails-integration/build.xml and add the following XML snippet<br />
  &lt;property environment=&#8221;env&#8221;/&gt;<br />
  &lt;target name=&#8221;build-rails-war&#8221; depends=&#8221;jar&#8221;&gt;<br />
    &lt;delete file=&#8221;${rails-app-dir}/${rails-app-name}.war&#8221;/&gt;<br />
    &lt;mkdir dir=&#8221;${rails-app-dir}/WEB-INF/lib&#8221;/&gt;<br />
    &lt;copy todir=&#8221;${rails-app-dir}/WEB-INF/lib&#8221;&gt;<br />
      &lt;fileset file=&#8221;${maven.build.directory}/${maven.build.final.name}.jar&#8221;/&gt;<br />
      &lt;fileset file=&#8221;${maven.repo.local}/org/jruby/jruby/0.9.1/jruby-0.9.1.jar&#8221;/&gt;<br />
      &lt;fileset file=&#8221;${maven.repo.local}/asm/asm/2.2.2/asm-2.2.2.jar&#8221;/&gt;<br />
      &lt;fileset file=&#8221;${maven.repo.local}/javax/activation/activation/1.1/activation-1.1.jar&#8221;/&gt;<br />
    &lt;/copy&gt;<br />
    &lt;copy todir=&#8221;${rails-app-dir}/WEB-INF/&#8221;&gt;<br />
      &lt;fileset file=&#8221;samples/scaffold/WEB-INF/web.xml&#8221;/&gt;<br />
    &lt;/copy&gt;<br />
    &lt;replace file=&#8221;${rails-app-dir}/WEB-INF/web.xml&#8221; token=&#8221;/usr/local/jruby&#8221; value=&#8221;${env.JRUBY_HOME}&#8221;/&gt;<br />
    &lt;jar jarfile=&#8221;${rails-app-dir}/${rails-app-name}.war&#8221; basedir=&#8221;${rails-app-dir}&#8221;/&gt;<br />
  &lt;/target&gt;<br />
Make sure JRUBY_HOME is set and run<br />
&#8216;ant -Drails-app-dir=${ror-app-dir} -Drails-app-name=${war-file-name} build-rails-war&#8217;<br />
${ror-app-dir}/${ror-app-name}.war should be ready for deployment !</p>
<p><code>jruby -S gem install -y rails warbler</code><br />
<code><br />
$JRUBY_HOME/bin/gem install activerecord-jdbc-adapter -y</code><br />
modify database.yml<br />
<code><br />
development:<br />
adapter: jdbc<br />
driver: com.mysql.jdbc.Driver<br />
url: jdbc:mysql://localhost/blabla_development<br />
username: root<br />
password: root<br />
</code><br />
Modify environment.rb<br />
<code><br />
require File.join(File.dirname(__FILE__), 'boot')<br />
if RUBY_PLATFORM =~ /java/<br />
require 'rubygems'<br />
RAILS_CONNECTION_ADAPTERS = %w(jdbc)<br />
end</code>I would recommend to read of <a href="http://blog.emptyway.com/">The empty Way</a><br />
<a href="http://wordpress.com/tag/jruby/">JRuby entries on WordPress</a></p>
<p>Rails::Initializer.run do |config|</p>
<p>This article is based on the following references:</p>
<ul>
<li><a href="http://wiki.jruby.org/wiki/JRuby_on_Rails">Wiki JRuby on Rails</a></li>
<li><a href="http://luposlip.blogspot.com/2007/07/solved-jror-goldspike-netweaver.html">Solved: JRoR, GoldSpike + NetWeaver</a></li>
<li><a href="http://blog.headius.com/2006/11/advanced-rails-deployment-with-jruby.html">Advanced Rails Deployment with JRuby</a></li>
<li><a href="http://blogs.sun.com/whacko/entry/deploying_a_ruby_on_rails"></a></li>
</ul>
<p>Kind regards</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.activoricordi.com/2009/08/jruby_on_rails_nwds/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Developing Java with SAP MaxDB Database &#8211; Part 1</title>
		<link>http://blog.activoricordi.com/2008/08/developing-java-with-sap-maxdb-database-part-1/</link>
		<comments>http://blog.activoricordi.com/2008/08/developing-java-with-sap-maxdb-database-part-1/#comments</comments>
		<pubDate>Wed, 27 Aug 2008 23:58:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[sap]]></category>
		<category><![CDATA[sap maxdb]]></category>
		<category><![CDATA[J2EE]]></category>
		<category><![CDATA[Java Development]]></category>
		<category><![CDATA[maxdb]]></category>

		<guid isPermaLink="false">http://blog.activoricordi.com/?p=43</guid>
		<description><![CDATA[SAP MaxDB is a relational database that provides functions for creating, using, and managing databases and the software comprises the database kernel, tools, and interfaces. SAP MaxDB has its own JDBC Driver which we can used to execute SQL statements with Java. It is a JDBC 2.0, that you can find on the following location [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>SAP MaxDB is a relational database that provides functions for creating, using, and managing databases and the software comprises the database kernel, tools, and interfaces.
</p></blockquote>
<p>SAP MaxDB has its own JDBC Driver which we can used to execute SQL statements with Java. It is a JDBC 2.0, that you can find on the following location of the installed MaxDB JDBC driver file at:<br />
<code><independent_program_path>\runtime\jar\sapdbc.jar</code> . For instance, when I installed on my local machine I did it on the following location:<br />
<code>D:\sapdb\programs\runtime\jar</code><br />
The java class for the JDBC drive is the <i>com.sap.dbtech.jdbc.DriverSapDB</i></p>
<p>Well, that enough for today. On the next<br />
Kind regards</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.activoricordi.com/2008/08/developing-java-with-sap-maxdb-database-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SAP MaxDB Database is like Phoenix Bird</title>
		<link>http://blog.activoricordi.com/2008/08/sap-maxdb-database-is-like-phoenix-bird/</link>
		<comments>http://blog.activoricordi.com/2008/08/sap-maxdb-database-is-like-phoenix-bird/#comments</comments>
		<pubDate>Wed, 27 Aug 2008 23:44:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[sap]]></category>
		<category><![CDATA[sap maxdb]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[max db]]></category>
		<category><![CDATA[sap max db]]></category>
		<category><![CDATA[sapdb]]></category>

		<guid isPermaLink="false">http://blog.activoricordi.com/?p=38</guid>
		<description><![CDATA[Due to the acquisition of MySQL by Sun, from October 5, 2007 MaxDB returns to be maintained by SAP again. This opens the future of this database initiative to a new path.]]></description>
			<content:encoded><![CDATA[<p>All:</p>
<p>Due to the acquisition of MySQL by Sun, from October 5, 2007 <a class="wp-caption" title="MaxDB Press Release" href="http://www.mysql.com/news-and-events/generate-article.php?id=2007_40" target="_blank">MaxDB returns to be maintained by SAP again</a>. This is an important news in two senses, on one side it is sad since mysql and maxdb have always been my favorite databases and having both supported by the same team was something that pleased me a lot.</p>
<p>But now situation have change and although I am going to still using mysql for many of my projects, I have decided to give some support to this database as well apart from the one that SAP gives to it on its <a class="wp-caption" title="MaxDB Site" href="https://www.sdn.sap.com/irj/sdn/maxdb" target="_blank">own developer&#8217;s web site</a>and in its<a class="wp-caption" title="SAP DB Wiki site" href="https://www.sdn.sap.com/irj/sdn/wiki?path=/display/MaxDB/" target="_blank">own wiki site</a>.</p>
<p>To make a little bit of history and put everybody in context, this is a open source project SAP launched in order to compete with its biggest rival Oracle on the database market. If the database was previously acquired from another vendor that something I do not know. Codename as sapdb it was released 7.3 and 7.4 versions.</p>
<p>In 2004, not having the sucess expected, they decided to handle this project to <a class="wp-caption" title="MySQL AB Corportate Web Site" href="http://www.mysql.org" target="_blank">MySQL AB</a> at the same time that SAP Ventures (SAP Venture Capital company )takes a participation at the company. They changed the name to MaxDB and together with <a class="wp-caption" title="MySQL AB Corportate Web Site" href="http://www.mysql.org" target="_blank">MySQL AB</a>, they launched around to 2005 the MaxDB 7.5. This project was meant to be an Open Source Enterprise Database alternative to Oracle for companies using MySQL for small applications.</p>
<p>As we said before, since <a class="wp-caption" title="SUN Corporate web site" href="http://www.sun.com" target="_blank">SUN</a> has acquire mysql, the MaxDB support has returned back home to SAP as it is going to be used by the german software company as an alternative for its clients to comercial databases.   Additionally, it is going to be used by SAP as the database of choice for its SaaS software, called, at least today, SAP BusinessByDesign. Obviously, considering it is no being yet launched this name will obviously changed in the future.</p>
<p>What will be future of SAP MaxDb now that it has been separated from mysql, some will say not very good, on my opinion that I have been working with SAP products for almost 10 years, it&#8217;s life it is about to begin. One I have learned from SAP is that never quit an idea. It will change names, strategies, versions, but if they believe they need to launch a database. Do not worry, it will take 20 years but they will make SAPDB, MaxDB , SAP MaxDB or whatever name leader on the database market.</p>
<p>Kind regards</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.activoricordi.com/2008/08/sap-maxdb-database-is-like-phoenix-bird/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
