Re: [JBoss-dev] metadata management

2003-11-17 Thread Alexey Loubyansky
Ricardo Argüello wrote:
I was thinking about metadata management for all JBoss.
I know. But before choosing a tool, let's originate from the problems we 
have. What problems, you think, we have and how can we solve them?
In general, not using a binding tool is not a problem in itself, as for me.

I still believe that we should generate code from XML Schema files, 
either using JAXB or XMLBeans. The generated code would take care of 
marshalling/unmarshallign/validation/XML-Java mapping/etc, in a very 
elegant an easy way.
The same does my approach except for marshalling. I just don't need it 
at the moment. BTW, marshaller could be written in the same style as the 
unmarshaller.

'Very elegant and easy way' is an applied notion and should be 
considered in a context of problems.

Since metadata is a common problema for all of JBoss codebase, my 
proposal was oriented in that direction. I was not necessarily thinking 
about your scenario alone.

Ricardo Argüello

Alexey Loubyansky wrote:

As for me, this is the worst scenario.
- generate interfaces for three schemas,
- implement those interfaces,
- merge them into another object model.
Why would we want to change the existing code then?

I could provide an implementation that will populate just one object 
model w/o generating additional interfaces by improving the 'IOC' 
metadata factory with 'look-ahead' feature.

In fact, my approach would solve my current problems. The binding 
tools that looked at seem to be too heavy weight for me. But metadata 
is a common problem. Therefore, I wanted to know about other 
requirements. But noone wrote any till the moment. So, if your 
proposition is for my problems then negative.

Ricardo Argüello wrote:

We could add vendor specific elements (i.e. the ones found in 
jbosscmp-jdbc.xml) using namespaces.

I'll have to investigate if we could generate a different object 
model for each namespace.

But, altough it might be possible to do this, I wouldn't recommend it.

I would generate a different object model for each deployment 
descriptor: One object model for each Sun's standard XML Schema and 
one object model for each JBoss' deployment descriptor.

Maybe then we could write another object model to integrate both 
object models:

made_up_code

// This object was generated from j2ee-1.4.xsd:
EjbJar ejbJar = EjbJarFactory.create(standarDDFile);
String name = ejbJar.getEjbName();
// This object was generated from jboss-j2ee-1.4.xsd:
JBossEjbJar jbossJar =
   JBossEjbJarFactory.create(jbossDDFile);
// We could have a single object to integrate both object models:
EjbMetadata metadata =
new EjbMetadata();
metadata.setStandarDeploymentDescriptor(ejbJar);
metadata.setJBossDeploymentDescriptor(jbossJar);
// We could then work with only one object model:
String name =
  metadata.getStandardDeploymentDescriptor().getName();
String jbossSpecificProperty =
  metadata.getJBossDeploymentDescriptor().getJBossSpecificProperty();
/made_up_code

In conclusion:

1) We would generate the first object model using JAXB or XMLBeans, 
from Sun's XML Schema files.

2) We need to write XML Schemas for each JBoss vendor deployment 
descriptor.

3) We would generate the sencond object model from JBoss' XML Schema 
files.

4) We *could* integrate both object models coding another object 
model on top (no generation here). Then we could use this object 
model to access standard properties or JBoss' properties.

What do you think?

Ricardo Argüello

Alexey Loubyansky wrote:

Will we be able to have, say, entity related data from ejb-jar.xml, 
jboss.xml and jbosscmp-jdbc.xml in the same class? Or will we need 
three classes?






---
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development





---
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=/g22lp.tmpl
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development





---
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
___
JBoss-Development mailing list

RE: [JBoss-dev] metadata management

2003-11-17 Thread Rupp, Heiko
 that looked at seem to be too heavy weight for me. But metadata is a 
 common problem. Therefore, I wanted to know about other requirements. 

One requirement is that everything that (meta-)handles metadata
should be in one place. I think it is a pita, when each module has
e.g. code to do the (local) entity resolving on its own. This 
should be condensed into a central module with a central file
that tells which file maps to which public id.

Also for the XML files, I'd like to see something like

Tree t = MetadataProvider.get(data for cmp.xml);
String defaultDB = t.getXPath(/foo/bar/default/db);

which means navigating with XPath.
There is a project JXPath (@jakarta), that could help here.

 Heiko
-- 
Heiko W. Rupp   EMail: [EMAIL PROTECTED]
Senior Consultant   Telefon: +49 711 222 992 - 900
Cellent AG Finance SolutionsTelefax: +49 711 222 992 - 999
Calwer Str. 33  D-70173 Stuttgart


---
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


Re: [JBoss-dev] metadata management

2003-11-17 Thread Alexey Loubyansky
Rupp, Heiko wrote:
that looked at seem to be too heavy weight for me. But metadata is a 
common problem. Therefore, I wanted to know about other requirements. 


One requirement is that everything that (meta-)handles metadata
should be in one place. I think it is a pita, when each module has
e.g. code to do the (local) entity resolving on its own. This 
should be condensed into a central module with a central file
that tells which file maps to which public id.
This should not be a problem. We already have LocalEntityResolver that 
does it.

Also for the XML files, I'd like to see something like

Tree t = MetadataProvider.get(data for cmp.xml);
String defaultDB = t.getXPath(/foo/bar/default/db);
which means navigating with XPath.
There is a project JXPath (@jakarta), that could help here.
JXPath seems to work with any JavaBean tree. So, also not a problem.

 Heiko




---
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


Re: [JBoss-dev] metadata management

2003-11-16 Thread Ricardo Argüello
We could add vendor specific elements (i.e. the ones found in 
jbosscmp-jdbc.xml) using namespaces.

I'll have to investigate if we could generate a different object model 
for each namespace.

But, altough it might be possible to do this, I wouldn't recommend it.

I would generate a different object model for each deployment 
descriptor: One object model for each Sun's standard XML Schema and one 
object model for each JBoss' deployment descriptor.

Maybe then we could write another object model to integrate both object 
models:

made_up_code

// This object was generated from j2ee-1.4.xsd:
EjbJar ejbJar = EjbJarFactory.create(standarDDFile);
String name = ejbJar.getEjbName();
// This object was generated from jboss-j2ee-1.4.xsd:
JBossEjbJar jbossJar =
   JBossEjbJarFactory.create(jbossDDFile);
// We could have a single object to integrate both object models:
EjbMetadata metadata =
new EjbMetadata();
metadata.setStandarDeploymentDescriptor(ejbJar);
metadata.setJBossDeploymentDescriptor(jbossJar);
// We could then work with only one object model:
String name =
  metadata.getStandardDeploymentDescriptor().getName();
String jbossSpecificProperty =
  metadata.getJBossDeploymentDescriptor().getJBossSpecificProperty();
/made_up_code

In conclusion:

1) We would generate the first object model using JAXB or XMLBeans, from 
Sun's XML Schema files.

2) We need to write XML Schemas for each JBoss vendor deployment descriptor.

3) We would generate the sencond object model from JBoss' XML Schema files.

4) We *could* integrate both object models coding another object model 
on top (no generation here). Then we could use this object model to 
access standard properties or JBoss' properties.

What do you think?

Ricardo Argüello

Alexey Loubyansky wrote:
Will we be able to have, say, entity related data from ejb-jar.xml, 
jboss.xml and jbosscmp-jdbc.xml in the same class? Or will we need three 
classes?

Ricardo Argüello wrote:

Alexey Loubyansky wrote:

Ricardo Argüello wrote:

Why not use JAXB, or BEA's XMLBeans?




Perhaps. But I don't have much of experience with JAXB and no at all 
with XMLBeans. So, maybe you can tell me why?


Because it will generate the complex object model specified in the 
J2EE Deployment Descriptors, in a very easy way.

For example, it would generate an object to represent ejb-jar ... 
/ejb-jar from the EJB 2.1 deployment descriptor:

EjbJar ejbJar = 
EjbJarFactory.readFromFileSystem(deploymentDescriptorFile);
String name = ejbJar.getEjbName();
...

I have made up all this code, but is a good example of what you would 
expect from a XML/Java binding tool, as JAXB or XMLBeans.
Without having to write XML navigation/marshalling/unmarshalling code. 
A binding tool will generate all necesary Java files representing 
what's described in an XML Schema file, including validation.
We will have objets to refer to web-app ... /web-app, ejb-jar 
... /ejb-jar, etc. with all complex relations between objets already 
coded.

And all these automaticaly generated from the official XML Schema 
files posted by Sun here:
http://java.sun.com/xml/ns/j2ee/

Think XDoclet... but for XML Schema files :-)


Since in J2EE 1.4 deployment descriptors are specified in XML 
Schema, it should be very easy to get an object model from that, 
using any XML/Java binding tool.




For example...


Sun's JAXB:
http://java.sun.com/xml/jaxb/
BEA's XMLBeans:
http://dev2dev.bea.com/technologies/xmlbeans/
XMLBeans is very new, but more flexible than JAXB.
I have experience with JAXB, and none with XMLBeans, but it is 
basically the same thing...
We could try both and decide later.

Ricardo Argüello




---
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development





---
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


Re: [JBoss-dev] metadata management

2003-11-16 Thread Alexey Loubyansky
As for me, this is the worst scenario.
- generate interfaces for three schemas,
- implement those interfaces,
- merge them into another object model.
Why would we want to change the existing code then?

I could provide an implementation that will populate just one object 
model w/o generating additional interfaces by improving the 'IOC' 
metadata factory with 'look-ahead' feature.

In fact, my approach would solve my current problems. The binding tools 
that looked at seem to be too heavy weight for me. But metadata is a 
common problem. Therefore, I wanted to know about other requirements. 
But noone wrote any till the moment. So, if your proposition is for my 
problems then negative.

Ricardo Argüello wrote:
We could add vendor specific elements (i.e. the ones found in 
jbosscmp-jdbc.xml) using namespaces.

I'll have to investigate if we could generate a different object model 
for each namespace.

But, altough it might be possible to do this, I wouldn't recommend it.

I would generate a different object model for each deployment 
descriptor: One object model for each Sun's standard XML Schema and one 
object model for each JBoss' deployment descriptor.

Maybe then we could write another object model to integrate both object 
models:

made_up_code

// This object was generated from j2ee-1.4.xsd:
EjbJar ejbJar = EjbJarFactory.create(standarDDFile);
String name = ejbJar.getEjbName();
// This object was generated from jboss-j2ee-1.4.xsd:
JBossEjbJar jbossJar =
   JBossEjbJarFactory.create(jbossDDFile);
// We could have a single object to integrate both object models:
EjbMetadata metadata =
new EjbMetadata();
metadata.setStandarDeploymentDescriptor(ejbJar);
metadata.setJBossDeploymentDescriptor(jbossJar);
// We could then work with only one object model:
String name =
  metadata.getStandardDeploymentDescriptor().getName();
String jbossSpecificProperty =
  metadata.getJBossDeploymentDescriptor().getJBossSpecificProperty();
/made_up_code

In conclusion:

1) We would generate the first object model using JAXB or XMLBeans, from 
Sun's XML Schema files.

2) We need to write XML Schemas for each JBoss vendor deployment 
descriptor.

3) We would generate the sencond object model from JBoss' XML Schema files.

4) We *could* integrate both object models coding another object model 
on top (no generation here). Then we could use this object model to 
access standard properties or JBoss' properties.

What do you think?

Ricardo Argüello

Alexey Loubyansky wrote:

Will we be able to have, say, entity related data from ejb-jar.xml, 
jboss.xml and jbosscmp-jdbc.xml in the same class? Or will we need 
three classes?




---
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


Re: [JBoss-dev] metadata management

2003-11-16 Thread Alexey Loubyansky
I could provide an implementation that will populate just one object 
model w/o generating additional interfaces by improving the 'IOC' 
metadata factory with 'look-ahead' feature.
And, actually, even XPath if needed.





---
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


Re: [JBoss-dev] metadata management

2003-11-16 Thread Ricardo Argüello
I was thinking about metadata management for all JBoss.

I still believe that we should generate code from XML Schema files, 
either using JAXB or XMLBeans. The generated code would take care of 
marshalling/unmarshallign/validation/XML-Java mapping/etc, in a very 
elegant an easy way.

Since metadata is a common problema for all of JBoss codebase, my 
proposal was oriented in that direction. I was not necessarily thinking 
about your scenario alone.

Ricardo Argüello

Alexey Loubyansky wrote:

As for me, this is the worst scenario.
- generate interfaces for three schemas,
- implement those interfaces,
- merge them into another object model.
Why would we want to change the existing code then?

I could provide an implementation that will populate just one object 
model w/o generating additional interfaces by improving the 'IOC' 
metadata factory with 'look-ahead' feature.

In fact, my approach would solve my current problems. The binding tools 
that looked at seem to be too heavy weight for me. But metadata is a 
common problem. Therefore, I wanted to know about other requirements. 
But noone wrote any till the moment. So, if your proposition is for my 
problems then negative.

Ricardo Argüello wrote:

We could add vendor specific elements (i.e. the ones found in 
jbosscmp-jdbc.xml) using namespaces.

I'll have to investigate if we could generate a different object model 
for each namespace.

But, altough it might be possible to do this, I wouldn't recommend it.

I would generate a different object model for each deployment 
descriptor: One object model for each Sun's standard XML Schema and 
one object model for each JBoss' deployment descriptor.

Maybe then we could write another object model to integrate both 
object models:

made_up_code

// This object was generated from j2ee-1.4.xsd:
EjbJar ejbJar = EjbJarFactory.create(standarDDFile);
String name = ejbJar.getEjbName();
// This object was generated from jboss-j2ee-1.4.xsd:
JBossEjbJar jbossJar =
   JBossEjbJarFactory.create(jbossDDFile);
// We could have a single object to integrate both object models:
EjbMetadata metadata =
new EjbMetadata();
metadata.setStandarDeploymentDescriptor(ejbJar);
metadata.setJBossDeploymentDescriptor(jbossJar);
// We could then work with only one object model:
String name =
  metadata.getStandardDeploymentDescriptor().getName();
String jbossSpecificProperty =
  metadata.getJBossDeploymentDescriptor().getJBossSpecificProperty();
/made_up_code

In conclusion:

1) We would generate the first object model using JAXB or XMLBeans, 
from Sun's XML Schema files.

2) We need to write XML Schemas for each JBoss vendor deployment 
descriptor.

3) We would generate the sencond object model from JBoss' XML Schema 
files.

4) We *could* integrate both object models coding another object model 
on top (no generation here). Then we could use this object model to 
access standard properties or JBoss' properties.

What do you think?

Ricardo Argüello

Alexey Loubyansky wrote:

Will we be able to have, say, entity related data from ejb-jar.xml, 
jboss.xml and jbosscmp-jdbc.xml in the same class? Or will we need 
three classes?




---
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development





---
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


Re: [JBoss-dev] metadata management

2003-11-15 Thread Holger Baxmann @ mac
IMHO RelaxNG could be the tool to get grip with thiss issue.

bax

Am 15.11.2003 um 06:25 schrieb Ricardo Argüello:

Why not use JAXB, or BEA's XMLBeans?

Since in J2EE 1.4 deployment descriptors are specified in XML Schema,  
it should be very easy to get an object model from that, using any  
XML/Java binding tool.

I would be interested in collaborating to code that.

Ricardo Argüello

Alexey Loubyansky wrote:

What are our plans for metadata? I remember various discussions but  
can we revisit it again? What are the requirements and wishes?

I am facing it right now. I would like to have, say, entity metadata  
from various sources (ejb-jar.xml, jbossxmp-jdbc.xml) in one place.  
So, I wrote a very simple frame that reads xml files and constructs  
the metadata tree. Actually, the metadata tree is built while reading  
ejb-jar.xml and then populated with other data from jboss.xml and  
jbosscmp-jdbc.xml.

But I would like to use something common, i.e. server-wide solution  
if we are going to agree on it.



---
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/ 
g22lp.tmpl
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development






---
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp? 
Target___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development



---
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


Re: [JBoss-dev] metadata management

2003-11-15 Thread julien viet
you would have to translate schema to relaxNG first, and relaxNG does
validation only. maybe there is a binding tool.

from my experience with schema, XML W3C schema are a big mess,they are
ambigous, there is not a formal model underlysing etc.. and relax is cool.
But schema are widely accepted (microsost push) and recognized by the
industry and J2EE gives all its schema in w3c schema.

 IMHO RelaxNG could be the tool to get grip with thiss issue.
 
 bax
 
 Am 15.11.2003 um 06:25 schrieb Ricardo Argüello:
 
 Why not use JAXB, or BEA's XMLBeans?
 
 Since in J2EE 1.4 deployment descriptors are specified in XML Schema,
 it should be very easy to get an object model from that, using any
 XML/Java binding tool.
 
 I would be interested in collaborating to code that.
 
 Ricardo Argüello
 
 Alexey Loubyansky wrote:
 
 What are our plans for metadata? I remember various discussions but
 can we revisit it again? What are the requirements and wishes?
 
 I am facing it right now. I would like to have, say, entity metadata
 from various sources (ejb-jar.xml, jbossxmp-jdbc.xml) in one place.
 So, I wrote a very simple frame that reads xml files and constructs
 the metadata tree. Actually, the metadata tree is built while reading
 ejb-jar.xml and then populated with other data from jboss.xml and
 jbosscmp-jdbc.xml.
 
 But I would like to use something common, i.e. server-wide solution
 if we are going to agree on it.
 
 
 
 
 ---
 This SF. Net email is sponsored by: GoToMyPC
 GoToMyPC is the fast, easy and secure way to access your computer from
 any Web browser or wireless device. Click here to Try it Free!
 https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/
 g22lp.tmpl
 ___
 JBoss-Development mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-development
 
 
 
 
 
 
 ---
 This SF. Net email is sponsored by: GoToMyPC
 GoToMyPC is the fast, easy and secure way to access your computer from
 any Web browser or wireless device. Click here to Try it Free!
 https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?
 Target___
 JBoss-Development mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-development
 
 
 
 
 ---
 This SF. Net email is sponsored by: GoToMyPC
 GoToMyPC is the fast, easy and secure way to access your computer from
 any Web browser or wireless device. Click here to Try it Free!
 https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
 ___
 JBoss-Development mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-development



---
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


Re: [JBoss-dev] metadata management

2003-11-15 Thread Ricardo Argüello
Why complicate things so much?

Sun provides XML Schema files, no RelaxNG ones.

Even if RelaxNG is far better than XML Schema (it is):
1) We don't have Relax NG descriptors. We would have to *translate* the 
official, Sun provided, XML Schema files.
2) We don't have tools to map RelaxNG to an object model, or at least 
not as well tested as the ones existing for XML Schema.

Even tho Relax NG might be better than XML Schema, we don't have to 
complicate things so much.

Let's use the provided XML Schema files, and a good mapping tool.

Ricardo Argüello

julien viet wrote:

you would have to translate schema to relaxNG first, and relaxNG does
validation only. maybe there is a binding tool.
from my experience with schema, XML W3C schema are a big mess,they are
ambigous, there is not a formal model underlysing etc.. and relax is cool.
But schema are widely accepted (microsost push) and recognized by the
industry and J2EE gives all its schema in w3c schema.
 

IMHO RelaxNG could be the tool to get grip with thiss issue.

bax

Am 15.11.2003 um 06:25 schrieb Ricardo Argüello:

   

Why not use JAXB, or BEA's XMLBeans?

Since in J2EE 1.4 deployment descriptors are specified in XML Schema,
it should be very easy to get an object model from that, using any
XML/Java binding tool.
I would be interested in collaborating to code that.

Ricardo Argüello

Alexey Loubyansky wrote:

 

What are our plans for metadata? I remember various discussions but
can we revisit it again? What are the requirements and wishes?
I am facing it right now. I would like to have, say, entity metadata
from various sources (ejb-jar.xml, jbossxmp-jdbc.xml) in one place.
So, I wrote a very simple frame that reads xml files and constructs
the metadata tree. Actually, the metadata tree is built while reading
ejb-jar.xml and then populated with other data from jboss.xml and
jbosscmp-jdbc.xml.
But I would like to use something common, i.e. server-wide solution
if we are going to agree on it.


---
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/
g22lp.tmpl
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development
   



---
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?
Target___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development
 

---
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development
   



---
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=/g22lp.tmpl
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development
 





---
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


Re: [JBoss-dev] metadata management

2003-11-15 Thread Ricardo Argüello
Should we create a new module for this, or use the server module?
Where should we put XML Schema files, and generated Java files?
Ricardo Argüello

Ricardo Argüello wrote:

Why not use JAXB, or BEA's XMLBeans?

Since in J2EE 1.4 deployment descriptors are specified in XML Schema, 
it should be very easy to get an object model from that, using any 
XML/Java binding tool.

I would be interested in collaborating to code that.

Ricardo Argüello

Alexey Loubyansky wrote:

What are our plans for metadata? I remember various discussions but 
can we revisit it again? What are the requirements and wishes?

I am facing it right now. I would like to have, say, entity metadata 
from various sources (ejb-jar.xml, jbossxmp-jdbc.xml) in one place. 
So, I wrote a very simple frame that reads xml files and constructs 
the metadata tree. Actually, the metadata tree is built while reading 
ejb-jar.xml and then populated with other data from jboss.xml and 
jbosscmp-jdbc.xml.

But I would like to use something common, i.e. server-wide solution 
if we are going to agree on it.



---
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development





---
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=/g22lp.tmpl
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development





---
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


Re: [JBoss-dev] metadata management

2003-11-15 Thread Scott M Stark
There has been some look into jaxb and it has been found wanting on
its ability to merge from multiple sources into an object model. What
does the xmlbeans provide in this regard?

Scott Stark
Chief Technology Officer
JBoss Group, LLC

Ricardo Argüello wrote:
Why not use JAXB, or BEA's XMLBeans?

Since in J2EE 1.4 deployment descriptors are specified in XML Schema, it 
should be very easy to get an object model from that, using any XML/Java 
binding tool.

I would be interested in collaborating to code that.

Ricardo Argüello

Alexey Loubyansky wrote:

What are our plans for metadata? I remember various discussions but 
can we revisit it again? What are the requirements and wishes?

I am facing it right now. I would like to have, say, entity metadata 
from various sources (ejb-jar.xml, jbossxmp-jdbc.xml) in one place. 
So, I wrote a very simple frame that reads xml files and constructs 
the metadata tree. Actually, the metadata tree is built while reading 
ejb-jar.xml and then populated with other data from jboss.xml and 
jbosscmp-jdbc.xml.

But I would like to use something common, i.e. server-wide solution if 
we are going to agree on it.


---
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


Re: [JBoss-dev] metadata management

2003-11-15 Thread Scott M Stark
Schema files are already located in server/resource/org/jboss/metadata.

The current metadata bindings are in server/src/org/jboss/metadata. I
would say these should be updated with whatever new binding is created.
Ricardo Argüello wrote:

Should we create a new module for this, or use the server module?
Where should we put XML Schema files, and generated Java files?
Ricardo Argüello

Ricardo Argüello wrote:

Why not use JAXB, or BEA's XMLBeans?

Since in J2EE 1.4 deployment descriptors are specified in XML Schema, 
it should be very easy to get an object model from that, using any 
XML/Java binding tool.

I would be interested in collaborating to code that.

Ricardo Argüello




---
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


Re: [JBoss-dev] metadata management

2003-11-15 Thread Alexey Loubyansky
julien viet wrote:
so it is IOC metadata parsing :-)
Exactly :)

so the MetaData classes are pretty much the same, what just differ is the
feeding method and you removed some metadata classes ?
Yes



---
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


Re: [JBoss-dev] metadata management

2003-11-15 Thread Alexey Loubyansky
Ricardo Argüello wrote:

Why not use JAXB, or BEA's XMLBeans?
Perhaps. But I don't have much of experience with JAXB and no at all 
with XMLBeans. So, maybe you can tell me why?

Since in J2EE 1.4 deployment descriptors are specified in XML Schema, it 
should be very easy to get an object model from that, using any XML/Java 
binding tool.
For example...

Thanks.

I would be interested in collaborating to code that.

Ricardo Argüello

Alexey Loubyansky wrote:

What are our plans for metadata? I remember various discussions but 
can we revisit it again? What are the requirements and wishes?

I am facing it right now. I would like to have, say, entity metadata 
from various sources (ejb-jar.xml, jbossxmp-jdbc.xml) in one place. 
So, I wrote a very simple frame that reads xml files and constructs 
the metadata tree. Actually, the metadata tree is built while reading 
ejb-jar.xml and then populated with other data from jboss.xml and 
jbosscmp-jdbc.xml.

But I would like to use something common, i.e. server-wide solution if 
we are going to agree on it.




---
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


Re: [JBoss-dev] metadata management

2003-11-15 Thread Alexey Loubyansky
It does not work when corresponding elements (e.g. entity) are in 
different order in each DD.

Alexey Loubyansky wrote:

I mimic current metadata classes but add more data, for example, for 
EntityMetaData (so that, i can get rid of JDBCxxxMetaData).
It would be easier to look at the code really.

It is based on SAXParser and MetaDataContentHandler which delegates to 
MetaDataFactory implementation (e.g. EjbJarMetaDataFactory, 
JBossCMPMetaDataFactory, etc)
Metadata factory is the source for metadata objects. When a new element 
is read, the factory is asked for a new corresponding metadata object. 
The factory can return null (meanning ignore this child). The returned 
metadata object is pushed in a stack.
Then we read another element and call the factory for a new metadata 
object passing in the parent metadata object from the stack, namesapce 
URI and element name. Again, the factory can ignore by returing null, or 
return a new new object.
When some text value is read, we call the factory with the current 
metadata object on the stack, element namesapce URI, element name and 
text value. This way I initialize the fields.
Finally, when the element is read from the file, I pop the element from 
the stack, peek its parent from the stack and call factory to add the 
child to the parent. At this time child also can be validated.

I don't use any special interfaces for metadata objects. The methods are 
discovered by introspection. For example, from EjbJarMetaDataFactory:

// started a new element
public Object newChild(ApplicationMetaData appMetaData, String 
namespaceURI, String qName)
{
   Object child = null;
   if(entity.equals(qName))
   {
  child = new EntityMetaData(appMetaData);
   }
   return child;
}

public void addChild(ApplicationMetaData appMetaData, EntityMetaData 
entity)
   throws MetaDataException
{
   // entity is done, can be validated and added
   appMetaData.addEntityBean(entity);
}

   public void setValue(EntityMetaData entity, String namespaceURI, 
String name, String value)
   {
  if(ejb-name.equals(name))
  {
 entity.setEjbName(value);
 entity.setTableName(value);
  }
  else if(home.equals(name))
  {
 entity.setHome(value);
  }
  else if(remote.equals(name))
...

This how it looks at the end:

  ApplicationMetaData metadata = new ApplicationMetaData();

  MetaDataReader reader = new MetaDataReader();

  InputStream is = getResource(ejb-jar.xml);
  MetaDataFactory factory = new EjbJarMetaDataFactory(metadata);
  reader.setMetaDataFactory(factory);
  reader.parse(is);
  is.close();
  is = getResource(jboss.xml);
  factory = new JBossMetaDataFactory(metadata);
  reader.setMetaDataFactory(factory);
  reader.parse(is);
  is.close();
  is = getResource(jbosscmp-jdbc.xml);
  factory = new JBossCMPMetaDataFactory(metadata);
  reader.setMetaDataFactory(factory);
  reader.parse(is);
  is.close();
At the end I have ApplicationMetaData populated from all the files. Only 
EjbJar factory creates objects, other factories populate existing ones.

julien viet wrote:

in what classe are you storing your metadata in what you wrote ? Typed
classes (Like EntityMetadata we have now) or generic untyped (like DOM) ?
please describe it

julien






---
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development





---
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


Re: [JBoss-dev] metadata management

2003-11-15 Thread Ricardo Argüello
Alexey Loubyansky wrote:

Ricardo Argüello wrote:

Why not use JAXB, or BEA's XMLBeans?


Perhaps. But I don't have much of experience with JAXB and no at all 
with XMLBeans. So, maybe you can tell me why?
Because it will generate the complex object model specified in the J2EE 
Deployment Descriptors, in a very easy way.

For example, it would generate an object to represent ejb-jar ... 
/ejb-jar from the EJB 2.1 deployment descriptor:

EjbJar ejbJar = EjbJarFactory.readFromFileSystem(deploymentDescriptorFile);
String name = ejbJar.getEjbName();
...
I have made up all this code, but is a good example of what you would 
expect from a XML/Java binding tool, as JAXB or XMLBeans.
Without having to write XML navigation/marshalling/unmarshalling code. A 
binding tool will generate all necesary Java files representing what's 
described in an XML Schema file, including validation.
We will have objets to refer to web-app ... /web-app, ejb-jar ... 
/ejb-jar, etc. with all complex relations between objets already coded.

And all these automaticaly generated from the official XML Schema files 
posted by Sun here:
http://java.sun.com/xml/ns/j2ee/

Think XDoclet... but for XML Schema files :-)


Since in J2EE 1.4 deployment descriptors are specified in XML Schema, 
it should be very easy to get an object model from that, using any 
XML/Java binding tool.


For example...
Sun's JAXB:
http://java.sun.com/xml/jaxb/
BEA's XMLBeans:
http://dev2dev.bea.com/technologies/xmlbeans/
XMLBeans is very new, but more flexible than JAXB.
I have experience with JAXB, and none with XMLBeans, but it is basically 
the same thing...
We could try both and decide later.

Ricardo Argüello

Thanks.

I would be interested in collaborating to code that.

Ricardo Argüello

Alexey Loubyansky wrote:

What are our plans for metadata? I remember various discussions but 
can we revisit it again? What are the requirements and wishes?

I am facing it right now. I would like to have, say, entity metadata 
from various sources (ejb-jar.xml, jbossxmp-jdbc.xml) in one place. 
So, I wrote a very simple frame that reads xml files and constructs 
the metadata tree. Actually, the metadata tree is built while 
reading ejb-jar.xml and then populated with other data from 
jboss.xml and jbosscmp-jdbc.xml.

But I would like to use something common, i.e. server-wide solution 
if we are going to agree on it.





---
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development





---
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


Re: [JBoss-dev] metadata management

2003-11-15 Thread Alexey Loubyansky
Will we be able to have, say, entity related data from ejb-jar.xml, 
jboss.xml and jbosscmp-jdbc.xml in the same class? Or will we need three 
classes?

Ricardo Argüello wrote:
Alexey Loubyansky wrote:

Ricardo Argüello wrote:

Why not use JAXB, or BEA's XMLBeans?


Perhaps. But I don't have much of experience with JAXB and no at all 
with XMLBeans. So, maybe you can tell me why?


Because it will generate the complex object model specified in the J2EE 
Deployment Descriptors, in a very easy way.

For example, it would generate an object to represent ejb-jar ... 
/ejb-jar from the EJB 2.1 deployment descriptor:

EjbJar ejbJar = EjbJarFactory.readFromFileSystem(deploymentDescriptorFile);
String name = ejbJar.getEjbName();
...
I have made up all this code, but is a good example of what you would 
expect from a XML/Java binding tool, as JAXB or XMLBeans.
Without having to write XML navigation/marshalling/unmarshalling code. A 
binding tool will generate all necesary Java files representing what's 
described in an XML Schema file, including validation.
We will have objets to refer to web-app ... /web-app, ejb-jar ... 
/ejb-jar, etc. with all complex relations between objets already coded.

And all these automaticaly generated from the official XML Schema files 
posted by Sun here:
http://java.sun.com/xml/ns/j2ee/

Think XDoclet... but for XML Schema files :-)


Since in J2EE 1.4 deployment descriptors are specified in XML Schema, 
it should be very easy to get an object model from that, using any 
XML/Java binding tool.


For example...


Sun's JAXB:
http://java.sun.com/xml/jaxb/
BEA's XMLBeans:
http://dev2dev.bea.com/technologies/xmlbeans/
XMLBeans is very new, but more flexible than JAXB.
I have experience with JAXB, and none with XMLBeans, but it is basically 
the same thing...
We could try both and decide later.

Ricardo Argüello




---
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


Re: [JBoss-dev] metadata management

2003-11-15 Thread julien viet
it depends, actually we could try to merge the 3 schemas into one :
ejb-jar + jboss + jbosscmp = one schema with 3 namespaces
and then find a tool that accept it.

 Will we be able to have, say, entity related data from ejb-jar.xml,
 jboss.xml and jbosscmp-jdbc.xml in the same class? Or will we need three
 classes?
 
 Ricardo Argüello wrote:
 Alexey Loubyansky wrote:
 
 Ricardo Argüello wrote:
 
 Why not use JAXB, or BEA's XMLBeans?
 
 
 
 Perhaps. But I don't have much of experience with JAXB and no at all
 with XMLBeans. So, maybe you can tell me why?
 
 
 Because it will generate the complex object model specified in the J2EE
 Deployment Descriptors, in a very easy way.
 
 For example, it would generate an object to represent ejb-jar ...
 /ejb-jar from the EJB 2.1 deployment descriptor:
 
 EjbJar ejbJar = EjbJarFactory.readFromFileSystem(deploymentDescriptorFile);
 String name = ejbJar.getEjbName();
 ...
 
 I have made up all this code, but is a good example of what you would
 expect from a XML/Java binding tool, as JAXB or XMLBeans.
 Without having to write XML navigation/marshalling/unmarshalling code. A
 binding tool will generate all necesary Java files representing what's
 described in an XML Schema file, including validation.
 We will have objets to refer to web-app ... /web-app, ejb-jar ...
 /ejb-jar, etc. with all complex relations between objets already coded.
 
 And all these automaticaly generated from the official XML Schema files
 posted by Sun here:
 http://java.sun.com/xml/ns/j2ee/
 
 Think XDoclet... but for XML Schema files :-)
 
 
 Since in J2EE 1.4 deployment descriptors are specified in XML Schema,
 it should be very easy to get an object model from that, using any
 XML/Java binding tool.
 
 
 
 For example...
 
 
 Sun's JAXB:
 http://java.sun.com/xml/jaxb/
 
 BEA's XMLBeans:
 http://dev2dev.bea.com/technologies/xmlbeans/
 
 XMLBeans is very new, but more flexible than JAXB.
 I have experience with JAXB, and none with XMLBeans, but it is basically
 the same thing...
 We could try both and decide later.
 
 Ricardo Argüello
 
 
 
 
 ---
 This SF. Net email is sponsored by: GoToMyPC
 GoToMyPC is the fast, easy and secure way to access your computer from
 any Web browser or wireless device. Click here to Try it Free!
 https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
 ___
 JBoss-Development mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-development



---
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


Re: [JBoss-dev] metadata management

2003-11-15 Thread Holger Baxmann @ mac
mmmhm, RelaxNG is a superset for XML Schema. It could be handled W3C  
Schema compliant and could generate standardized XSD from its own  
Schema. AFAIR via XSLT.

I would suggest it because of the comfortable, easy and short way to  
_get_grip_. I know of no other XML Application which could go from DTD  
to XSD in such an easy manner.

Forget about the funny basic-like own language in RelaxNG.

RelaxNG and W3C XML Schema are not distinct they complement each other.

bax

Am 15.11.2003 um 11:47 schrieb julien viet:

you would have to translate schema to relaxNG first, and relaxNG does
validation only. maybe there is a binding tool.
from my experience with schema, XML W3C schema are a big mess,they are
ambigous, there is not a formal model underlysing etc.. and relax is  
cool.
But schema are widely accepted (microsost push) and recognized by the
industry and J2EE gives all its schema in w3c schema.

IMHO RelaxNG could be the tool to get grip with thiss issue.

bax

Am 15.11.2003 um 06:25 schrieb Ricardo Argüello:

Why not use JAXB, or BEA's XMLBeans?

Since in J2EE 1.4 deployment descriptors are specified in XML Schema,
it should be very easy to get an object model from that, using any
XML/Java binding tool.
I would be interested in collaborating to code that.

Ricardo Argüello

Alexey Loubyansky wrote:

What are our plans for metadata? I remember various discussions but
can we revisit it again? What are the requirements and wishes?
I am facing it right now. I would like to have, say, entity metadata
from various sources (ejb-jar.xml, jbossxmp-jdbc.xml) in one place.
So, I wrote a very simple frame that reads xml files and constructs
the metadata tree. Actually, the metadata tree is built while  
reading
ejb-jar.xml and then populated with other data from jboss.xml and
jbosscmp-jdbc.xml.

But I would like to use something common, i.e. server-wide solution
if we are going to agree on it.


---
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer  
from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/
g22lp.tmpl
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development






---
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer  
from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?
Target___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development



---
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/ 
g22lp.tmpl
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


---
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp? 
Target___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development



---
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


Re: [JBoss-dev] metadata management

2003-11-14 Thread julien viet
in what classe are you storing your metadata in what you wrote ? Typed
classes (Like EntityMetadata we have now) or generic untyped (like DOM) ?

please describe it

julien

 What are our plans for metadata? I remember various discussions but can
 we revisit it again? What are the requirements and wishes?
 
 I am facing it right now. I would like to have, say, entity metadata
 from various sources (ejb-jar.xml, jbossxmp-jdbc.xml) in one place. So,
 I wrote a very simple frame that reads xml files and constructs the
 metadata tree. Actually, the metadata tree is built while reading
 ejb-jar.xml and then populated with other data from jboss.xml and
 jbosscmp-jdbc.xml.
 
 But I would like to use something common, i.e. server-wide solution if
 we are going to agree on it.
 
 
 
 
 ---
 This SF. Net email is sponsored by: GoToMyPC
 GoToMyPC is the fast, easy and secure way to access your computer from
 any Web browser or wireless device. Click here to Try it Free!
 https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
 ___
 JBoss-Development mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-development



---
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


Re: [JBoss-dev] metadata management

2003-11-14 Thread Alexey Loubyansky
I mimic current metadata classes but add more data, for example, for 
EntityMetaData (so that, i can get rid of JDBCxxxMetaData).
It would be easier to look at the code really.

It is based on SAXParser and MetaDataContentHandler which delegates to 
MetaDataFactory implementation (e.g. EjbJarMetaDataFactory, 
JBossCMPMetaDataFactory, etc)
Metadata factory is the source for metadata objects. When a new element 
is read, the factory is asked for a new corresponding metadata object. 
The factory can return null (meanning ignore this child). The returned 
metadata object is pushed in a stack.
Then we read another element and call the factory for a new metadata 
object passing in the parent metadata object from the stack, namesapce 
URI and element name. Again, the factory can ignore by returing null, or 
return a new new object.
When some text value is read, we call the factory with the current 
metadata object on the stack, element namesapce URI, element name and 
text value. This way I initialize the fields.
Finally, when the element is read from the file, I pop the element from 
the stack, peek its parent from the stack and call factory to add the 
child to the parent. At this time child also can be validated.

I don't use any special interfaces for metadata objects. The methods are 
discovered by introspection. For example, from EjbJarMetaDataFactory:

// started a new element
public Object newChild(ApplicationMetaData appMetaData, String 
namespaceURI, String qName)
{
   Object child = null;
   if(entity.equals(qName))
   {
  child = new EntityMetaData(appMetaData);
   }
   return child;
}

public void addChild(ApplicationMetaData appMetaData, EntityMetaData entity)
   throws MetaDataException
{
   // entity is done, can be validated and added
   appMetaData.addEntityBean(entity);
}
   public void setValue(EntityMetaData entity, String namespaceURI, 
String name, String value)
   {
  if(ejb-name.equals(name))
  {
 entity.setEjbName(value);
 entity.setTableName(value);
  }
  else if(home.equals(name))
  {
 entity.setHome(value);
  }
  else if(remote.equals(name))
...

This how it looks at the end:

  ApplicationMetaData metadata = new ApplicationMetaData();

  MetaDataReader reader = new MetaDataReader();

  InputStream is = getResource(ejb-jar.xml);
  MetaDataFactory factory = new EjbJarMetaDataFactory(metadata);
  reader.setMetaDataFactory(factory);
  reader.parse(is);
  is.close();
  is = getResource(jboss.xml);
  factory = new JBossMetaDataFactory(metadata);
  reader.setMetaDataFactory(factory);
  reader.parse(is);
  is.close();
  is = getResource(jbosscmp-jdbc.xml);
  factory = new JBossCMPMetaDataFactory(metadata);
  reader.setMetaDataFactory(factory);
  reader.parse(is);
  is.close();
At the end I have ApplicationMetaData populated from all the files. Only 
EjbJar factory creates objects, other factories populate existing ones.

julien viet wrote:

in what classe are you storing your metadata in what you wrote ? Typed
classes (Like EntityMetadata we have now) or generic untyped (like DOM) ?
please describe it

julien




---
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


Re: [JBoss-dev] metadata management

2003-11-14 Thread julien viet
so it is IOC metadata parsing :-)

so the MetaData classes are pretty much the same, what just differ is the
feeding method and you removed some metadata classes ?



 I mimic current metadata classes but add more data, for example, for
 EntityMetaData (so that, i can get rid of JDBCxxxMetaData).
 It would be easier to look at the code really.
 
 It is based on SAXParser and MetaDataContentHandler which delegates to
 MetaDataFactory implementation (e.g. EjbJarMetaDataFactory,
 JBossCMPMetaDataFactory, etc)
 Metadata factory is the source for metadata objects. When a new element
 is read, the factory is asked for a new corresponding metadata object.
 The factory can return null (meanning ignore this child). The returned
 metadata object is pushed in a stack.
 Then we read another element and call the factory for a new metadata
 object passing in the parent metadata object from the stack, namesapce
 URI and element name. Again, the factory can ignore by returing null, or
 return a new new object.
 When some text value is read, we call the factory with the current
 metadata object on the stack, element namesapce URI, element name and
 text value. This way I initialize the fields.
 Finally, when the element is read from the file, I pop the element from
 the stack, peek its parent from the stack and call factory to add the
 child to the parent. At this time child also can be validated.
 
 I don't use any special interfaces for metadata objects. The methods are
 discovered by introspection. For example, from EjbJarMetaDataFactory:
 
 // started a new element
 public Object newChild(ApplicationMetaData appMetaData, String
 namespaceURI, String qName)
 {
   Object child = null;
   if(entity.equals(qName))
   {
  child = new EntityMetaData(appMetaData);
   }
   return child;
 }
 
 public void addChild(ApplicationMetaData appMetaData, EntityMetaData entity)
   throws MetaDataException
 {
   // entity is done, can be validated and added
   appMetaData.addEntityBean(entity);
 }
 
   public void setValue(EntityMetaData entity, String namespaceURI,
 String name, String value)
   {
  if(ejb-name.equals(name))
  {
 entity.setEjbName(value);
 entity.setTableName(value);
  }
  else if(home.equals(name))
  {
 entity.setHome(value);
  }
  else if(remote.equals(name))
 ...
 
 
 This how it looks at the end:
 
  ApplicationMetaData metadata = new ApplicationMetaData();
 
  MetaDataReader reader = new MetaDataReader();
 
  InputStream is = getResource(ejb-jar.xml);
  MetaDataFactory factory = new EjbJarMetaDataFactory(metadata);
  reader.setMetaDataFactory(factory);
  reader.parse(is);
  is.close();
 
  is = getResource(jboss.xml);
  factory = new JBossMetaDataFactory(metadata);
  reader.setMetaDataFactory(factory);
  reader.parse(is);
  is.close();
 
  is = getResource(jbosscmp-jdbc.xml);
  factory = new JBossCMPMetaDataFactory(metadata);
  reader.setMetaDataFactory(factory);
  reader.parse(is);
  is.close();
 
 At the end I have ApplicationMetaData populated from all the files. Only
 EjbJar factory creates objects, other factories populate existing ones.
 
 julien viet wrote:
 
 in what classe are you storing your metadata in what you wrote ? Typed
 classes (Like EntityMetadata we have now) or generic untyped (like DOM) ?
 
 please describe it
 
 julien
 
 
 
 
 
 ---
 This SF. Net email is sponsored by: GoToMyPC
 GoToMyPC is the fast, easy and secure way to access your computer from
 any Web browser or wireless device. Click here to Try it Free!
 https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
 ___
 JBoss-Development mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-development



---
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


Re: [JBoss-dev] metadata management

2003-11-14 Thread Ricardo Argüello
Why not use JAXB, or BEA's XMLBeans?

Since in J2EE 1.4 deployment descriptors are specified in XML Schema, it 
should be very easy to get an object model from that, using any XML/Java 
binding tool.

I would be interested in collaborating to code that.

Ricardo Argüello

Alexey Loubyansky wrote:

What are our plans for metadata? I remember various discussions but 
can we revisit it again? What are the requirements and wishes?

I am facing it right now. I would like to have, say, entity metadata 
from various sources (ejb-jar.xml, jbossxmp-jdbc.xml) in one place. 
So, I wrote a very simple frame that reads xml files and constructs 
the metadata tree. Actually, the metadata tree is built while reading 
ejb-jar.xml and then populated with other data from jboss.xml and 
jbosscmp-jdbc.xml.

But I would like to use something common, i.e. server-wide solution if 
we are going to agree on it.



---
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development





---
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development