One way is to use
getClass().getResource("/META-INF/persistence.xml");
You might need to ensure that you use the correct classloader... or
you might need to use the little known ClassLoader.getResources(String
name) which will return the URLs of all the matching resources if
multiples overlap.
-Stephen
On Dec 5, 2007 9:36 AM, <glassfish_at_javadesktop.org> wrote:
> Hello,
>
> How can I define custom properites in my ejb archive (e.g. via the sun-ejb-jar.xml or persistence.xml), which I can the access in my implementation classes (e.g. usernames or logger domains.
>
> I would like to do something like that:
> value = glassFishProperties.getProperty("myProperty");
>
> Any help and a short code snipplet would be apprechiated.
> [Message sent by forum member 'tipunch' (tipunch)]
>
> http://forums.java.net/jive/thread.jspa?messageID=248596
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>