users@jersey.java.net

[Jersey] Init some data when my resource is called

From: tmp <le_tmp_at_gmx.de>
Date: Mon, 28 Nov 2011 06:19:35 -0800 (PST)

hello!

when i create a normal java app the main class like like this:

public static void main(String[] args) {
                .... SOME CODE ...
}

there I can put my initial code (for example logger configuration ).

How can I achieve that in a resource? There I don't have a main method, but
I need to init some data everytime this resource is called.

Do I have to create something like an init-function and call it from every
method of that resource or is there a better way?

Thanks alot!


--
View this message in context: http://jersey.576304.n2.nabble.com/Init-some-data-when-my-resource-is-called-tp7038887p7038887.html
Sent from the Jersey mailing list archive at Nabble.com.