Custom Unit Of Work without the Servlet API

3 views
Skip to first unread message

Alexandre Walter Pretyman

unread,
Mar 18, 2010, 8:41:31 PM3/18/10
to warp-core
Hi,

I'm writing a Desktop application and I found need to use the custom
UOW, however I can't do it configuring Warp Persist across the
UnitOfWork.TRANSACTION, but for UnitOfWork.REQUEST I guess I need the
servlet API to use it.

I'm wondering, since my application doesn't need the servlet API, is
there anyway to get the custom unit of work without it?

Thanks,
Alex

Dhanji R. Prasanna

unread,
Mar 18, 2010, 9:54:51 PM3/18/10
to warp...@googlegroups.com
On Fri, Mar 19, 2010 at 11:41 AM, Alexandre Walter Pretyman <alexandre...@gmail.com> wrote:
Hi,

I'm writing a Desktop application and I found need to use the custom
UOW, however I can't do it configuring Warp Persist across the
UnitOfWork.TRANSACTION, but for UnitOfWork.REQUEST I guess I need the
servlet API to use it.

Yea just go ahead and use the REQUEST unit of work, it shouldn't matter that you're not using the servlet API. We will improve this rather confusing situation in guice-persist...

Dhanji.

Alexandre Walter Pretyman

unread,
Mar 19, 2010, 10:35:28 AM3/19/10
to warp-core
Thanks for promptly reply. I did try the UnitOfWork.REQUEST, but it
seems to be dependant on the servlet api, just by changing the
across() call while building the persistence service to
UnitOfWork.REQUEST, it gives me this exception:

xception in thread "main" java.lang.NoClassDefFoundError: javax/
servlet/Filter
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at com.wideplay.warp.persist.PersistenceService
$1.publishWorkManager(PersistenceService.java:44)
at com.wideplay.warp.persist.hibernate.HibernatePersistenceStrategy
$HibernatePersistenceModule.visit(HibernatePersistenceStrategy.java:
107)
at
com.wideplay.warp.persist.internal.PersistenceServiceBuilderImpl.buildModule(PersistenceServiceBuilderImpl.java:
67)


On Mar 18, 10:54 pm, "Dhanji R. Prasanna" <dha...@gmail.com> wrote:
> On Fri, Mar 19, 2010 at 11:41 AM, Alexandre Walter Pretyman <
>

Dhanji R. Prasanna

unread,
Mar 19, 2010, 6:10:38 PM3/19/10
to warp...@googlegroups.com
Ohh, it looks like a dep on the servlet api exists in trunk =(

Can you just drop the jar in? It won't be used for anything and it's a smallish jar. Alternatively you can try downloading the warp-persist-1.0.1.jar, if you are not using any of the trunk features.

Dhanji.

--
You received this message because you are subscribed to the Google Groups "warp-core" group.
To post to this group, send email to warp...@googlegroups.com.
To unsubscribe from this group, send email to warp-core+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/warp-core?hl=en.


Reply all
Reply to author
Forward
0 new messages