There doesn't seem to be one recommended way to inject/use JPA-based
utility archives in Wicket. It looks as though most of it is based
around Spring, which is fine, yet adds another app layer.
I've generated a tiny Derby db using the JPA facilities provided by
MyEclipse.
The sources can be found at:
http://nedron.net/JpaTest.jar
A binary "library" was created, including the default generated
persistence.xml file and can be downloaded at:
http://nedron.net/JpaTest-bin.jar
I think more people than just me would find it useful if someone could
use this extremely simple database in a simple, single page Wicket app.
Note that I have zero problem using this type of library in a
standalone Java app, and given that I'm relatively new to Wicket, I
don't want to go to a bunch of effort only to find that I've gone
about it the wrong way.
Basic questions...
Do I need to get hold of the com.foo.jpa.JpaNet.EntityManagerHelper in
the main WicketApplication class and then serve that out to pages and
panels as needed? The question here is, do I need EntityManagerHelper
transaction wrappers around my DAO operations? Or is that handled auto-
magically by some other mechanism (JTA)?
I guess what I'm really getting at is, what is the recommended way to
use the library directly without extracting it?
All of the examples I've found so far include the dao/etc. along with
the app code, so there is no clear indication as to how a "third-
party" java library is used in Wicket(/Spring). And many examples and
much of the documentation is remarkably framdibulous, along the lines
of "What is session managed? Session managed is not container managed.
What is container managed? Container managed is not session managed."
I've gotten myself pretty confused on this, as you can tell. ;)
-David
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]