Thursday, November 29, 2007

How to access Alfresco from Vista using Network Location

Abstract: This article describes setup process of Network Location in Microsoft Windows Vista to access Alfresco.

Alfresco is open source digital assets management system and has lots of useful features like support of multiple protocols for remote access. One of them is access to repository via CIFS/WebDAV, or, in plain English, from your Desktop. This gives you an easy way to transfer bunch of files to digital repo, preserving folder hierarchy.

Here is a list of actions:

1. Go to My Computer, right-click on it and choose 'Add Network Location'.
You'll see wizard window - click Next button, on the next screen choose custom location and click Next button, then in dialog window, which should ask for location of your website, type in something like and hit Next button, this will bring popup windows that propmts for access credentials, add username and password.

2. If all is good, you will see next window, that asks 'what do you want to name this location' - type in the name you want and hit Next button. At this step you should see final screen of the wizard, that confirms successful creation of network location, leave all default choices and hit Finish button.

3. Now you have web folder linked to your Alfresco digital assets repository and can drag
and drop files in or copy files to your computer.

Enjoy your alfresco ! :)

Possible problems:
You might get stuck on step one, because of differences in protocol implementation, when whatever you enter doesn't let you proceed to next step.
I have resolved this problem by downloading and installing following update for Microsoft Windows Vista Home Edition (called Software Update for Web Folders (KB907306) ).

Thursday, November 15, 2007

Integrating Java and C apps on Linux.

Abstract: This article consists of several parts that describe my experience with integrating C programs into Java-based infrastructure like Java Messaging.

Part 1. How to build C client for JMS on Fedora Core 6

In this part I'll show how to build C client for Java Message Queue on Fedora Core 6. The story began with some cool application in C with needed functionality, while I had no time and resources to re-write it in Java.We'll need to install following packages:

-bash-3.1# yum install nss.i386 compat-libstdc++-33.i386 screen

This will install C compatibilty libraries, NSS and dependent libraries.
Now we need to get Open Message Queue server and client code (community version).These commands will download and extract distro into /opt/sun/mq directory.

-bash-3.1#wget --no-check-certificate
-bash-3.1#mkdir -p /opt/sun
-bash-3.1#cd /opt/sun
-bash-3.1#unzip mq4_1-binary-Linux_X86-20070816.jar
-bash-3.1#cd mq

Lets run messaging server by issuing following commands:


This will create a screen session.

-bash-3.1#/opt/sun/mq/bin/imbrokerd -tty

This will start the server outputting a bunch of information into terminal.

To detach from screen session press Ctrl + A + D (so your server will be still running and you'll be able to return to it later by hitting screen -r)

In this tutorial I would limit it to single example, while you have three available in the directory. Let's use producer_consumer for the sake of simplicity and just change working directory:

-bash-3.1#cd demo/C/producer_consumer

There you'll see two C files - Consumer.c and Producer.c

At this point you are ready to start building your clients. Let's issue following commands:

-bash-3.1# g++ -DLINUX -D_REENTRANT -I/opt/sun/mq/include -o Producer -L/opt/sun/mq/lib -lmqcrt

You may see warning that complaints on possible conflict:

Producer.c/usr/bin/ld: warning:, needed by /opt/sun/mq/lib/, may conflict with

If we look at directory contents now, it should contain binary with file name Producer. If you try running it, it might spit out following error:

-bash-3.1# ./Producer

./Producer: error while loading shared libraries: cannot open shared object file: No such file or directory

This is easily fixed by adding libraries location to the path. Lets create file

-bash-3.1# nano /etc/

and add /opt/sun/mq/lib to it.

Then just run following command:


Now you should be able to build both source files and run it without errors:

-bash-3.1#g++ -DLINUX -D_REENTRANT -I/opt/sun/mq/include -o Consumer -L/opt/sun/mq/lib -lmqcrt Consumer.c

-bash-3.1#g++ -DLINUX -D_REENTRANT -I/opt/sun/mq/include -o Producer -L/opt/sun/mq/lib -lmqcrt Producer.c

-bash-3.1#ln -s Producer p; ln -s Consumer c; ls -al

At this point you should have binaries of C client that are able to publish and read messages to Messaging server.

For usage options run

-bash-3.1#./Producer -help


-bash-3.1#./Consumer help

If you need to know more about messaging server, that we used in this tutorial, visit this url In the next part of tutorial I'll describe integration of C client into existing application. Stay tuned.

Cloud Computing Google Group