This article is about improving JPA’s performance when working with large/thick hierarchies. Let’s suppose that for some reason you have a similar (or larger) hierarchy to one I encountered in one of my projects: – InheritanceType.JOINED also using DiscriminatorColumn – […]
Java
Java hibernate
How to mix inheritance strategies with JPA annotations and Hibernate? http://stackoverflow.com/questions/3915026/how-to-mix-inheritance-strategies-with-jpa-annotations-and-hibernate use @SecondaryTable for joined table
Spring MVC
Async processing See Spring MVC Configuration which relates to Callable return type for controller’s method.
Spring security with kerberos
What is a keytab, and how do I use one? Introduction to Kerberos for Managers Crash Course to Kerberos Appendix D. Troubleshooting JAAS authentication with Kerberos http://www.roguelynn.com/words/explain-like-im-5-kerberos/ KDC = Kerberos Key Distribution Center TGT = Ticket Granting Ticket TGS = […]
Spring security
HTML translated to java config see also Java Configuration see also http://www.springframework.org/schema/security/spring-security.xsd … @Configuration @EnableWebSecurity public class WebSecurityConfig { @Autowired private AuthenticationManager am; /* @param auth @throws Exception / @Autowired public void configureGlobal(final AuthenticationManagerBuilder auth) throws Exception { […]
JPA performance
http://java-persistence-performance.blogspot.ro/2011/06/how-to-improve-jpa-performance-by-1825.html# http://spitballer.blogspot.ro/2010/04/jpa-persisting-vs-merging-entites.html Use byte code weaving EclipseLink implements LAZY for OneToOne and ManyToOne relationships using byte code weaving Pagination Use setFirstResult, setMaxResults of javax.persistence.Query. Caching See https://docs.oracle.com/javaee/7/tutorial/persistence-cache001.htm#GKJIO. See in persistence.xml or javax.persistence.sharedCache.mode property when creating the EntityManagerFactory. See javax.persistence.Cacheable used […]
JAXB 2.2.10
see also http://docs.oracle.com/javaee/5/tutorial/doc/bnbbf.html see also https://jaxb.java.net/tutorial/index.html see also https://jaxb.java.net/guide/index.html – Unofficial JAXB Guide see also How to get simple and better typed binding in https://metro.java.net/guide/ch03.html globalBindings fixedAttributeAsConstantProperty fixed attributes will be generated as a java constant. @XmlSchemaType(name = “NMTOKEN”) public […]
JAX-WS RI
See also https://jax-ws.java.net/nonav/2.2.10/docs/index.html. You can view the WSDL file in browser using: http://localhost:8080/helloservice/HelloService?wsdl The below didn’t work for me with jax-ws 2.2.10 ri (java approach). Test the service without a client by typing the following URL in browser: http://localhost:8080/helloservice/HelloService?Tester
Spring Data REST
The core functionality of Spring Data REST is to export resources for Spring Data repositories. Spring Data REST exposes sub-resources of every item resource for each of the associations the item resource has. By default, Spring Data REST uses HAL […]
Spring HATEOAS
HATEOAS means Hypermedia As The Engine Of Application State ResourceSupport – support class for building DTOs with links ControllerLinkBuilder – allows to create links by pointing to controller classes (Spring MVC controllers or JAX-RS resource classes) With ControllerLinkBuilder you depend […]
Java Memory Model
Volatile doesn’t mean what you think, either
Apache CXF 3.0.3
Scenario 1 All jax-rs annotation are applied on interface. No jax-rs annotation are applied on class. @POST @Consumes({ APPLICATION_XML }) method1(InputStream istream) @POST @Consumes({ APPLICATION_FORM_URLENCODED }) method2a(@FormParam(“”) final Pojo2 p2) -> won’t detect it as a resource method @POST @Consumes({ […]
JAX-RS with Jersey
Terms resource method designator – annotation such as @GET, @PUT, @POST, @DELETE sub-resource methods – methods annotated with @Path and also with resource method designators such as @GET or @POST sub-resource locators – methods annotated with @Path but not with […]
@MapKey vs @MapKeyColumn
// @MapKey refers the field/property (unique one) in the Entity witch is the value of a Map field/property // @MapKeyColumn refers the column in an @ElementCollection @Entity public class Person6 { @OneToMany(fetch = FetchType.EAGER, cascade = CascadeType.ALL, orphanRemoval = true, […]
ESB
ESB – match and route (filter node for IBM) – convert (protocols) – format data – orchestration (e.g. from some web services, dbs, files, etc collect partial data and create a new web services) – event delivering ESB = Enterprise […]