users@javaee-spec.java.net

[javaee-spec users] Re: resource configuration metadata options

From: Bill Shannon <bill.shannon_at_oracle.com>
Date: Wed, 26 Oct 2011 17:21:21 -0700

Pete Muir wrote on 10/26/11 14:38:
>>> Finally, have you considered a programmatic, fluent API used to configure
>>> resources? We've found these to be very popular with users.
>>>
>>
>> As Bill noted, we need this info at deployment time.
>
> I'm not sure this prohibits the use of a fluent API. There is nothing to stop
> us calling Java code at deployment time?

It's only software after all, so I'm sure we could make this work somehow,
but...

Today we *never* run application code at deployment time.

Doing so would require us to define the security environment in which the
code runs, which classes are accessible to the code, etc.

Such code would have access to other application classes before the application
was initialized, which could be very confusing.

In our product, in a cluster, the deployment is done on a server that's
different than the server that runs the application, magnifying some of
the above problems. Other products might need to run the code on every
server in the cluster. The differences in behavior would make it difficult
to write a portable application.

I think there's enough issues here that I really don't want to consider
this at this time.