Hi Dain,

How about byte code post-processing to add the metadata? This
would allow changing the metadata without changing or recompiling
the code. The class could also optionally contain a reference id for
the metadata, rather than the metadata itself, so that it could be
changed dynamically at runtime without even reloading the class
file. (This second idea would involve a runtime library to support a
metadata store, which could optionally be persistent.)

-Dan

On 17 May 2002, at 14:12, Dain Sundstrom wrote:

> Ok, I'm responding to my own email.  Sometimes I get to excited.
>
> This is technique will only be useful in some circumstances because it
> requires changing your source code to change a simple configuration.  In
> my case this is acceptable, because I'm talking about test cases.  It
> would also be useful for many EJB programmers, as they use XDoclet to
> set TX attributes (although they can still change the dd, they are not
> editing the source of truth).
>
> I still think it would be very useful, but it is not as ungodly powerful
> as I first thought.
>
> -dain
>
> Dain Sundstrom wrote:
>
> > I was just thinking how cool it would be to generically associate xml
> > with a method declaration.
> >
> > Back story:
> >
> > I am working on unit test cases for JBossCMP using JUnitEJB and it would
> > be really useful to mark a test method with a tx attribute.  Now this
> > test code is not an EJB or an XMBean, so I don't have a descriptor file
> > (this is not important; I just wanted to avoid the lame "make it an ejb
> > emails").
> >
> > Idea (I only know a little about XDoclet an less about C#)
> >
> > Mark up the code with XDoclet tags that contain generic xml.  Then run
> > XDoclet to preprocess the java file and generate a new java file with an
> > additional method getClassMetaData.  This class would work like the
> > getClass stuff, but would add additional methods to return the extra
> > metadata specified in the class.
> >
> > Use:
> >
> > In my case, the server side tester would get the metadata, check for a
> > tx tag and would start a tx if required by the tag.  We could use the
> > same tricks with MBeans, JBoss Enterprise Beans (JEBs), and anything.
> > This is something (I think) C# has and is unbelievably powerful.
> >
> > What do you think?
> >
> > -dain
> >
> >
> > _______________________________________________________________
> >
> > Hundreds of nodes, one monster rendering program.
> > Now that's a super model! Visit http://clustering.foundries.sf.net/
> > _______________________________________________
> > Jboss-development mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/jboss-development
>
>
>
> _______________________________________________________________
>
> Hundreds of nodes, one monster rendering program.
> Now that’s a super model! Visit http://clustering.foundries.sf.net/
> _______________________________________________
> Jboss-development mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-development



_______________________________________________________________

Hundreds of nodes, one monster rendering program.
Now that’s a super model! Visit http://clustering.foundries.sf.net/
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to