Differences between JPA and JPA2 [closed]

Google returns many results, including this and this blog posts. The summary (copied from the former) is: Added support for persistently ordered lists using OrderColumn and provider-managed ordering column Defined support for foreign key mapping strategy for unidirectional one-to-many relationships Added clear method to EntityManager interface to allow entities to be evicted from the persistence … Read more

MappedSuperclass – Change SequenceGenerator in Subclass

Yes, it is possible. You can override the default generator name with the @SequenceGenerator annotation. Base class @MappedSuperclass public abstract class PersistentEntity implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = “default_gen”) protected Long id = 0L; public Long getId() { return id; } public void setId(Long id) … Read more

EJB3 transaction rollback

First of all, there is no rollback of an exception, it’s a rollback of a transaction. If you throw your exception with @ApplicationException(rollback=true), you don’t have to rollback the transaction manually. Context.setRollbackOnly() forces the container to rollback the transaction, also if there is no exception. A checked exception itself doesn’t rollback a transaction. It needs … Read more

Autowiring in servlet

I followed the solution in the following link, and it works fine: Access Spring beans from a servlet in JBoss public class MyServlet extends HttpServlet { @Autowired private MyService myService; public void init(ServletConfig config) { super.init(config); SpringBeanAutowiringSupport.processInjectionBasedOnServletContext(this, config.getServletContext()); } }

Where to download sqlitejdbc? [closed]

Original Post: They’ve since moved from Google Code to BitBucket. Here’s the BitBucket Repo: https://bitbucket.org/xerial/sqlite-jdbc Update 8-13-2015: Now they’re off to GitHub: https://github.com/xerial/sqlite-jdbc I’ve left the bitbucket link because there is a wealth of project information there, even though the code has moved to git hub.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)