Skip to content

Thread safety and state

DuyHai DOAN edited this page May 5, 2013 · 8 revisions

By design, the Achilles' EntityManager is stateless. It only contains references to meta data and pre-built DAOs. On common operations (persist, merge, remove...) it delegates the job to underlying implementation classes.

Thus the EntityManager is thread-safe and can be injected as a singleton in any of your DAO/Services.

Example:

	...
	@Inject
	private ThriftEntityManager em;
	...
	...

Home

Clone this wiki locally