Return-Path: Delivered-To: apmail-camel-dev-archive@www.apache.org Received: (qmail 1935 invoked from network); 15 Jun 2009 08:59:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 15 Jun 2009 08:59:55 -0000 Received: (qmail 43748 invoked by uid 500); 15 Jun 2009 09:00:06 -0000 Delivered-To: apmail-camel-dev-archive@camel.apache.org Received: (qmail 43701 invoked by uid 500); 15 Jun 2009 09:00:06 -0000 Mailing-List: contact dev-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list dev@camel.apache.org Received: (qmail 43570 invoked by uid 99); 15 Jun 2009 09:00:06 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Jun 2009 09:00:06 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of cmoulliard@gmail.com designates 209.85.220.207 as permitted sender) Received: from [209.85.220.207] (HELO mail-fx0-f207.google.com) (209.85.220.207) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Jun 2009 08:59:58 +0000 Received: by fxm3 with SMTP id 3so1296498fxm.20 for ; Mon, 15 Jun 2009 01:59:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=t6vuD2J2yzsxqHxP5MCEKV+S3yTB31ZjfWyfgAvT6/c=; b=JT6uY8CCKUWI0vLBEc2PPSd7lEsW53ynWwXBcHIzqxGrnAkhVOm4V+DKRQ4L+DWR7i pMNG7lNuKW2mhJ5PzhH/+uSqpmknGCySL8KYIk4k6pj5yxysPjk3k5xcGBeUDuZB84I6 hMFGALJyftkxQMpLaozpvmFa0ahRBKg4Xuk50= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=xc9PMLqMDmv1dZfloZW6/7vLQbqeL8u0UfR2B2oXTpgy+OWgQ2nLcj/HA+ZgrlCfIl Op7ee59Tk1uq0W/RjM3YuPXIfY0y8s6feTlhSLqXt1xWA9l5Zsy264Mnl0QGohCFOy2/ tmUa7gMGwlrUNUm3SEGtfNfh1fmKIih1CnCok= MIME-Version: 1.0 Received: by 10.103.107.1 with SMTP id j1mr3523293mum.99.1245056376337; Mon, 15 Jun 2009 01:59:36 -0700 (PDT) Date: Mon, 15 Jun 2009 10:59:36 +0200 Message-ID: Subject: [Advice] : Architectural design regarding to granularity of SOA From: Charles Moulliard To: dev@camel.apache.org, dev@servicemix.apache.org Content-Type: multipart/alternative; boundary=001636416cf709764d046c5f4753 X-Virus-Checked: Checked by ClamAV on apache.org --001636416cf709764d046c5f4753 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hi, I' m confronted to the following "dilemma". The architecture of a product that I currently design uses Apache Camel 2.0 and Spring DSL. I have decided to use Spring DSL because I would benefit of the fact that routing can be modified in the XML file. Nevertheless, I' m confronted to the following issue who could be solved in different ways. This is why I ask point of view of Camel designer to have your advices ! The routing calls different services to parse/validate/transform and save content of messages. These services have been designed as interface and classes implementing the interface. Spring is used to publish the services top of OSGI server (Apache Karaf). Here is the description of the routing : // direct endpoint request.body // Receive as input parameter : Map and return a RequestMessage object // Receive as input parameter : RequestMessage and return a ValidationResultHolder containing List of Errors/ boolean isValid request.isValid = true // Receive as input parameter : RequestMessage and does not return anything ?????? request.isValid = false ISSUE : After calling the bean process : (2) Validate the business message, my RequestMessage is lost and replaced by a ValidationResultHolder containing information about List of Errors, boolean isValid BUT the requestMessage object is required in the process (3) Save business message Scenario possible to solve the issue : 1) Encapsulate RequestMessage class in the ValidationResultHolder class and use the ValidationResultHolder class as input parameter for (3) save business message process. Is it a good idea to copy objects between classes 2) Add property in the RequestMessage class to extract from ValidationResultHolder class : List of Errors/ boolean isValid(). Is the purpose of a java bean model class to expose result from a validation service ? 3) Merge service 1), 2) 3) into one. Granularity/flexility of Camel is lost 4) Use Java DSL instead of Spring DSL. Routing is hardcoded Question : Is a session context available to keep my requestMessage object during the validation process ? Regards, Charles Moulliard Senior Enterprise Architect Apache Camel Committer ***************************** blog : http://cmoulliard.blogspot.com --001636416cf709764d046c5f4753--