<?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>Steve On Java &#187; how-to</title>
	<atom:link href="http://steveonjava.com/tag/how-to/feed/" rel="self" type="application/rss+xml" />
	<link>http://steveonjava.com</link>
	<description>Hacking Java, JavaFX, and Flash with Agility</description>
	<lastBuildDate>Thu, 01 Dec 2011 01:36:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Live Video Streaming Guide &#8211; Part 1 : Introduction</title>
		<link>http://steveonjava.com/live-video-streaming-guide-part-1-introduction/</link>
		<comments>http://steveonjava.com/live-video-streaming-guide-part-1-introduction/#comments</comments>
		<pubDate>Wed, 24 Feb 2010 00:47:00 +0000</pubDate>
		<dc:creator>steveonjava</dc:creator>
				<category><![CDATA[SvJugFx]]></category>
		<category><![CDATA[Video]]></category>
		<category><![CDATA[how-to]]></category>
		<category><![CDATA[streaming]]></category>

		<guid isPermaLink="false">http://steveonjava.com/?p=817</guid>
		<description><![CDATA[Recently I have been doing a lot of research, experimentation, and processing of videos for the Silicon Valley JavaFX User Group.  We decided from day 1 that we wanted to take things up a notch by providing high quality web streaming of our events.  It makes particular sense for us, because the JavaFX community is spread all [...]]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: left;margin-right: 0.75em;; margin-top: 4px; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fsteveonjava.com%252Flive-video-streaming-guide-part-1-introduction%252F%22%2C%20%22shorturl%22%3A%20%22http%3A%2F%2Fbit.ly%2FaHQqUq%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Live%20Video%20Streaming%20Guide%20-%20Part%201%20%3A%20Introduction%22%20%7D);"></div>
<!--S-ButtonZ 1.1.5 Start--><div style="float: left; width: 42px; padding-right: 10px; margin: 0 10px 0 0;">
		<script type="text/javascript">
		<!--
		var dzone_url = "http://steveonjava.com/live-video-streaming-guide-part-1-introduction/";
		var dzone_title = "Live Video Streaming Guide &#8211; Part 1 : Introduction";
		var dzone_style = "1";
		var dzone_blurb = "";
		//-->
		</script>
		<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script></div><!--S-ButtonZ 1.1.5 End--><p>Recently I have been doing a lot of research, experimentation, and processing of videos for the <a href="http://svjugfx.org/">Silicon Valley JavaFX User Group</a>.  We decided from day 1 that we wanted to take things up a notch by providing high quality web streaming of our events.  It makes particular sense for us, because the JavaFX community is spread all around the world, and we want to be able to reach as wide of an audience as possible.  However, once you have everything setup the overhead is minimal, so it is worthwhile to do for any user group or event.</p>
<div id="attachment_825" class="wp-caption alignnone" style="width: 486px"><a href="http://steveonjava.com/wp-content/uploads/2010/02/video-setup.jpg"><img class="size-full wp-image-825   " title="video-setup" src="http://steveonjava.com/wp-content/uploads/2010/02/video-setup.jpg" alt="" width="476" height="268" /></a><p class="wp-caption-text">Video setup for the first SvJugFx meeting with myself (left) and Keith Combs (right) running the rig.</p></div>
<p>Because this is a fairly in depth subject, I am going to cover it in a 4 part blog series.  Here are the topics (links will be added as each entry is published):</p>
<ul>
<li>Part 1 : <a href="http://steveonjava.com/2010/02/18/live-video-streaming-guide-part-1-introduction">Introduction</a> &#8211; You are reading it!</li>
<li>Part 2 : <a href="http://steveonjava.com/2010/03/06/live-video-streaming-guide-%E2%80%93-part-2-hardware/">Hardware</a> &#8211; This will give you an idea what hardware you need (including how to reuse what you have available).</li>
<li>Part 3 : Broadcasting &#8211; A step-by-step guide on how to stream video live from your event and tools to let your remote audience interact.</li>
<li>Part 4 : Post-processing &#8211; How to take the video assets you have and process them for upload complete with slides.</li>
</ul>
<p>By the end of this series you will be able to walk in to almost any venue and do live streaming on the spot.  You will also be able to post-process professional videos like <a href="http://steveonjava.com/2010/02/19/hinkmonds-javafx-mobile-dojo/">Hinkmond&#8217;s February JavaFX Mobile talk</a>.</p>
<p>Please drop feedback or comments below on anything specific you are interested on hearing me cover beyond what I have already mentioned!</p>
<div class="plus-one-wrap"><g:plusone href="http://steveonjava.com/live-video-streaming-guide-part-1-introduction/"></g:plusone></div><div style="clear:both;">&nbsp;</div>
]]></content:encoded>
			<wfw:commentRss>http://steveonjava.com/live-video-streaming-guide-part-1-introduction/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Running Liferay on Shared Hosting</title>
		<link>http://steveonjava.com/running-liferay-on-shared-hosting/</link>
		<comments>http://steveonjava.com/running-liferay-on-shared-hosting/#comments</comments>
		<pubDate>Fri, 26 Jun 2009 13:16:37 +0000</pubDate>
		<dc:creator>steveonjava</dc:creator>
				<category><![CDATA[Liferay]]></category>
		<category><![CDATA[how-to]]></category>
		<category><![CDATA[shared-hosting]]></category>

		<guid isPermaLink="false">http://steveonjava.com/?p=381</guid>
		<description><![CDATA[This is a little off my usual set of topics, but something that hopefully others will find valuable, since there is such little information about this on the net. Let&#8217;s say that you have are launching a new portal website for a Java technology project (such as projavafx.com or buildings insurance engine), and have the [...]]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: left;margin-right: 0.75em;; margin-top: 4px; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fsteveonjava.com%252Frunning-liferay-on-shared-hosting%252F%22%2C%20%22shorturl%22%3A%20%22http%3A%2F%2Fbit.ly%2Fe66Aly%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Running%20Liferay%20on%20Shared%20Hosting%22%20%7D);"></div>
<!--S-ButtonZ 1.1.5 Start--><div style="float: left; width: 42px; padding-right: 10px; margin: 0 10px 0 0;">
		<script type="text/javascript">
		<!--
		var dzone_url = "http://steveonjava.com/running-liferay-on-shared-hosting/";
		var dzone_title = "Running Liferay on Shared Hosting";
		var dzone_style = "1";
		var dzone_blurb = "";
		//-->
		</script>
		<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script></div><!--S-ButtonZ 1.1.5 End--><p>This is a little off my usual set of topics, but something that hopefully others will find valuable, since there is such little information about this on the net.</p>
<p>Let&#8217;s say that you have are launching a new portal website for a Java technology project (such as <a href="http://projavafx.com/">projavafx.com</a> or <a href="http://www.policyexpert.co.uk/home-insurance/buildings-insurance/">buildings insurance</a> engine), and have the following constraints/desires:</p>
<ol>
<li>You need a site that can handle dynamic content, access controls, forums, blogs, etc.</li>
<li>The underlying portal technology needs to be Java-based.  No way you are hacking PHP (been there, never again&#8230;)</li>
<li>You are on a budget.  It is a choice between server hosting and paying your cable bill, and not having the latter would impact your happiness more than the former.</li>
</ol>
<p>So, with those constraints, you might be brave enough to try putting <a href="http://www.liferay.com/">Liferay Portal</a> on a Shared Tomcat Hosting plan.  Would a dedicated VPS be easier?  Sure, but you also pay more $$$ per bandwidth/disk/cpu.</p>
<p>(I am intentionally not mentioned any hosting companies by name, but if you look around you should be able to find shared Tomcat hosting for under $10/month.)</p>
<h2>What to Download</h2>
<p><span id="more-381"></span>By default Liferay directs you to a self-contained Tomcat installer that will set up a new Tomcat instance from scratch.  You will need to grab this as well as the WAR distribution that is a little bit more buried on the site.  There are also some ancillary downloads, such as the tunnel-web jar that are helpful as well, all of which can be found in the Additional Files section:<a href="http://www.liferay.com/web/guest/downloads/additional"></p>
<p>http://www.liferay.com/web/guest/downloads/additional</a></p>
<p>At a minimum you will need:</p>
<ul>
<li>Liferay Portal 5.x Bundled with Tomcat 6.0 (default download)</li>
<li>Liferay Portal 5.x WAR</li>
</ul>
<p>(5.2.3 was the current version at the time of this writing, but feel free to grab the latest and let me know if anything has materially changed by leaving a comment.)</p>
<h2>Basic Setup</h2>
<p>The default Liferay configuration assumes that you have access to the Tomcat directory and can drop shared libraries and such into the base installation.  This is definitely not possible in a shared environment, so instead we will hack the WAR file to make everything work cleanly instead:</p>
<ol>
<li>Unpack liferay-portal-tomcat-6.0-5.x.zip</li>
<li>Look for the jar files under tomcat-6.x/lib/ext</li>
<li>Copy all the jar files from that folder into liferay-portal-5.x.war under WEB-INF/lib</li>
</ol>
<p><strong>Note</strong>:  You would think that the Liferay Portal Dependencies jar from the Additional Files section would contain all the jars you need, but it only has a subset.  Unfortunately, the only way to get the full set of jars is by grabbing them from the bundled Tomcat distribution.</p>
<p>The next problem is that you won&#8217;t have access to the shared Tomcat context to setup custom context properties.  Fortunately, all of this can be easily configured in a portal-ext.properties file, which is formatted as a standard Java properties file.  Some of the parameters that you will need to use include:</p>
<ul>
<li>portal.ctx &#8211; This allows you to set the LifeRay root context if you are running from a sub-folder (which is very common in a shared hosting environment)</li>
<li>liferay.home &#8211; Folder where liferay will store documents and artifacts.  This should be set to an absolute path within your home folder that is configured to be writable by the Tomcat process.</li>
<li>jdbc.default.* &#8211; You can set the dirverClassName, url, username, and password that are specific to your hosting environment.</li>
</ul>
<p>Here is an example portal-ext.properties file:</p>
<pre class="brush: plain; title: ; notranslate">
portal.ctx=/portal
liferay.home=/home/widgetfx/liferay
jdbc.default.driverClassName=com.mysql.jdbc.Driver
jdbc.default.url=jdbc:mysql://localhost/widgetfx_liferay?useUnicode=true&amp;amp;characterEncoding=UTF-8&amp;amp;useFastDateParsing=false
jdbc.default.username=xxxxxxxx
jdbc.default.password=xxxxxxxx
</pre>
<p>Once you have updated it for your server hosting settings, add it to liferay-portal-5.x.war under WEB-INF/classes.</p>
<p>All that is left is to make sure your database is setup and deploy this WAR file to your hosting provider.  Liferay should come up by itself, or if not check catalina.out for common errors (like database access permissions).</p>
<p><strong>cPanel Tip:</strong> If your shared hosting provider uses cPanel to deploy Tomcat applications, you may have trouble getting it to map requests from Apache to Tomcat under the Liferay directory.  An easy way to do this without hacking Apache is to put a .htaccess file under the Liferay root directory with the following contents:</p>
<pre class="brush: bash; title: ; notranslate">
SetHandler jakarta-servlet
SetEnv JK_WORKER_NAME ajp13
</pre>
<h2>Setting up Multiple Instances</h2>
<p>All the instructions so far assume you are only setting up one instance (and that no one else has already setup a Liferay instance on the same server).  However, if you want to go multi-instance or just prevent future collisions, some more invasive hacking is required.</p>
<p>Inside of liferay-portal-5.x.war, hidden in portal-impl.jar there is some magical JMX and MBean magic to handle statistcs and configuration that will blow up horribly with multiple instances.  To disable this you will need to:</p>
<ul>
<li>extract WEB-INF/lib/portal-impl.jar</li>
<li>inside portal-impl.jar edit META-INF/hibernate-spring.xml and change the statistics key to a unique value (highlighted in bold):<br />
<code>&lt;entry key="Hibernate:name=<strong>statistics</strong>"&gt;</code></li>
<li>inside portal-impl.jar edit META-INF/messaging-sprint.xml and comment out the JMX bean and reference to it in MessagingConfigurator bean:<br />
<code>&lt;!--&lt;ref bean="com.liferay.portal.kernel.messaging.jmx.JMXMessageListener" /&gt;--&gt;</code></li>
</ul>
<p>Once these changes are deployed you can now safely bring up multiple instances as separate Tomcat web applications.</p>
<p><strong>Congratulations, you now have a Liferay instance working on your shared server configuration!</strong></p>
<h2>What Next?</h2>
<p>While this covers the basics, here are some things that require additional tweaking:</p>
<ul>
<li>Plug-ins cannot be cannot be installed automatically</li>
<li>Additional Liferay themes need to be manually deployed</li>
<li>Tunnel-web needs to be configured differently</li>
</ul>
<p>If I am feeling adventurous (and there is interest), I will do a part 2 of this to go over tunnel-web and plug-in/theme configuration in a shared hosting environment.</p>
<div class="plus-one-wrap"><g:plusone href="http://steveonjava.com/running-liferay-on-shared-hosting/"></g:plusone></div><div style="clear:both;">&nbsp;</div>
]]></content:encoded>
			<wfw:commentRss>http://steveonjava.com/running-liferay-on-shared-hosting/feed/</wfw:commentRss>
		<slash:comments>24</slash:comments>
		</item>
	</channel>
</rss>

