Hey...back to the early part of this thread.

Why don't we want to continue to generate the object graph?  I am asking
that because if JAXB changes their code generation, etc, then we will
need to regenerate.  Why would we want to store the object graph?

David Blevins wrote:
> 
> On Aug 11, 2006, at 11:43 PM, Jeff Genender wrote:
> 
>> Well...this time of year I prefer to use a Salmon...I'll let you know ;-)
> 
> Nice choice.
> 
> Get your Salmon ready, I had to disable the main PersistenceDeployer
> tests as OpenJPA's class enhancing tool tries to enhance everything in
> the persistence.xml file even if the unit belongs to another provider,
> so I commented out the FakePersistenceProvider unit as a workaround.
> 
> I'll raise the issue with them tomorrow and see if we can't get those
> test back.  We are using the PersistenceDeployer for the OpenJPA tests,
> obviously, so we're in good shape.
> 
> -David
> 
>> David Blevins wrote:
>>>
>>> On Aug 11, 2006, at 8:46 PM, Jeff Genender wrote:
>>>
>>>> Hehe...I was going there...thus the reason I asked JAXB vs
>>>> JAXB2...but I
>>>> didn't follow up ;-)  Glad the solution bubbled itself up ;-)
>>>>
>>>
>>> I'm hacking your persistence deployer code apart.  Feel free to slap me
>>> with a trout if you see something you don't like.  Mostly just
>>> abstracting and expanding.
>>>
>>> -David
>>>
>>>
>>>> Jeff
>>>>
>>>> David Blevins wrote:
>>>>> On Jul 17, 2006, at 8:54 PM, Jeff Genender wrote:
>>>>>
>>>>>> JAXB or JAXB2?
>>>>>>
>>>>>> David Blevins wrote:
>>>>>>> I have the start of support for the EJB3 ejb-jar.xml worked in using
>>>>>>> JAXB.  It's working great and the itests run, the only trick is it
>>>>>>> *only* supports ejb3 descriptors, i.e. you *must* have this at
>>>>>>> the top
>>>>>>> of your ejb-jar.xml
>>>>>>>
>>>>>>> <ejb-jar xmlns="http://java.sun.com/xml/ns/javaee"; ...>
>>>>>>>
>>>>>>> Using the previous namespace or using no namespace at all no longer
>>>>>>> works.  This might be easy to solve, but I'm quite a JAXB novice.
>>>>>>>
>>>>>>> The namespace info comes from an annotation in a package-info.java
>>>>>>> class.  Don't know if there is some other way to specify it or
>>>>>>> override
>>>>>>> the annotation.
>>>>>>>
>>>>>>> Any know how we might do this?
>>>>>
>>>>> Mr. Genender you totally read this email completely neglected to
>>>>> mention
>>>>> you found a solution to this problem in the persistence code you
>>>>> wrote! :)
>>>>>
>>>>> I just happened across this wile reworking it to not generate each
>>>>> time:
>>>>>
>>>>> <snip>
>>>>>             // Create a filter to intercept events
>>>>>             PersistenceFilter xmlFilter = new
>>>>> PersistenceFilter(xmlReader);
>>>>>
>>>>>             // Be sure the filter has the JAXB content handler set (or
>>>>> it wont
>>>>>             // work)
>>>>>             xmlFilter.setContentHandler(uh);
>>>>>             SAXSource source = new SAXSource(xmlFilter, new
>>>>> InputSource(persistenceDescriptor));
>>>>>     [...]
>>>>>     // Inject the proper namespace
>>>>>     class PersistenceFilter extends XMLFilterImpl {
>>>>>
>>>>>         public PersistenceFilter(XMLReader arg0) {
>>>>>             super(arg0);
>>>>>         }
>>>>>
>>>>>         @Override
>>>>>         public void startElement(String arg0, String arg1, String
>>>>> arg2,
>>>>> Attributes arg3) throws SAXException {
>>>>>            
>>>>> super.startElement("http://java.sun.com/xml/ns/persistence";,
>>>>> arg1, arg2, arg3);
>>>>>         }
>>>>>     }
>>>>> </snip>
>>>>>
>>>>> This is totally going to work for our ejb-jar.xml parsing too.
>>>>>
>>>>> I'm a happy man.
>>>>>
>>>>> -David
>>>>
>>

Reply via email to