ledsoft / jopa-spring-transaction Goto Github PK
View Code? Open in Web Editor NEWSpring declarative transactions with JOPA.
License: MIT License
Spring declarative transactions with JOPA.
License: MIT License
Current implementation of query wrappers use the default getResultStream
method implementation from Query
interface, which invokes getResultList
. It would be better if they implemented it and invoked getResultStream
of the delegate query instance.
Note that EntityManager
needs to be closed when stream processing is finished.
The setup contains an inheritance hierarchy on DAO objects described below. It ends up with an exception during deployment "Bean named 'datasetSourceDao' is expected to be of type 'cz.cvut.kbss.datasetdashboard.dao.DatasetSourceDao' but was actually of type 'com.sun.proxy.$Proxy38'.
I have a REST controller that autowires a service that autowires an instance of DatasetSourceDao. This DAO inherits from a base DAO (GenericDao being a generic DAO interface)
public abstract class BaseDao implements GenericDao {
@Autowired private EntityManager em;
...
@transactional("txManager")
public T find(URI uri) {
return em.find(type, uri);
}
...
}
and an inherited DAO
@repository
public class DatasetSourceDao extends BaseDao<dataset_source> {
@Autowired private EntityManager em;
public DatasetSourceDao() { super(dataset_source.class); }
@Transactional("txManager")
public void anotherMethod() {
...
}
...
}
Support for read-only transactions should be added, so that retrieve methods can be transactional instead of running outside of transaction and closing entity manager after each operation.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.