Il 24/08/2012 22:42, David Blevins ha scritto:
On Aug 24, 2012, at 8:41 AM, Enrico Olivelli wrote:

I would like to use this to have a place for the admin to write all the
config of the application, so I need only application scoped resources
<Configuration>
administratoraddress='**myaddress@mydomain'
</Configuration>

class NotificationSenderBean {
@Resource(...) String administratoraddress;
}


sounds like you want our env-entries.properties feature, will dig a bit to
see if i can add it now to make a proposal

I know that this already works with web.xml, but I don't like that admins edit 
web.xml

@Resource(mappedName="administratoraddress") String administratoraddress;

   <env-entry>

        <env-entry-name>administratoraddress</env-entry-name>

        <env-entry-type>java.lang.String</env-entry-type>

        <env-entry-value>myaddress@xzxxxx</env-entry-value>

    </env-entry>
This is currently possible via the env-entries.properties file.

http://tomee.apache.org/custom-injection.html

Very smart!
I'l try soon
I could not find this doc on the website, and many other

http://tomee.apache.org/documentation.html has few links :-(



We should probably add an element for that as well.

Perhaps <EnvEntryProperties>, <EnvProperties>, or something? (other ideas?)


Yes, it would be great to only one config file !

-David





Reply via email to