CYA JBoss Portal; Getting Alfresco and GateIn Working Pt. 2

This is Part 2 in a series on working with GateIn portal, JBoss application server, and Alfresco 3.3 Inf you missed part 1 its here. In this part I’m going to run thru the basics of getting Alfresco and GateIn working such that content from Alfresco can be seen in the GateIn portal.The goal is to have a machine where I can develop alfresco and GateIn software without the need to run multiple app servers on my anemic laptop.  Sound like fun? Let’s get to it.

As with other posts I’ve done, I’ll be periodically posting this while writing it…I’ll put a note at the bottom while it is still a work in progress…

Configuring Alfresco 3.3 Community

You can look at my previous post on Alfresco 3.3, or forget all that and check out this page kindly pointed out to me in comments by Ryan. No matter what you do tho – don’t RTFM! RTFW instead. The actual Alfresco manual is wrong in many places. Use the Wiki. If you follow that very carefully then you will have Alfresco 3.3 successfully deployed.

On my machine (yes – my trusty T61p Win XP machine) I have Jboss installed to C:jboss-5.1.0.GA which gives me an “alf_data” folder in the bin. The alfresco.war and share.war files are deployed to the defaultdeploy folder: C:jboss-5.1.0.GAserverdefaultdeploy. The extension folders are here: C:jboss-5.1.0.GAserverdefaultconfalfresco. I placed ImageMagick here C:jboss-5.1.0.GAbinalf_dataImageMagick-6.6.3-Q16 that seems to work ok. My alfresco-global.properties is here: C:jboss-5.1.0.GAserverdefaultconf. The imagemagick configuration requires you to add two entries to this file:

img.root=C:/jboss-5.1.0.GA/bin/alf_data/ImageMagick-6.6.3-Q16
img.exe=C:jboss-5.1.0.GAbinalf_dataImageMagick-6.6.3-Q16/bin/convert.exe

Don’t put a slash at the end of the first one warns the “FM” 🙂

If you did all that right you should have an alfresco instance running in your jboss app server. I wrote all that stuff because sometimes it is helpful to me to see the paths that someone used…and also to give me a sense of hope that yes someone actually did it!

Configuring an Alfresco Development Environment

So great we have Alfresco installed – now what? Well this is a great opportunity for me to browse thru the new Professional Alfresco (Carauna, Newton, et al) book that I got for completing a survey on-line. We’ll see how this book is. I have Eclipse, Aptana, and IntelliJ 9 on my machine. I’ll first try out things with IntelliJ and see how things go. First off this is a Tomcat centric book so there will be some “translations” required.

Folder Locations are a bit different  – for development the important ones to remember are the extensions folder in C:jboss-5.1.0.GAserverdefaultconfalfresco; also if you plan to do stuff with OpenOffice you’ll need to install that.

In reading thru the book and taking a look at the Alfresco wiki for a bunch of hours it looks like the easiest path to portal integration (JSR-168 style) will be to develop some web scripts that throw up interesting slices of content.  Here are some of the links that I’ve been reading thru, in conjunction with the aforementioned book (which does not so far (page 77) to into any great detail on how exactly to deploy a customization):

  • http://wiki.alfresco.com/wiki/HTTP_API
  • http://localhost:8080/alfresco/service/
  • http://wiki.alfresco.com/wiki/HTTP_API#What_is_a_Web_Script.3F

While I’m reading this it seems like the best way to proceed would be to use an AJAX based remote api concept that relies primarily on JSON objects. So I’m re-reading a bunch of things on JSON, jQuery, and how to do this with Alfresco. Here’s some decent links on JSON and jQuery:

  • http://www.json.org
  • http://www.jquery.com
  • http://api.jquery.com/category/ajax/
  • http://visualjquery.com/ – AJAX sections
  • http://code.google.com/p/jquery-json/

I’ll start out just getting a simple authentication. I can use the alfresco authentication JSON service for this. I’ll post a JSON object to the server with the credential and I should get back a token. All this JSON, AJAX, and jQuery stuff has slowed me down. JSON I get – pretty simple stuff – check out json.org and jQuery (jquery.com) is also pretty simple, the combination is a bit rough. I got a book (jQuery in Action 2nd edition from Manning). So far so good – reading thru it. jQuery is pretty decent stuff if you have not used it…selectors are powerful stuff…its still scripting however 🙂

More to come…

1 Response

  1. andreea says:

    Is a great job…Nice

Leave a Reply