You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by Aaron Mulder <am...@alumni.princeton.edu> on 2003/08/16 21:03:18 UTC

[PATCH] [JSR-88] DConfigBeans, Take 2

	Here's an updated patch with the DConfigBeans for JSR-88.  It now
include DConfigBeans for most of the obvious EJB elements (EJB refs,
resource refs, etc.).  There's also a schema for a Geronimo EJB DD,
patches to the build files to run Castor on the schema, and a patch to the
DeploymentManager to actually return DConfigBeans.  Finally, there's a
very minimal test case; it can't go much further without some DDBeans to
work with.

Aaron

P.S. Note that the code won't compile unless you run the patched build
first to generate the Castor obejcts.

RE: Building Geronimo with Elba

Posted by Jeremy Boynes <je...@coredevelopers.net>.
I don't think so but I have made some progress with a few things.

This discussion doesn't really belong here, so can you either ping me
directly or post to elba-user.

--
Jeremy

> -----Original Message-----
> From: Tim Urberg [mailto:tim_urberg@yahoo.com]
> Sent: Saturday, August 16, 2003 11:04 AM
> To: geronimo-dev@incubator.apache.org
> Subject: Building Geronimo with Elba
>
>
> Hello Everyone,
>
> Is there any documentation on how to build Geronimo with Elba?
>
> Thanks,
> Tim Urberg
> OpenEJB Developer
>
>


Building Geronimo with Elba

Posted by Tim Urberg <ti...@yahoo.com>.
Hello Everyone,

Is there any documentation on how to build Geronimo with Elba?

Thanks,
Tim Urberg
OpenEJB Developer


RE: [PATCH] [JSR-88] DConfigBeans, Take 2

Posted by Aaron Mulder <am...@alumni.princeton.edu>.
On Thu, 21 Aug 2003, Jeremy Boynes wrote:
> Aaron
> 
> I'm working on checking this but I'm thinking that we could rename the
> package and split things up.
> 
> The 1.4 spec splits out a lot of the common elements into a j2ee schema that
> is included byt others such as EJB. I propose we redistribute the beans out
> of jar and into packages corresponding to the different j2ee XSDs.
> 
> With what you have, I'm thinking 'ejb' and 'j2ee'

	Well, first of all, I hope you're loking at the "take three" code 
even though you're referring to the "take two" message.

	Also, the DConfigBeans I wrote are probably fairly painless to 
move, but we'll have to be a bit more clever when we take the next step 
(which is to provide customer editors that present drop-down lists of 
options).  For example, if an EJB Ref will be in the "j2ee" package 
because it can be used by both servlets and EJBs, and it wants to climb 
the tree back up to either an EJB JAR (if an EJB deployed alone) or all 
the EJB JARs in the EAR (if deployed in an EAR), we'll have to figure out 
how to do this.  Anyway, I'm not objecting, just putting some thoughts in 
writing.

	What beans would move?  EJB/Local Ref and Resource/Env Ref, I 
assume -- anything else?

	Also, I assume you would want to split up the Geronimo XSD the 
same way, just to keep consistent.

	Finally, would you expect EAR code to still go in an "ear" 
package (which would be my preference), or would you want the EAR code to 
go in "j2ee" with the common code?

	Shall I submit a revised patch along these lines, or do you want 
to do it?

Aaron


Re: [PATCH] [JSR-88] DConfigBeans, Take 2

Posted by Aaron Mulder <am...@alumni.princeton.edu>.
On Sat, 23 Aug 2003, Aaron Mulder wrote:
> P.S. Does this xbeans package bear any relation to BEA XMLBeans?

	Never mind, upon looking at the code, I see it's the same thing.

	The JAR size is fairly unpleasant, but it's only twice as big as 
Castor, so it's not a huge deal.

	I don't like the XMLBeans generated code much in comparison.  For
an element like "EJB Ref", Castor generates a getter and a setter for each
"String" property and each child element.  XMLBeans generates 4-8 methods
per property, plus 18 factory methods to create the bean.  It seems fairly
unfriendly.  Is there some way to force it to drop all the extras and just 
give 2 methods per property and no factories?  Or are those required for 
the extra features?

Aaron

> On Fri, 22 Aug 2003, James Strachan wrote:
> > Doesn't this replicate the work i've done on the xbeans package? i.e. 
> > I've taken all the different j2ee XSDs and generated beans for all of 
> > them which are capable of parsing themselves from XML, turning 
> > themselves back into XML as well as XPath navigation and XSD validation 
> > checking.
> > 
> > Would this do the job?
> > 
> > http://www.apache.org/~jstrachan/geronimo/modules/xbeans/
> > 
> > Seems silly to hand-craft beans for an XSD
> > 
> > James
> > -------
> > http://radio.weblogs.com/0112098/
> 


Re: XMLBeans

Posted by Brian Behlendorf <br...@collab.net>.
On Sat, 30 Aug 2003, Jason Dillon wrote:
> waiting to see how the xmlbeans incubation comes along.

There was a holdup while BEA reviewed the contributor's agreement, but
that's been worked out and we should see the code soon (e.g. next week).
I think someone said the code's already available from BEA under a
BSD-style license...

	Brian


Re: XMLBeans

Posted by Jason Dillon <ja...@coredevelopers.net>.
I think we have not decided on castor or xmlbeans yet.  xmlbeans seems 
to handle schemas better, but has some dependency issues which are not 
so nice.

waiting to see how the xmlbeans incubation comes along.

--jason


On Saturday, August 30, 2003, at 09:26  AM, Aaron Mulder wrote:

> 	Why's the "xbeans" module excluded from the current Geronimo
> build?  All it needed was a couple tweaks to the build files and it 
> runs
> and generates code...  I thought I'd give it a spin since I'm having
> problems with Castor, so I'm wondering if there's a good reason to 
> avoid
> it.
>
> Thanks,
> 	Aaron
>
> On Wed, 27 Aug 2003, James Strachan wrote:
>> Its already in the incubator project & has an apache mail list...
>>
>> http://nagoya.apache.org/eyebrowse/SummarizeList?listId=151
>>
>> though the code hasn't been imported into CVS yet...
>>
>> http://cvs.apache.org/viewcvs/xml-xmlbeans/
>>
>> No idea when its arriving - whenever its ready which is meant to be
>> soon. (I've already stupidly volunteered to create a Maven build for 
>> it
>> which I'm struggling to find the time to complete, its a harder 
>> project
>> than I thought to build).
>>
>> James
>> -------
>> http://radio.weblogs.com/0112098/
>>
>


XMLBeans

Posted by Aaron Mulder <am...@alumni.princeton.edu>.
	Why's the "xbeans" module excluded from the current Geronimo 
build?  All it needed was a couple tweaks to the build files and it runs 
and generates code...  I thought I'd give it a spin since I'm having 
problems with Castor, so I'm wondering if there's a good reason to avoid 
it.

Thanks,
	Aaron

On Wed, 27 Aug 2003, James Strachan wrote:
> Its already in the incubator project & has an apache mail list...
> 
> http://nagoya.apache.org/eyebrowse/SummarizeList?listId=151
> 
> though the code hasn't been imported into CVS yet...
> 
> http://cvs.apache.org/viewcvs/xml-xmlbeans/
> 
> No idea when its arriving - whenever its ready which is meant to be 
> soon. (I've already stupidly volunteered to create a Maven build for it 
> which I'm struggling to find the time to complete, its a harder project 
> than I thought to build).
> 
> James
> -------
> http://radio.weblogs.com/0112098/
> 


Re: [PATCH] [JSR-88] DConfigBeans, Take 2

Posted by James Strachan <ja...@yahoo.co.uk>.
On Wednesday, August 27, 2003, at 11:39  am, Jason Dillon wrote:

>> Tools I've tried in that module are JAXB, Castor & XMLBeans. I 
>> couldn't get Castor to work at all with the full 7 J2EE XSDs. JAXB 
>> kinda worked but was a bit painful. XMLBeans worked a treat. None of 
>> the tools are perfect. I'd really prefer it if XMLBeans could make 
>> simple beans and then make XML wrapper objects to do the XPath / XSD 
>> validation; since XMLBeans is moving to Apache maybe we can patch the 
>> code generator to do this in the future.
>
> Do you know when it is gonna move?

Its already in the incubator project & has an apache mail list...

http://nagoya.apache.org/eyebrowse/SummarizeList?listId=151

though the code hasn't been imported into CVS yet...

http://cvs.apache.org/viewcvs/xml-xmlbeans/

No idea when its arriving - whenever its ready which is meant to be 
soon. (I've already stupidly volunteered to create a Maven build for it 
which I'm struggling to find the time to complete, its a harder project 
than I thought to build).

James
-------
http://radio.weblogs.com/0112098/


Re: [PATCH] [JSR-88] DConfigBeans, Take 2

Posted by Jason Dillon <ja...@coredevelopers.net>.
> Tools I've tried in that module are JAXB, Castor & XMLBeans. I 
> couldn't get Castor to work at all with the full 7 J2EE XSDs. JAXB 
> kinda worked but was a bit painful. XMLBeans worked a treat. None of 
> the tools are perfect. I'd really prefer it if XMLBeans could make 
> simple beans and then make XML wrapper objects to do the XPath / XSD 
> validation; since XMLBeans is moving to Apache maybe we can patch the 
> code generator to do this in the future.

Do you know when it is gonna move?

--jason


Re: [PATCH] [JSR-88] DConfigBeans, Take 2

Posted by James Strachan <ja...@yahoo.co.uk>.
On Saturday, August 23, 2003, at 06:50  am, Aaron Mulder wrote:

> 	No one's hand-crafting XML beans.  The current code uses Castor to
> generate them.  There's (probably) no reason we couldn't use xbeans
> instead, but at the time I wrote it, the only ready option I was aware 
> of
> was Castor.
>
> 	If we switch to xbeans, would you like to see the Geronimo XSDs
> loaded into the same directory as the J2EE XSDs?  I would think we'd 
> want
> to use a subdir in any case, just for clarity, but we may want the
> Geronimo XSDs to live in the core module instead -- I have no strong
> opinion.

Me neither. Keeping them together for now would make sense. We could 
always create an xmlbeans Maven plugin later on to make it easier to 
keep specific Geronimo XSDs with the modules that need them.


> 	Though, to elaborate, the DConfigBeans are JavaBean wrappers for
> the POJO XML data objects.  The reason the DConfigBeans are hand 
> crafted
> is that they have to be quite UI oriented (generate and handle events,
> provide property editors with pick lists, etc.), as well as being 
> tightly
> tied to DDBeans (each DConfigBean corresponds to a DDBean, where DCBs 
> are
> used for the Geronimo DDs and DDBs are used for the J2EE DDs, if I can 
> be
> forgiven the abundance of TLAs).  I don't think we could auto-generate
> this code without practically as much mapping information as we 
> currently
> have code.

OK I get it now :). Sorry was just trying to avoid us both doing the 
same thing in different ways at the same time.


> 	However, it sounds like perhaps the DDBeans should take advantage
> of the xbeans XPath features, if they are a good fit.
>
> Aaron
>
> P.S. Does this xbeans package bear any relation to BEA XMLBeans?

Not really. I basically tried to use all the available tools out there 
to create 'xml beans' - beans generated from all the XSDs and capable 
of parsing themselves & validating themselves against XSDs.

Tools I've tried in that module are JAXB, Castor & XMLBeans. I couldn't 
get Castor to work at all with the full 7 J2EE XSDs. JAXB kinda worked 
but was a bit painful. XMLBeans worked a treat. None of the tools are 
perfect. I'd really prefer it if XMLBeans could make simple beans and 
then make XML wrapper objects to do the XPath / XSD validation; since 
XMLBeans is moving to Apache maybe we can patch the code generator to 
do this in the future.

If anyone is aware of any other tool to auto-generate beans from an XSD 
and perform the XML marshaling & XSD validation (hopefully with XPath 
too which is cool) I'm all ears.

James
-------
http://radio.weblogs.com/0112098/


Re: [PATCH] [JSR-88] DConfigBeans, Take 2

Posted by Aaron Mulder <am...@alumni.princeton.edu>.
	No one's hand-crafting XML beans.  The current code uses Castor to
generate them.  There's (probably) no reason we couldn't use xbeans
instead, but at the time I wrote it, the only ready option I was aware of
was Castor.

	If we switch to xbeans, would you like to see the Geronimo XSDs 
loaded into the same directory as the J2EE XSDs?  I would think we'd want 
to use a subdir in any case, just for clarity, but we may want the 
Geronimo XSDs to live in the core module instead -- I have no strong 
opinion.

	Though, to elaborate, the DConfigBeans are JavaBean wrappers for
the POJO XML data objects.  The reason the DConfigBeans are hand crafted
is that they have to be quite UI oriented (generate and handle events,
provide property editors with pick lists, etc.), as well as being tightly
tied to DDBeans (each DConfigBean corresponds to a DDBean, where DCBs are
used for the Geronimo DDs and DDBs are used for the J2EE DDs, if I can be
forgiven the abundance of TLAs).  I don't think we could auto-generate
this code without practically as much mapping information as we currently
have code.

	However, it sounds like perhaps the DDBeans should take advantage
of the xbeans XPath features, if they are a good fit.

Aaron

P.S. Does this xbeans package bear any relation to BEA XMLBeans?

On Fri, 22 Aug 2003, James Strachan wrote:
> Doesn't this replicate the work i've done on the xbeans package? i.e. 
> I've taken all the different j2ee XSDs and generated beans for all of 
> them which are capable of parsing themselves from XML, turning 
> themselves back into XML as well as XPath navigation and XSD validation 
> checking.
> 
> Would this do the job?
> 
> http://www.apache.org/~jstrachan/geronimo/modules/xbeans/
> 
> Seems silly to hand-craft beans for an XSD
> 
> James
> -------
> http://radio.weblogs.com/0112098/


Re: [PATCH] [JSR-88] DConfigBeans, Take 2

Posted by James Strachan <ja...@yahoo.co.uk>.
On Friday, August 22, 2003, at 12:03  am, Jeremy Boynes wrote:
> Aaron
>
> I'm working on checking this but I'm thinking that we could rename the
> package and split things up.
>
> The 1.4 spec splits out a lot of the common elements into a j2ee 
> schema that
> is included byt others such as EJB. I propose we redistribute the 
> beans out
> of jar and into packages corresponding to the different j2ee XSDs.
>
> With what you have, I'm thinking 'ejb' and 'j2ee'

Doesn't this replicate the work i've done on the xbeans package? i.e. 
I've taken all the different j2ee XSDs and generated beans for all of 
them which are capable of parsing themselves from XML, turning 
themselves back into XML as well as XPath navigation and XSD validation 
checking.

Would this do the job?

http://www.apache.org/~jstrachan/geronimo/modules/xbeans/

Seems silly to hand-craft beans for an XSD

James
-------
http://radio.weblogs.com/0112098/


RE: [PATCH] [JSR-88] DConfigBeans, Take 2

Posted by Jeremy Boynes <je...@coredevelopers.net>.
Aaron

I'm working on checking this but I'm thinking that we could rename the
package and split things up.

The 1.4 spec splits out a lot of the common elements into a j2ee schema that
is included byt others such as EJB. I propose we redistribute the beans out
of jar and into packages corresponding to the different j2ee XSDs.

With what you have, I'm thinking 'ejb' and 'j2ee'

OK?

--
Jeremy

> -----Original Message-----
> From: Aaron Mulder [mailto:ammulder@alumni.princeton.edu]
> Sent: Saturday, August 16, 2003 12:03 PM
> To: geronimo-dev@incubator.apache.org
> Subject: [PATCH] [JSR-88] DConfigBeans, Take 2
>
>
> 	Here's an updated patch with the DConfigBeans for JSR-88.  It now
> include DConfigBeans for most of the obvious EJB elements (EJB refs,
> resource refs, etc.).  There's also a schema for a Geronimo EJB DD,
> patches to the build files to run Castor on the schema, and a patch to the
> DeploymentManager to actually return DConfigBeans.  Finally, there's a
> very minimal test case; it can't go much further without some DDBeans to
> work with.
>
> Aaron
>
> P.S. Note that the code won't compile unless you run the patched build
> first to generate the Castor obejcts.
>


[PATCH] [JSR-88] DConfigBeans, Take 3

Posted by Aaron Mulder <am...@alumni.princeton.edu>.
	Here's a newer copy, with BeanInfo classes for the beans, an
update to list all the beans in the manifest, and a new build script entry 
to produce a JSR-88 server provider JAR.  I generated one big patch files 
this time, since it was getting to be a lot of individual files -- let me 
know if separate patch files are preferred.

Aaron

On Sat, 16 Aug 2003, Aaron Mulder wrote:
> 	Here's an updated patch with the DConfigBeans for JSR-88.  It now
> include DConfigBeans for most of the obvious EJB elements (EJB refs,
> resource refs, etc.).  There's also a schema for a Geronimo EJB DD,
> patches to the build files to run Castor on the schema, and a patch to the
> DeploymentManager to actually return DConfigBeans.  Finally, there's a
> very minimal test case; it can't go much further without some DDBeans to
> work with.
> 
> Aaron
> 
> P.S. Note that the code won't compile unless you run the patched build
> first to generate the Castor obejcts.