Spring Data JPA: How can Query return Non- Entities Objects or List of Objects?

You can do something like @NamedQuery(name=”findWhatever”, query=”SELECT new path.to.dto.MyDto(e.id, e.otherProperty) FROM Student e WHERE e.id = ?1″) Then the MyDto object would just need a constructor defined with the correct fields i.e. public MyDto(String id, String otherProperty) { this.id = id; this.otherProperty = otherProperty; }

What is a rolling restart of applications?

A rolling restart or ripplestart of applications is typically an operation that may be performed on applications that are deployed across multiple JVMs or application servers (for example, in a cluster) to incrementally stop and start applications on each JVM. The purpose may be for an application to pick up configuration changes that require a … Read more

Strategy for Offline/Online data synchronization

There are a number of Java libraries for data synchronizing/replication. Two that I’m aware of are daffodil and SymmetricDS. In a previous life I foolishly implemented (in Java) my own data replication process. It seems like the sort of thing that should be fairly straightforward, but if the data can be updated in multiple places … Read more

How do I use the Jersey JSON POJO support?

You can use @XmlRootElement if you want to use JAXB annotations (see other answers). However, if you prefer pure POJO mapping, you must do the following (Unfortunately it isn’t written in docs): Add jackson*.jar to your classpath (As stated by @Vitali Bichov); In web.xml, if you’re using com.sun.jersey.config.property.packages init parameter, add org.codehaus.jackson.jaxrs to the list. … Read more

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