You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Fitzcaraldo <Br...@marlo.com.au> on 2013/04/24 08:28:26 UTC

JCAPS to Camel

Hi
We're looking at a project to retire some JCAPS/ECANN interfaces for a
client and replace them with Camel routes.  Has anyone done this before and
has tips or traps to share?  
Thanks



--
View this message in context: http://camel.465427.n5.nabble.com/JCAPS-to-Camel-tp5731389.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: JCAPS to Camel

Posted by "Walzer, Thomas" <th...@integratix.net>.
Brian,

I did some JCAPS2Camel conversions:

The mapping in JCAPS/ICAN can be either XSLT or jcd. XSLT is trivial to migrate to Camel. I will not detail this here.

jcd-style mapping works usually as follows (pseudocode):

receive()
unmarshal source format
target.fieldX.set(source.fieldY.get())
….
marshal target format
send()

so it´s basically what you sketched out below+unmarshalling+getters+setters+marshalling. This can almost literally be translated to Camel. You could put most of your jcd into a bean and do the rest (from+to+all the EIP goodies) with a DSL of your choice.

I would *not* stick with the OTDs (even if that should be possible somehow) but rather re-do them new (with BeanIo). I had some issues (multi-byte characters) with Bindy.
The file-component is much more elegant to use in Camel, it´s much easier, more concise, more powerful as the file eway.
One gotcha: With jdbc/sql you have to limit the field-length in Camel yourself (OTDs do this for you)
JMS can be bridged from JCAPS-STCMS to ActiveMQ so you can make a smooth transition fitting your time-frame.

Webservices are (just my personal opinion) a bit easier to get along with in JCAPS, the learning curve for CXF is -uhmm- steep. If you know your 2-3 tricks it should be easy&straightforward.
FTP-component is great, too. So no problems there.

There are a lot more choices (DSL, container, etc.) in Camel. I personally like blueprint+Karaf. When you compare a route deployed to Karaf to an .ear file deployed to Glassfish you see the following things:

-) startup/shutdown a *lot* faster
-) much less memory (like 150 mega compared to 1 giga for the exact same functionality)
-) less CPU usage
-) build much faster
-) deploy much faster
-) config changes much easier

There are many other features (clustering/fabric/cloud, up-to-date IDE, JMX-monitoring,webconsole, hawtio,…) worth exploring and the development-cycle is lightning fast.
JCAPS/ICAN was 1990, Camel is 2005

cons: a lot to learn, sometimes frustration with the documentation
pros: access to source (!), extremely flexible and advanced architecture, fantastic support for testing

Bottom line: just do it (if no management interferes). If you can get help, your learning curve can be flattened a bit.

Hope this helps, Thomas.


Am 24.04.2013 um 09:44 schrieb Fitzcaraldo <Br...@marlo.com.au>:

> All endpoints are either FTP, JMS, WS or JDBC so it is well within what Camel
> can do.  JCAPS models messages as Object Type Definitions (OTD) and these
> are all XSDs or CSVs and so can be converted easily.  
> 
> The JCAPS equivalent of a Camel route is a JCD class. Here's an example that
> writes an incoming string to a file and a queue:
> 
> public class Collaboration_1
> {
>   public com.stc.codegen.logger.Logger logger;
>   public com.stc.codegen.alerter.Alerter alerter;
>   public com.stc.codegen.util.CollaborationContext collabContext;
>   public com.stc.codegen.util.TypeConverter typeConverter;
> 
>   public void receive( com.stc.connector.appconn.file.FileTextMessage
> input,
>      com.stc.connector.appconn.file.FileApplication FileClient_1,
>      com.stc.connectors.jms.JMS JMS_1,employees.EmployeesOTD Employees_1 )
>      throws Throwable
>   {
>     com.stc.connectors.jms.Message msg = JMS_1.createTextMessage(
> input.getText() );
> 
>     employees.EMPLOYEES emp = Employees_1.getEMPLOYEES();
> 
>     JMS_1.send( msg );
> 
>     FileClient_1.setText( input.getText() );
> 
>     FileClient_1.write();
>   }
> }
> 
> I haven't yet been able to find an example of format conversion but assume
> it uses XSLT or Java object mapping (anyone know?).
> 
> I was hoping someone might have been down this path before and would be
> prepared to share their experiences.
> 
> Thanks
> 
> 
> 
> 
> 
> 
> --
> View this message in context: http://camel.465427.n5.nabble.com/JCAPS-to-Camel-tp5731389p5731404.html
> Sent from the Camel - Users mailing list archive at Nabble.com.


Re: JCAPS to Camel

Posted by Fitzcaraldo <Br...@marlo.com.au>.
All endpoints are either FTP, JMS, WS or JDBC so it is well within what Camel
can do.  JCAPS models messages as Object Type Definitions (OTD) and these
are all XSDs or CSVs and so can be converted easily.  

The JCAPS equivalent of a Camel route is a JCD class. Here's an example that
writes an incoming string to a file and a queue:

public class Collaboration_1
{
   public com.stc.codegen.logger.Logger logger;
   public com.stc.codegen.alerter.Alerter alerter;
   public com.stc.codegen.util.CollaborationContext collabContext;
   public com.stc.codegen.util.TypeConverter typeConverter;

   public void receive( com.stc.connector.appconn.file.FileTextMessage
input,
      com.stc.connector.appconn.file.FileApplication FileClient_1,
      com.stc.connectors.jms.JMS JMS_1,employees.EmployeesOTD Employees_1 )
      throws Throwable
   {
     com.stc.connectors.jms.Message msg = JMS_1.createTextMessage(
input.getText() );

     employees.EMPLOYEES emp = Employees_1.getEMPLOYEES();

     JMS_1.send( msg );

     FileClient_1.setText( input.getText() );

     FileClient_1.write();
   }
}

I haven't yet been able to find an example of format conversion but assume
it uses XSLT or Java object mapping (anyone know?).

I was hoping someone might have been down this path before and would be
prepared to share their experiences.

Thanks






--
View this message in context: http://camel.465427.n5.nabble.com/JCAPS-to-Camel-tp5731389p5731404.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: JCAPS to Camel

Posted by Christian Müller <ch...@gmail.com>.
May be you can share a bit more about the interfaces? Is it HTTP based? May
be SOAP or REST?

Best,
Christian


On Wed, Apr 24, 2013 at 8:28 AM, Fitzcaraldo
<Br...@marlo.com.au>wrote:

> Hi
> We're looking at a project to retire some JCAPS/ECANN interfaces for a
> client and replace them with Camel routes.  Has anyone done this before and
> has tips or traps to share?
> Thanks
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/JCAPS-to-Camel-tp5731389.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Re: JCAPS to Camel

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

We got started on this 5 years ago. And my former client is retiring
their last JCAPS integration this year.

Just being able to "free" your business logic and store this in a
regular code repository like SubVersion, Git, etc is a big big win.
And using regular Java / Spring code that everybody else has been
doing for a decade is also a big win.
And being able to use unit testing etc.

And for great docs, then I suggest to read this intro article about Camel
http://java.dzone.com/articles/open-source-integration-apache

And if can afford to splash the cash, then you can consider the Camel
in Action book (I am co-author of that book)
As well there is other authors currently writing on new book(s) as
well. So more books in the future about Camel.

The docs on the Camel website, is not really well read as a book, but
as a reference guide, as well for short articles about a specific
topic. And use the search box on the front page to find links if you
have some keywords.

And then you can use this mailing list as the community is very active
and often very responsive.

Good luck.




On Wed, Apr 24, 2013 at 8:28 AM, Fitzcaraldo
<Br...@marlo.com.au> wrote:
> Hi
> We're looking at a project to retire some JCAPS/ECANN interfaces for a
> client and replace them with Camel routes.  Has anyone done this before and
> has tips or traps to share?
> Thanks
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/JCAPS-to-Camel-tp5731389.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Re: JCAPS to Camel

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

And if you are looking for graphical tooling then there is some 3rd
party tools such as Fuse IDE
http://fusesource.com/products/fuse-ide/

The source code is at github at: https://github.com/fusesource/fuseide

And a web based tool as well
http://hawt.io/

And you may find links to other tools on this page
http://camel.apache.org/user-stories.html

On Wed, Apr 24, 2013 at 8:28 AM, Fitzcaraldo
<Br...@marlo.com.au> wrote:
> Hi
> We're looking at a project to retire some JCAPS/ECANN interfaces for a
> client and replace them with Camel routes.  Has anyone done this before and
> has tips or traps to share?
> Thanks
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/JCAPS-to-Camel-tp5731389.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen