persistence@glassfish.java.net

Re: Oracle Toplink + XMLType

From: Tom Ware <tom.ware_at_oracle.com>
Date: Fri, 23 Mar 2007 10:21:08 -0400

Hi David,

  Prior to the time we implemented XMLType support in Oracle TopLink it
was possible to get some basic XMLType support working using a custom
Converter in TopLink. Here is a link with a brief description of what a
converter is:

http://www.oracle.com/technology/products/ias/toplink/doc/10131/main/_html/relmapun002.htm#sthref3777

  It should be possible to build an converter in TopLink Essentials that
can handle at least basic reading and writing (more complex queries will
still require using native SQL). Configuring a mapping to use a
converter is an extension of the actual JPA specification and would
require using a descriptor Customizer. There is a description in the
link below.

http://www.oracle.com/technology/products/ias/toplink/jpa/resources/toplink-jpa-extensions.html#TopLinkCustomizationValidation

Let me know if this potentially helps you and I'll provide some more info,
Tom

David Harrigan wrote:

>Hi Tom,
>
>Thank you for getting back to me. So, reading this, there is no
>current way using JPA (Toplink Essentials) for me to read/write a
>column of type XMLTYPE. I believe there is a feature request already
>(https://glassfish.dev.java.net/issues/show_bug.cgi?id=1719).
>
>So, that leaves me floundering a bit.
>
>I can, either,
>
>* abandon using EJB3/JPA and revert to using JDBC calls directly ( :-( )
>* create a view over the table that translates the XML data into a string
>
>I would favour the view part. (but I could be wrong here...any suggestions?)
>
>When will the next version of Toplink (or Toplink Essentials) be ready
>for beta testing that supports xmltypes?
>
>thank you very much
>
>-=david=-
>
>
>On 3/22/07, Tom Ware <tom.ware_at_oracle.com> wrote:
>
>
>>Yes, Oracle TopLink does support the mapping and expression extensions
>>for SQLX querying. This support does not currently exist in TopLink
>>Essentials.
>>
>>In Oracle TopLink the JPA compliant support is provided by TopLink
>>Essentials today. This means that when using JPA we do not have support
>>for XMLType mapping or querying. The only solution we have is Oracle
>>TopLink's native APIs and metadata.
>>
>>In the next release of Oracle TopLink we will fully support JPA and thus
>>have these additional capabilities available.
>>
>>I suggest entering a feature request for this issue.
>>
>>Thanks,
>>Tom
>>
>>David Harrigan wrote:
>>
>>
>>
>>>Hi,
>>>
>>>I'm aware that Toplink Essentials doesn't support the XmlType (or does
>>>it? Has it been changed since this?
>>>(http://forums.java.net/jive/thread.jspa?threadID=20827&tstart=0 and
>>>https://glassfish.dev.java.net/issues/show_bug.cgi?id=1719).
>>>
>>>I believe that Oracle Toplink, the commerical superset of Toplink
>>>Essentials supports this feature, but I'm completely unsure of how to
>>>activate it (or that it does work!).
>>>
>>>So, my questions are:
>>>
>>>1. Can I use Oracle Toplink instead of Toplink Essentials by changing
>>>the persistence provider in persistence.xml?
>>>2. Is it just the toplink.jar that I need? Or do I also need xdb.jar
>>>to support the XmlType type.
>>>
>>>As a bonus question, does Oracle Toplink support Stored Procedures
>>>(and any pointers on how to use with EJB3/JPA?)
>>>
>>>Thanks everyone in advance.
>>>
>>>-=david=-
>>>
>>>
>>>
>>>
>>>
>
>
>
>