aries-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lin Sun <linsun....@gmail.com>
Subject [blueprint transaction] schema issues
Date Mon, 02 Aug 2010 17:40:00 GMT
Hi

I wanted to give people an update on the blueprint transaction that I
have been working on lately.  I have added the support for bundle wide
transaction configuration, in addition to the bean level transaction
configuration that was supported with the 0.1 release.   I also made
some changes to the transaction.xsd schema file, as I added a new
attribute and specified the transactionAttribute is required.

With the schema changes, there is one issue.  It seems right to me
that I need to update the version of the schema to be 1.1.0 (instead
of the previously 1.0.0).  So I did the following in order to support
the blueprint definition file that still uses the 1.0.0 version of the
transaction name space.

1) update the version in transaction.xsd to 1.1.0
2) update the blueprint  XML definition file for transaction-blueprint
to register both http://aries.apache.org/xmlns/transactions/v1.0.0 and
http://aries.apache.org/xmlns/transactions/v1.1.0 as the value for
osgi.service.blueprint.namespace.

However, this doesn't solve the prob.  The
javax.xml.Validator.validate() failed when being called by Parser.

Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The
matching wildcard is strict, but no declaration can be found for
element 'tx:transaction'.

This seems a reasonable error to me.  The above step 2 made sure that
when the transaction element is detected, the transaction name space
handler (1.1.0 version) is used.  However, Parser is unable to
validate the blueprint XML definition file that uses the 1.0.0
transaction name space with the 1.1.0 transaction schema.

So I think the following needs to be done, in order for support
blueprint definition file that uses the transaction 1.0.0 name space.

1) whenever blueprint parser detects a blueprint definition file that
uses the older version of transaction name space, it will attempt to
convert the blueprint definition file to use the latest version of the
transaction name space.

Thoughts?

Thx

Lin

Mime
View raw message