background preloader

Incubadora

Facebook Twitter

The Death of XSLT in Web Frameworks. Several years ago there was a trend in Java web frameworks to use XML processing as a foundation for the framework logic: take the data from database and present it as XML document (either convert it from relational data, or use XML capable database), and transform it to HTML using XSLT.

The Death of XSLT in Web Frameworks

There were some books written about it, and some frameworks created (like Cocoon). After some time the hype started to decline, and currently virtually no modern web framework apply this approach, I think. Actually I've never used it on myself, but I liked the idea at that time. It seemed to be clear and powerful. Funny that only now I have a chance to check how it works in practice. A Webapp Makeover with Spring 4 and Spring Boot. A typical Maven and Spring web application has a fair amount of XML and verbosity to it.

A Webapp Makeover with Spring 4 and Spring Boot

Add in Jersey and Spring Security and you can have hundreds of lines of XML before you even start to write your Java code. As part of a recent project, I was tasked with upgrading a webapp like this to use Spring 4 and Spring Boot. I also figured I'd try to minimize the XML. JAX–WS with Spring and Maven Tutorial. Spring framework provides remoting support for web services via JAX–WS, in fact, as stated in Spring reference documentation, there are three ways of exposing Spring POJO services as a JAX–WS web services : Exposing Servlet – based web services (suitable for Java EE 5 environments)Exporting standalone web services (suitable when utilizing Sun’s JDK 1.6 build–in JAX–WS provider)Exporting web services using the JAX–WS RI’s Spring support (similar to the standalone approach, but this time in a Servlet environment.

JAX–WS with Spring and Maven Tutorial

Suitable for non – Java EE environments such as Tomcat, embedding the JAX–WS RI as part of the web application) Selecting one of the three approaches mentioned above depends mainly on your execution environment. Having said that, we will show you how to setup and expose a simple Spring service using all of the above approaches. Introduction to Spring's Aspect Oriented Programming(AOP) Java SE 7 and JDK 7 Compatibility.

Compatibility is a complex issue.

Java SE 7 and JDK 7 Compatibility

This document discusses three types of potential incompatibilities relating to a release of the Java platform: Source: Source compatibility concerns translating Java source code into class files including whether or not code still compiles at all. Binary: Binary compatibility is defined in The Java Language Specification as preserving the ability to link without error. Behavioral: Behavioral compatibility includes the semantics of the code that is executed at runtime.

For more information, see Kinds of Compatibility, a section in the OpenJDK Developer's Guide. Feed yourself for free: the 12 'Survival Plants' Part 1. Out of the many hundred edible British foods detailed in the best 'wild plant' guides, just these 12 will provide all you truly need, and more, for a continual fresh food supply.

Feed yourself for free: the 12 'Survival Plants' Part 1

The advantage these 12 have over their 400 edible wild cousins is abundance, resilience, versatility and ease of recognition. Chapter 6. Aspect Oriented Programming with Spring. Everything we've covered so far in this chapter is pure Spring AOP.

Chapter 6. Aspect Oriented Programming with Spring

In this section, we're going to look at how you can use the AspectJ compiler/weaver instead of, or in addition to, Spring AOP if your needs go beyond the facilities offered by Spring AOP alone. 6.8.1. Using AspectJ to dependency inject domain objects with Spring. Introduction to Spring AOP. Contents Introduction. Spring: A Quick Journey Through Spring AOP. Java and Spring development.

More and more frameworks logs with the SLF4J framework.

Java and Spring development

Many applications must relate to several different logging frameworks. This tutorial shows how one logger framework can handle log messages from other logging frameworks with SLF4J as the central part. The demo application used in this tutorial logs with Log4J and have dependencies to Spring and Hibernate. Here’s the different loggers and where they are used: Log4j Bridge. Bridging legacy APIs Often, some of the components you depend on rely on a logging API other than SLF4J.

Log4j Bridge

You may also assume that these components will not switch to SLF4J in the immediate future. To deal with such circumstances, SLF4J ships with several bridging modules which redirect calls made to log4j, JCL and java.util.logging APIs to behave as if they were made to the SLF4J API instead. The figure below illustrates the idea. Please note that for source code under your control, you really should use the slf4j-migrator. Gradual migration to SLF4J from Jakarta Commons Logging (JCL) TcServer Logging with Logback & SLF4J. We Recommend These Resources Logback and SLF4J provide better logging for java applications.

tcServer Logging with Logback & SLF4J

To configure VMware vFabric tcServer to take advantage of the speed and flexibility of Logback use the following steps as a starting point. Download the tcServer Developer Edition free: This comes with Spring Insight: an awesome tool for inspecting application performance, see those expensive sql queries, etc. [#GLASSFISH-11446] JAX-WS annotation processing aborts when class fails to load - Java.net JIRA. [#HHH-2225] NPE when eager fetching joined component with native SQL query - Hibernate JIRA. JPA 2.0/glassfish. From Eclipsepedia You can run JPA 2.0 including everything in the JPA 2.0 XSD for persistence.xml in Glassfish V3 You can run JPA 2.0 - but you are limited to the JPA 1.0 XSD for persistence.xml in Glassfish V2.1 Test Conditions.

JPA 2.0/glassfish

HOW-TO: Method-level validation in Spring 3.1 with @Validated annotation. Spring MVC 3.1 Bean Validation support has been extended with @Validated annotation. The annotation is a Spring's specific variant of JSR-303's javax.validation.Valid, supporting the specification of validation groups. @Validated may be used either with Spring's @Controller method arguments or with with method-level validation.

In order to indicate that a specific class is supposed to be validated at the method level it needs to be annotated with @Validated annotation at type level: Methods applicable for validation must have JSR-303 constraint annotations on their parameters and/or on their return value: Beans annotated with @Validated annotation will be detected by MethodValidationPostProcessor and validation functionality is delegetated to Hibernate's MethodValidator that requires Hibernate Validator 4.2 or higher.

Here below, you can see how the method-level validation is configured using MethodValidationPostProcessor: Chapter 3. Writing Contract-First Web Services. Chapter 3. Writing Contract-First Web Services This tutorial shows you how to write contract-first Web services, that is, developing web services that start with the XML Schema/WSDL contract first followed by the Java code second. Spring-WS focuses on this development style, and this tutorial will help you get started. Note that the first part of this tutorial contains almost no Spring-WS specific information: it is mostly about XML, XSD, and WSDL.

Spring by Example. Hibernate/JPA Identity Generators. Introduction As usually it has been a long time since I have last posted in my blog, and even longer (about half a year) since the last time I wrote about Hibernate but finally I have fond the tome for that. This post is about Hibernate standard compatible (TABLE, SEQUENCE, IDENTITY, and AUTO) identity generators: it explains what the identity generators are and illustrated the different considerations need to be taken when choosing identity generation strategy. Environment Hibernate - 3.5.6-FinalPostgreSQL - 8.4 What are Surrogate Keys and Identity Generators? Each persistent entity must have a primary key by which it can be identified in the database.

Hibernate JPA Setup and configuration. When Persistence.createEntityManagerFactory() is called, the persistence implementation will search your classpath for any META-INF/persistence.xml files using the ClassLoader.getResource("META-INF/persistence.xml") method. Actually the Persistence class will look at all the Persistence Providers available in the classpath and ask each of them if they are responsible for the creation of the entity manager factory manager1. Each provider, from this list of resources, it will try to find an entity manager that matches the name you specify in the command line with what is specified in the persistence.xml file (of course the provider element must match the current persistent provider). Batoo JPA. JPA patterns: Saving (detached) entities. We kicked off our hunt for JPA implementation patterns with the Data Access Object pattern and continued with the discussion of how to manage bidirectional associations.

This week we touch upon a subject that may seem trivial at first: how to save an entity. Merge versus SaveOrUpdate: Understanding the NonUniqueObjectException in Hibernate. We all have those problems that we encounter just infrequently enough that when we see them again, we know we’ve solved this, but can’t remember how. Ippclient. Cups4J - Java printing library for CUPS/IPP. Internet Printing Protocol (IPP) Registrations. KYOCERA Document Solutions - laserprinter, printer, copier, multifunctionals. iReport Guide: preventing blank pages. The Basics. Click File à New Document (or Ctrl+N). You will get the following window. Bug 203124 – copylibs doesn't support the "rebase" attribute.

A Perch in the Spanish Pyrenees. Older A Perch in the Spanish Pyrenees by Amara Holstein Issue 5 · Inspired by Iberia · February 2, 2012 Newer. Aging of Eyes Is Blamed in Circadian Rhythm Disturbances. The Audition. Java - MyBatis mapper injected directly into service class. What about exceptions. Be Recursive. Easy and beautiful documentation with Sphinx. Introduction Sphinx is a tool allowing developers to write documentation in plain text for easy output generation in formats meeting varying needs. This becomes helpful when using a Version Control System to track changes. Email upload Picasa Web Albums. There are several ways to upload photos to Picasa Web Albums - different options built to cater to the various ways in which people get photos online: the Picasa software, within Picasa Web Albums, an iPhoto plugin for Picasa, via your Android mobile phone, or using email upload.

Dojo HTML5 Data-Attribute Support. Load external JavaScript libraries on demand with Dojo 1.5. Alex014/bootstrap.validate. Edit this Fiddle. TwitterBootstrapjQueryValidate/Content/Scripts/jquery.validate.bootstrap.js at master · theonlylawislove/TwitterBootstrapjQueryValidate. Html - Bootstrap typeahead ajax result format - Example. Theonlylawislove/TwitterBootstrapjQueryValidate. TUBE+ Watch full length TV Shows and Movies online for free. iStopOver. Airbnb. Handlers_introduction.html — Java.net. A little bit about Handlers in JAX-WS by Rama Pulavarthi Handlers are message interceptors that can be easily plugged in to the JAX-WS runtime to do additional processing of the inbound and outbound messages.

LogicalLoggingHandler.java — Java.net. SOAPLoggingHandler.java — Java.net. Extend your Web Service applications with the new efficient Handlers in JAX-WS RI. Adding JAX-WS handlers to web services and SOAP clients. MediaWiki. Manual:Preventing access. LDAP Authentication. Integrating MediaWiki with LDAP. Enable LDAP Windows Active Directory Authentication with MediaWiki. Help:Installing HaloACL 1.5. Trail: Learning the Java Language (The Java™ Tutorials) Core J2EE Patterns - Data Access Object. HttpComponents Connection management.

PKIX path building failed: SunCertPathBuilderException: unable to find valid certification path to requested target. Microdata. Simple Email Service (Amazon SES) How to Locate Your Unprotected Android Device. Scalable Vector Graphics in HTML5. Out of memory reading images. Jasper Report- JRException: Image read failed (Open Source Projects forum at JavaRanch)

TOra [About] JDBC Drivers release 11.1.0.7.0 - Production README. Index Tuning Wizard for Microsoft SQL Server 7.0. Request Processing (Sun GlassFish Enterprise Server 2.1 Performance Tuning Guide) Configure Log4J for use in GlassFish 3.1 (Naman Mehta) GlassFish Tuning - HTTP Thread Pool. Tuning. Build Your Own SaaS using Docker. Docker - the Linux container runtime. HotSpot GC Thread CPU footprint on Linux. Linux Increase The Maximum Number Of Open Files / File Descriptors (FD) Vmstat. GlassFish Tuning - HTTP Connection Queue & Keep Alive. Understanding Caching in Hibernate – Part Three : The Second Level Cache about. Eliminating Web Development Waste - Nefarious Designs. Prevent DOS with iptables. (D)DoS Deflate - deflate.medialayer.com. Jonathan Zdziarski's Domain.

Limiting brute-force attacks with IPTables. OAuth for Spring Security - Tutorial. HDIV (HTTP Data Integrity Validator) Linux System Administration: iptables hashlimit. True Crime Finance Stories.