<?xml version="1.0" encoding="iso-8859-1"?>
<rss version="2.0">
  <channel>
    <title>Thinking in Seam</title>
    <link>http://abstractec.co.uk/blog/</link>
    <description>Thoughts on JBoss Seam in the real world</description>
    <language>en-us</language>           
    <generator>Nucleus CMS v3.24</generator>
    <copyright>©</copyright>             
    <category>Weblog</category>
    <docs>http://backend.userland.com/rss</docs>
    <image>
      <url>http://abstractec.co.uk/blog//nucleus/nucleus2.gif</url>
      <title>Thinking in Seam</title>
      <link>http://abstractec.co.uk/blog/</link>
    </image>
    <item>
 <title>Linux, Apache, PostgreSQL and Subversion</title>
 <link>http://abstractec.co.uk/blog/index.php?itemid=82</link>
<description><![CDATA[Another update that's slightly off the 'Seam' topic, but it's useful information anyway. This post is going to take you through installing Subversion (SVN) onto Linux (Ubuntu 8.10 server) and use a database running under PostgreSQL 8.3 for authentication. <br />
<br />
First up, install Ubuntu. I'll leave that one up to you to figure out, but I did not install the LAMP server option, just the PostgreSQL option as I don't need MySQL on this server. <br />
<br />
From this point, we need to update our repositories for apt-get. <br />
<br />
<pre style="font-face:courier,monospace;line-height:1;"><br />
sudo apt-get update<br />
</pre><br />
<br />
<i>You can just run a <span style="font-face:courier,monospace;line-height:1;">sudo su</span> to just log in as root</i>.<br />
<br />
Once that has completed, it's time to install the SVN server, apache, libapache2-svn and the libapache2-mod-auth-pgsql modules<br />
<br />
<pre style="font-face:courier,monospace;line-height:1;"><br />
sudo apt-get install subversion<br />
sudo apt-get install apache2<br />
sudo apt-get install libapache2-svn<br />
sudo apt-get install libapache2-mod-auth-pgsql<br />
</pre><br />
<br />
and give apache a nudge to restart with the modules<br />
<br />
<pre style="font-face:courier,monospace;line-height:1;"><br />
/etc/init.d/apache2 restart<br />
</pre><br />
<br />
OK, so let's do some work with PostgreSQL. First we need a database to store the SVN access details in. This database will have two tables, svnuser and svngroups. The first table will store the details of the user; login name, password, first name, surname and an email address along with an ID.<br />
<br />
Let's create the database and the user for that database. Using psql as the postgres user:<br />
<br />
<pre style="font-face:courier,monospace;line-height:1;"><br />
create database svnusers;<br />
create user svnuseradmin with password '&lt;your password&gt;';<br />
grant all privileges on database svnusers to svnuseradmin;<br />
</pre><br />
<br />
Now quit psql and check that the above user works.<br />
<br />
<pre style="font-face:courier,monospace;line-height:1;"><br />
psql -U svnuseradmin -W -h 127.0.0.1 svnusers<br />
</pre><br />
<br />
You're probably wondering why I'm specifying the loopback IP address as the host of the target database. Well, if you have a look at your pg_hba.conf file (under /etc/postgresql/8.3/main) and scroll to the bottom of the file, you will see that there are different rules for authenticating users connecting to the database depending on where they come from. By specifiying the IP address, you force PostgreSQL to perform MD5 authentication with the password you enter when trying to login rather than expecting ident or sameuser to work. If you don't want to do this repeatedly, then change 'ident sameuser' to 'md5' and restart PostgreSQL using /etc/init.d/postgresql restart.<br />
<br />
Now you're on the database, let's set up our two tables.<br />
<br />
<pre style="font-face:courier,monospace;line-height:1;"><br />
create table svnuser(<br />
    login varchar(20) primary key, <br />
    password varchar(60) not null, <br />
    firstname varchar(100) not null, <br />
    surname varchar(100) not null, <br />
    email varchar(255) not null);<br />
<br />
create index svnuser_login_idx on svnuser (login);<br />
<br />
create table svngroups (<br />
    login varchar(20) not null constraint svngroups_login_fk references svnuser (login), <br />
    svngroup varchar(50) not null);<br />
<br />
create index svngroups_login_idx on svngroups(login);<br />
<br />
alter table svngroups add constraint svngrousp_login_svngroup_unique unique (login, svngroup);<br />
</pre><br />
<br />
Now, we are going to have a group for the admins who will have access to every project and one group per project. Let's create a admin first.<br />
<br />
<pre style="font-face:courier,monospace;line-height:1;"><br />
insert into svnuser values (<br />
    '&lt;your username&gt;', <br />
    md5('&lt;your password&gt;'),<br />
    '&lt;your first name&gt;',<br />
    '&lt;your surname&gt;',<br />
    '&lt;your email address&gt;');<br />
<br />
insert into svngroups values ('&lt;your username&gt;', 'admin');<br />
</pre><br />
<br />
OK, let's set up repository. I have placed the repositories under /var/svn so move to that directory after you have created it. Once there, let's set up the repository as root.<br />
<br />
<pre style="font-face:courier,monospace;line-height:1;"><br />
svnadmin create test<br />
</pre><br />
<br />
Now, I want to be able to log into this repository using the user we have just created over HTTP (using WebDAV) so let's do that.<br />
<br />
Still as root, cd to /etc/apache2/mods-available and move dav_svn.conf and dav_svn.load to /etc/apache2/mods-enabled, then copy 000_auth_pgsql.load to /etc/apache2/mods-enabled/auth_pgsql.load. You can use the contents of dav_svn.conf to work out what's going on, but I usually clear this file and start from fresh.<br />
<br />
Add the following to the file:<br />
<br />
<pre style="font-face:courier,monospace;line-height:1;"><br />
&lt;Location /test/svn&gt;<br />
  DAV svn<br />
  SVNPath /var/svn/test<br />
<br />
  # Turn BASIC auth off and point it at a blank file,<br />
  # or you get a whole bunch of garbage in the logs<br />
  AuthBasicAuthoritative Off<br />
  AuthType Basic<br />
  AuthName "Test SVN Repository"<br />
  AuthUserFile "/dev/null"<br />
<br />
  Auth_PG_hash_type md5<br />
  Auth_PG_host localhost<br />
  Auth_PG_port 5432<br />
  Auth_PG_user svnuseradmin<br />
  Auth_PG_pwd &lt;your password&gt;<br />
  Auth_PG_database svnusers<br />
  Auth_PG_pwd_table svnuser<br />
  Auth_PG_uid_field login<br />
  Auth_PG_pwd_field password<br />
  Auth_PG_grp_table svngroups<br />
  Auth_PG_cache_passwords on<br />
<br />
  Auth_PG_grp_user_field login<br />
  Auth_PG_grp_group_field svngroup<br />
<br />
  Require group test admin<br />
&lt;/Location&gt;<br />
</pre><br />
<br />
And restart apache.<br />
<br />
Now, from a remote machine and using a browser go to:<br />
<br />
http://&lt;your server hostname or IP address&gt;/test/svn<br />
<br />
You should be prompted to enter a user name and password for authentication so enter the username and password you inserted into the svnuser record and then you will see the 0 revision of your test repository.]]></description>
 <category>General</category>
<comments>http://abstractec.co.uk/blog/index.php?itemid=82</comments>
 <pubDate>Tue, 3 Mar 2009 23:10:39 +0000</pubDate>
</item><item>
 <title>PayAtThePump Android</title>
 <link>http://abstractec.co.uk/blog/index.php?itemid=80</link>
<description><![CDATA[Not really Seam news, but hey, it's Java and it's using a Seam back-end. However, PayAtThePump is now available on the Google Android platform through the Android Market!<br />
<br />
If you're on Android in the UK or the US, go and check it out and let us know what you think. It's free!<br />
<br />
<br />
]]></description>
 <category>JBoss Seam</category>
<comments>http://abstractec.co.uk/blog/index.php?itemid=80</comments>
 <pubDate>Sun, 15 Feb 2009 19:33:48 +0000</pubDate>
</item><item>
 <title>RESTEasy problems</title>
 <link>http://abstractec.co.uk/blog/index.php?itemid=79</link>
<description><![CDATA[Well, not so much problems, but a problem - I can't persist!<br />
<br />
Having decided to use RESTEasy on a project we're currently working on rather than using the hand-rolled implementation of REST we were using previously. For read operations, this isn't a problem - however I'm not able to persist any updates. <br />
<br />
This is becoming such a problem that I'm getting really, really close to ripping out the update part and going back to the hand-rolled solution just for this area as too much time has been invested to get to this point to revert every other retrieval mechanism. Plus that part works reasonably well (although returning XML doesn't seem as simple as it should be).<br />
<br />
If anyone else has some insight into this particular problem, please let me know before I spend a couple of days implementing a replacement solution. <br />
<br />
Some background: we're using POJOs, Seam 2.1.0 SP1 and PostgreSQL on JBoss 4.2.3. The persist call grabs the next value from <i>hibernate_sequence</i> but doesn't write anything else into the logs. The one class we're trying to persist has the @ID as a long, one String and a Float object.]]></description>
 <category>JBoss Seam</category>
<comments>http://abstractec.co.uk/blog/index.php?itemid=79</comments>
 <pubDate>Sun, 15 Feb 2009 10:48:05 +0000</pubDate>
</item><item>
 <title>JBoss Seam 2.1.1.GA and Web Beans RI 1.0.0.ALPHA1</title>
 <link>http://abstractec.co.uk/blog/index.php?itemid=78</link>
<description><![CDATA[Hot on the heels of the CR2 release a few days ago, the Seam team have released the <a href="http://sourceforge.net/project/showfiles.php?group_id=22866&amp;package_id=163777&amp;release_id=647861">GA version of 2.1.1</a>. There aren't many bugs from the CR2 release so I thought I would actually list all the bugs for once<br />
<br />
<ul><br />
<li>[JBSEAM-3682] - empty data for date type throws exception in JXLHelper.createCell</li><br />
<li>[JBSEAM-3802] - Seamspace example - pages.xml is not a valid xml document</li><br />
<li>[JBSEAM-3803] - Openid example - typo in faces-config.xml</li><br />
<li>[JBSEAM-3817] - logLevel is not the correct name for the attribute, log-level is</li><br />
<li>[JBSEAM-3819] - grammar in http://docs.jboss.com/seam/latest/reference/en-US/html/tutorial.html</li><br />
<li>[JBSEAM-3830] - e:cell doesn't support null values</li><br />
<li>[JBSEAM-3834] - ClassCastException in Cell Column With Empty Date</li><br />
<li>[JBSEAM-3843] - Seamspace example - pages.xml uses logLevel attribute</li><br />
</ul><br />
<br />
Also just released is the Reference Implementation of Web Beans 1.0.0 (Alpha 1) <a href="http://sourceforge.net/project/showfiles.php?group_id=22866&amp;package_id=303713">over here</a>. I have been keeping an eye on the Web Beans stuff that's out there and that keeps popping up on the blogs and it is looking very interesting. Hopefully I will have a little time over the holidays to have a quick look at it... although I have promised myself that I will get two iPhone applications finished and look at Android (and read a couple of books and implement some new cool features on <a href="http://www.payatthepump.co.uk">Pay At The Pump</a>...) so there may be a blog posting about WB in the new year.<br />
]]></description>
 <category>JBoss Seam</category>
<comments>http://abstractec.co.uk/blog/index.php?itemid=78</comments>
 <pubDate>Tue, 23 Dec 2008 14:43:22 +0000</pubDate>
</item><item>
 <title>JBoss Tools 3.0.0.CR1</title>
 <link>http://abstractec.co.uk/blog/index.php?itemid=77</link>
<description><![CDATA[The latest CR release of JBoss Tools is <a href="http://sourceforge.net/project/showfiles.php?group_id=22866&amp;package_id=242269&amp;release_id=648401">available for download</a>. There are a whole bunch of bug fixes and new features in this release - too many for me to list in detail. <br />
<br />
I had upgraded to the latest version of JBoss tools prior to this release and it is much improved over the version I was previously using: much more stable. One of the major issues I had was that preview in the JSF editing view usually didn't show anything, however has been considerably better with the more recent release. Although I have had issues when using f:selectItems with preview. There is a resolved bug regarding f:selectItem (singular) so I think I may grab this release and see if my issue is resolved. <br />
]]></description>
 <category>JBoss Seam</category>
<comments>http://abstractec.co.uk/blog/index.php?itemid=77</comments>
 <pubDate>Sun, 21 Dec 2008 09:17:32 +0000</pubDate>
</item><item>
 <title>Seam 2.1.1.CR2</title>
 <link>http://abstractec.co.uk/blog/index.php?itemid=76</link>
<description><![CDATA[The latest version of Seam (2.1.1.CR2) is up over in the usual place. From the <a href="http://sourceforge.net/project/shownotes.php?release_id=645819">release notes</a> there are a couple of AS 5 related bugs, an upgrade to RichFaces, and a couple of NPE / missing reference bugs.]]></description>
 <category>JBoss Seam</category>
<comments>http://abstractec.co.uk/blog/index.php?itemid=76</comments>
 <pubDate>Wed, 10 Dec 2008 10:18:51 +0000</pubDate>
</item><item>
 <title>JBoss Seam 2.1.1.CR1</title>
 <link>http://abstractec.co.uk/blog/index.php?itemid=75</link>
<description><![CDATA[The first release candidate for Seam 2.1.1 is up <a href="http://sourceforge.net/project/showfiles.php?group_id=22866&amp;package_id=163777">over on sourceforge</a>. There's the usual raft of bug fixes and new features listed in the <a href="http://sourceforge.net/project/shownotes.php?release_id=641781">release notes</a>. One exiting new feature for me is support for OpenID. ]]></description>
 <category>JBoss Seam</category>
<comments>http://abstractec.co.uk/blog/index.php?itemid=75</comments>
 <pubDate>Fri, 21 Nov 2008 12:04:44 +0000</pubDate>
</item><item>
 <title>Hibernate Search 3.1.0.CR1</title>
 <link>http://abstractec.co.uk/blog/index.php?itemid=73</link>
<description><![CDATA[The fine folks over at Hibernate have released the first release candidate for Hibernate Search 3.1.0 <a href="http://hibernate.org/6.html">over here</a>. The main work in this release is to bring Hibernate Search into line with Lucene's new features and a few performance tweaks. ]]></description>
 <category>JBoss Seam</category>
<comments>http://abstractec.co.uk/blog/index.php?itemid=73</comments>
 <pubDate>Thu, 20 Nov 2008 23:18:52 +0000</pubDate>
</item><item>
 <title>Seam 2.1.0 Security Features</title>
 <link>http://abstractec.co.uk/blog/index.php?itemid=71</link>
<description><![CDATA[Over on Shane Bryzak's blog there is a post with a very good run down of the n<a href="http://shane.bryzak.com/articles/seam_security_gets_an_upgrade">ew security features</a> in Seam 2.1.0 along with an example of how to use the features.]]></description>
 <category>JBoss Seam</category>
<comments>http://abstractec.co.uk/blog/index.php?itemid=71</comments>
 <pubDate>Thu, 6 Nov 2008 09:19:31 +0000</pubDate>
</item><item>
 <title>Interview with Pete Muir on Seam 2.1</title>
 <link>http://abstractec.co.uk/blog/index.php?itemid=69</link>
<description><![CDATA[Over on JSF Central, there is an <a href="http://www.jsfcentral.com/articles/muir-10-08.html">interview with Pete Muir</a> about the Seam 2.1 release. The mp3 of the interview is also available. ]]></description>
 <category>JBoss Seam</category>
<comments>http://abstractec.co.uk/blog/index.php?itemid=69</comments>
 <pubDate>Sat, 1 Nov 2008 10:50:12 +0000</pubDate>
</item>
  </channel>
</rss>