Archive for the ‘Java’ Category

Java/J2EE/JEE employment tips : how to get hired

Saturday, February 4th, 2006

Any slightly experienced developer knows that once you have acquired the basic algorithmic, methodologic and design skills, such as the Imperative and Object Oriented paradigms, it is quite easy to learn another language.
If you are quite new to the Java/J2EE world and want to be hired in this area (it looks like most developer jobs resolve around Java/J2EE these days..),  make sure that you first learn, or at least know the basics of all the hype skills in this domain. During any interview, you will get asked, at least, the following set of questions :

There are some other recurring questions that I don’t remember, but getting more information on the subjects above will, in any case, help during any interview.

ServiceMix JBI Container and PXE BPEL: Theory and practice..

Thursday, January 26th, 2006

While speaking about a work I achieved last summer, related to ServiceMix (a JBI container) and PXE ( a BPEL engine that can be embedded inside ServiceMix), a friend of mine came up to the following conclusion :

In theory, theory and practice are the same whereas in practice, they are not.

I love that sentence :-)

So, here is a small HOWTO, taken from the email I sent to ServiceMix mailing list :

How to get a BPEL process running with ServiceMix JBI Container and Fivesight's
PXE :
===

1) The first step is to create a BPEL process with the corresponding WSDL files.
Examples bundled with PXE can serve as a quickstart.

2) Remove any concrete bindings in the WSDL Files (
binding and service XML tags). Indeed, the endpoints are JBI proxies, so the
SOAP over HTTP bindings are useless here. PXE and ServiceMix will take care of
registering ports as JBI Service endopints.

3) Compile your BPEL process and WSDL files
let's say the main WSDL file describing the process is in the
MissionPlanningProcess.wsdl (this file must import the other WSDL files that
are
used :

REM add the resources to PXE's Resources Repository MissionPlanning.rr
rradd -wsdl file:MissionPlanningProcess.wsdl MissionPlanning.rr

REM compile the BPEL
bpelc -rr MissionPlanning.rr -wsdl file:MissionPlanningProcess.wsdl
file:MissionPlanning.bpel

4) Create a pxe-system.xml file that describes how to bind the BPEL process to
actual JBI endpoints. (PXE's deployment descriptor)

Let's say that the MissionPlanning process provides 3 portTypes :
proc:ProcessPT, proc:CallbackPT, resp:ResponderPT.

We want to expose 2 services :
ProcessSVC that exposes the proc:processPT and proc:CallbackPT porttypes
and
ResponderSVC that exposes the resp:ResponderPT portType.

(same names as the Async example bundled with PXE)

the corresponding pxe-system.xml file would be :

http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://www.fivesight.com/pxe/system-descriptor/
http://www.fivesight.com/pxe/system-descriptor/";
wsdlUri="file:MissionPlanningProcess.wsdl"
xmlns="http://www.fivesight.com/pxe/system-descriptor/";
xmlns:proc="uri:concordia.ciise.weather.process"
xmlns:resp="uri:concordia.ciise.weather.responder">







Pay attention to use the same value for the "name" attribute in the
system-descriptor tag, as the name of the BPEL process. (current limitations
with PXE, should be fixed in the future)

5) We now have all the necessary artifacts to create a SAR (System Archive) file
that is just a container for all these files :

sarcreate -common MissionPlanning.rr -sysd pxe-system.xml MissionPlanning.cbp
pxe.sar

6) JBI needs deployable components (the SAR in this case) to be contained in a
zip file. The zip file is referred later as a Service Unit. (hence the -su)

=> create the output directory
=> jar cf outputMissionPlanning-su.zip pxe.sar
(or use any tool that can create a .zip)

7) Package this service unit inside a so-called Service Assembly (SA), which is
just a set of service units with a jbi.xml
For example, create the following outputMETA-INFjbi.xml file :

http://java.sun.com/xml/ns/jbi  ./jbi.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns="http://java.sun.com/xml/ns/jbi";>

MissionPlanningSA
Service Assembly containing just the BPEL
deployment.

MissionPlanning
BPEL Service Unit

MissionPlanning-su.zip
PxeBpelEngine

and create the jar :
cd output
echo creating Service Assembly
jar cf ..MissionPlanning-sa.jar *
cd ..

component-name refers to the name of the BPEL engine deployed in the JBI
container.

 8) Create a servicemix.xml file that launches a JBI container.
An example is bundled with ServiceMix's AsyncDemo example :
Pay attention to :

and

in the installationDirPath, you will have to drop the PXE's JBI component.
(bundled with ServiceMix). If ServiceMix doesn't detect PXE nor install it, then
it means there is a problem in your installationDirPath. (For example, if
ServiceMix is integrated inside Geronimo, the "." directory refers to
GERONIMO_HOME

the deploy directory is where you will drop the Service Assembly

9) launch service mix (either standalone, or by sourcing the spring file.
If you source the spring file, make sure you use ServiceMix's Spring version.
The XML extension mechanism is not yet available from upstream Spring, so
Spring won't recognize servicemix's specific spring syntax.

10) Here you go, you can then talk to your BPEL process from other JBI
components (more information in another HOWTO)
I hope that this HOWTO will help someone some day...

JRrequire, such a nice idea !

Wednesday, January 18th, 2006

JRequire is, in my humble opinion, a necessary tool to create true eXtreme Programming Processes. It allows to express Functional Requirements and

JRequire is a tool that maps code to specific requirements, which is useful for both coders and project managers.

Complete Top-down processes are not something programmers enjoy, this is why JRequire has a really nice potential.