Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [EMFTransaction] EMF Transaction in a web app
[EMFTransaction] EMF Transaction in a web app [message #1430871] Wed, 24 September 2014 23:47 Go to next message
Scott Dybiec is currently offline Scott DybiecFriend
Messages: 148
Registered: July 2009
Senior Member
I'm running an EMF-based application as a web app in Tomcat. I recently
added Transaction support using EMF Transaction and encountered the
exception and stack trace below.

A web search turned up this discussion about this same exception:

http://www.eclipse.org/forums/index.php?t=msg&th=202945/

Is there a workaround to avoid the exception and get EMF Transaction to
run in a standard web app server?

Here's the stack trace from my application:

Caused by: java.lang.IllegalArgumentException: Can only deactivate the
active transaction
at
org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl.deactivate(TransactionalEditingDomainImpl.java:533)
at
org.eclipse.emf.transaction.impl.TransactionImpl.close(TransactionImpl.java:712)
at
org.eclipse.emf.transaction.impl.TransactionImpl.commit(TransactionImpl.java:474)
at
org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl.runExclusive(TransactionalEditingDomainImpl.java:333)
at
com.humanfactor.rw.lrs.store.file.ResourceFileReader.call(ResourceFileReader.java:262)
at
com.humanfactor.rw.lrs.store.file.ResourceUpdateManager.runRead(ResourceUpdateManager.java:117)
... 29 more
Re: [EMFTransaction] EMF Transaction in a web app [message #1431302 is a reply to message #1430871] Thu, 25 September 2014 13:49 Go to previous message
Christian W. Damus is currently offline Christian W. DamusFriend
Messages: 1199
Registered: July 2009
Location: Canada
Senior Member

Hi,

The exclusive locking implementation in transactions uses the Eclipse
job manager's locks because that provides for protection against
hanging the SWT UI thread. If you don't have the job manager running
in your web container, then I suppose these synchronization failures
could result. As the API only attempts to support the Eclipse
workbench environment, it wasn't tested in other configurations such as
web containers while I was involved in the project, so I'm mostly
speculating here.

So, I can't suggest any useful work-around for you other than to
add/start the JobManager, if that's even something that you can
reasonably do.

HTH,

Christian

On 2014-09-24 23:47:42 +0000, scott@xxxxxxxx said:

> I'm running an EMF-based application as a web app in Tomcat. I recently
> added Transaction support using EMF Transaction and encountered the
> exception and stack trace below.
>
> A web search turned up this discussion about this same exception:
>
> http://www.eclipse.org/forums/index.php?t=msg&th=202945/
>
> Is there a workaround to avoid the exception and get EMF Transaction to
> run in a standard web app server?
>
> Here's the stack trace from my application:
>
> Caused by: java.lang.IllegalArgumentException: Can only deactivate the
> active transaction
> at
> org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl.deactivate(TransactionalEditingDomainImpl.java:533)
>
> at
> org.eclipse.emf.transaction.impl.TransactionImpl.close(TransactionImpl.java:712)
>
> at
> org.eclipse.emf.transaction.impl.TransactionImpl.commit(TransactionImpl.java:474)
>
> at
> org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl.runExclusive(TransactionalEditingDomainImpl.java:333)
>
> at
> com.humanfactor.rw.lrs.store.file.ResourceFileReader.call(ResourceFileReader.java:262)
>
> at
> com.humanfactor.rw.lrs.store.file.ResourceUpdateManager.runRead(ResourceUpdateManager.java:117)
>
> ... 29 more
Previous Topic:[EMFStore] ESWorkspace.getLocalProject(eObject obj) throws uncatchable exception
Next Topic:[TEXO] Memory management
Goto Forum:
  


Current Time: Wed Jun 03 01:43:42 GMT 2020

Powered by FUDForum. Page generated in 0.01823 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top