On 14 March 2011 08:29, Miroslav Pokorny <[email protected]> wrote:

> The one thing I always find troublesome with annotation use as a config
> mechanism is they are unmodufiable.
>

You could always use property-placeholders in annotations, such as @Path(
"${tmp}/${app}/working/" ) and then interpolate the value at runtime - I've
used this in  few apps and it solves a lot of the issues about immutable
annotations.

Most frameworks that use annotations almost never include an alternate way
> to programatically build the same config on that sub-system. Why is this a
> problem ? It's a problem because you cam only add/set annotation values at
> compile time- which sucks if you want to use a class instance twice with the
> only diff being the value portion of an annotation.
>

Yes that can be an issue, but that's more to do with those particular
frameworks than annotations themselves - it's certainly possible to merge
annotation and XML configuration (and other forms of metadata) without
having to redo everything.


> Shutup give me a Concrete example I hear you day- take Hibernate. There is
> no way to alter/override an annotation on an entity in a simple way. Yes the
> only way is to define everything (almost) for that entity in an XML file.
> There is no real (public api )way to load some config object from an entity
> and then call a setter to "override" one feature.
>
> Eg replace
> Hibernate Configuration.addAnnotstedclass with
>
> Configuration.addEntity(
> EntityConfig.scanAnnotations( annotated class).setFeature( x...)));
>
> EntityConfig also gets the load from hbm.XML method etc.
>
> On 14/03/2011, at 8:08 AM, Mark Derricutt <[email protected]> wrote:
>
> Oh really?  I'd never known they had existed until listening to this ep,
> googled and found them and thought "wow - this looks AWESOME!", but they're
> gone?  That sucks.
>
> --
> "Great artists are extremely selfish and arrogant things" — Steven Wilson,
> Porcupine Tree
>
> On Sun, Mar 13, 2011 at 7:54 PM, Marek < <[email protected]>
> [email protected]> wrote:
>
>> So I did a little bit of a research
>> and it turns out that these annotations were removed in the final
>> release of the JDBC 4.0 specification (therefore don't look for them
>> in your JDK6 - there is no @Select, @Update etc.). Does anybody know
>> why they were removed?
>>
> --
Cheers, Stuart

-- 
You received this message because you are subscribed to the Google Groups "The 
Java Posse" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/javaposse?hl=en.

Reply via email to