background preloader

Tech

Facebook Twitter

Teaching Open Source. Resources - What is the single most influential book every programmer should read. Hibernate Annotations. First, set up your classpath (after you have created a new project in your favorite IDE): Alternatively, import your pom.xml in your favorite IDE and let the dependencies be resolved automatically, We recommend you use Hibernate Validator and the Bean Validation specification capabilities as its integration with Java Persistence 2 has been standardized. Download Hibernate Validator 4 or above from the Hibernate website and add hibernate-validator.jar and validation-api.jar in your classpath. Alternatively add the following dependency in your pom.xml. <project> ... If you wish to use Hibernate Search, download it from the Hibernate website and add hibernate-search.jar and its dependencies in your classpath.

<project> ... We recommend you use the JPA 2 APIs to bootstrap Hibernate (see the Hibernate EntityManager documentation for more information). If you boot Hibernate yourself, make sure to use the AnnotationConfiguration class instead of the Configuration class. Note. Hibernate Annotations. First, set up your classpath (after you have created a new project in your favorite IDE): Alternatively, import your pom.xml in your favorite IDE and let the dependencies be resolved automatically, We recommend you use Hibernate Validator and the Bean Validation specification capabilities as its integration with Java Persistence 2 has been standardized.

Download Hibernate Validator 4 or above from the Hibernate website and add hibernate-validator.jar and validation-api.jar in your classpath. Alternatively add the following dependency in your pom.xml. <project> ... If you wish to use Hibernate Search, download it from the Hibernate website and add hibernate-search.jar and its dependencies in your classpath. <project> ... We recommend you use the JPA 2 APIs to bootstrap Hibernate (see the Hibernate EntityManager documentation for more information). If you boot Hibernate yourself, make sure to use the AnnotationConfiguration class instead of the Configuration class. Note. Develop your own epub editor. The previous posts in this series explored the structure of epub books and demonstrated how the epub standards work together to describe and package content documents. If you found those articles highly technical you might want to look away now - this post is the first of a series that shows how to create your own web-based, wysisyg editor that you can use to create epub documents.

The programming strand of Inside Epub starts here. This post is an introduction to the subject and gives an idea of the development environment, the software tools, and the documentation that will be available as the project unfolds. There are still topics to cover in the previous strand, like embedding XML islands in your content and handling fallback from non-standard to standard document types - and I will cover those in future. Objectives - mine and yours The aim of the programming strand of this blog is to create a web-based, wysiwyg epub editor. Figure 1. Web-based, wysiwyg epub editor. HIBERNATE TUTORIAL - Features of Hibernate. PatternLayout (Apache Log4j 1.2.17 API) Java.lang.Object org.apache.log4j.Layout org.apache.log4j.PatternLayout All Implemented Interfaces: OptionHandler public class PatternLayoutextends Layout A flexible layout configurable with pattern string.

The goal of this class is to format a LoggingEvent and return the results as a String. The conversion pattern is closely related to the conversion pattern of the printf function in C. You are free to insert any literal text within the conversion pattern. Each conversion specifier starts with a percent sign (%) and is followed by optional format modifiers and a conversion character. Let the conversion pattern be "%-5p [%t]: %m%n" and assume that the log4j environment was set to use a PatternLayout. Category root = Category.getRoot(); root.debug("Message 1"); root.warn("Message 2"); would yield the output DEBUG [main]: Message 1 WARN [main]: Message 2 Note that there is no explicit separator between text and conversion specifiers.

By default the relevant information is output as is. Since: Log4j Tutorial : Adding Log4j logger to your project. Log4j Tutorial : How to send the log messages to a File using Appender. About Java.net. Java.net is a large community of Java developers and their projects. We welcome anyone interested in Java, related JVM technologies, and education to our discussions and projects. Communities and Projects We manage our projects in a different way from most forges in that we try to maintain curated communities of projects - that is projects that use similar technologies or of similar types are grouped together in an area to make it easier to find other developers with similar interests and skills and their projects.

You can find descriptions of our communities here and a description of our project workflow here. Editorial Content, Blogs, Forums We're committed to bringing you the latest and broadest coverage of Java topics on our home page - from technical articles, to news on events, to blogs. Future Enhancements We are committed to making the site the best it can possibly be. Creating a Project Got Questions? 255527 reads. Linux installers for linux gamers. Code. Spring Annotations Tutorial. In the previous tutorials, we learned how we can inject the dependencies from xml files. Spring also provides a mechanism where it can automatically handle the injection of properties and referred objects without defining them in xml files. This is accomplished by using Spring Annotations. Some of the important annotations that can come handy while working are: @Autowired @Resource @PostConstruct @PreDestroy @Qualifier @Required @Bean @Component @Service @Repository Let us take an example of a class "Bar", which requires a reference of "Foo" class.

Following is the class definition of Bar and Foo classes Bar.java package annotation;public class Bar { private Foo foo; private Foo foo2; public void setFoo(Foo foo) { this.foo = foo; } public void printFooName(){ System.out.println(foo.getName()); System.out.println(foo2.getName()); }} Foo.java package annotation;public class Foo {private String name;public void setName(String name) { this.name = name;}public String getName() { return name;}}

Tomcat

Slack Links to The Slack World. This collection of links is in no way comprehensive (i.e., it's slack :-)) but is provided in the hope that it may be useful for those new to Slackware. Many of the sites given below maintain their own lists of links to resources related to Slackware and Linux in general. The links are grouped according to their subject but aren't sorted anyhow but in alphabetical order when this makes sense. The origin of the slack world: Slackware Linux Slackware mirrors: Get Slack: official list of Slackware mirrors Slackware docs: Slackware Documentation Project The Revised Slackware Book Project, maintained by Alan Hicks Slackware Linux Basics – a book by Daniël de Kok, available in English, Spanish, French, Portuguese, and Indonesian!

Additional packages and build scripts and related stuff: Applications specifically written or configured for Slackware: Articles devoted to managing and configuring Slackware: Slackware newsgroup, forums, and mailing list: Slackware blogs: Development environment setup for Eclipse, Maven, Spring 3, Struts 2, Hibernate and Jetty | Open Source Technical Blog.

Introduction When developing web application set up of convenient development environment might be crucial for more efficient work. Let’s consider web application that uses following frameworks: In addition we want to use Eclipse as our editor. This tutorial presents initial setting of Eclipse project to support all the frameworks mentioned above and allow the convenient and fast application development of web application on Jetty server. [ad#adsense] Create Eclipse project First step is to create Ecplise project, e.g., Dynamic Web Project, that would have the following structure: Make sure that ‘src/main/java’ and ‘test/main/java’ are your source folders on building path and default output folder is ‘target/classes’. Complete Eclipse project can be downloaded here: Spring Security Project. Configure Maven Maven configuration is in ‘pom.xml’ file.

List of ‘repositories’list of ‘pluginRepositories’list of ‘dependencies’‘build’ settings, i.e., ‘resources’ and ‘plugins’list of ‘plugins’ pom.xml <? <? Inversion of Control Containers and the Dependency Injection pattern. In the Java community there's been a rush of lightweight containers that help to assemble components from different projects into a cohesive application. Underlying these containers is a common pattern to how they perform the wiring, a concept they refer under the very generic name of "Inversion of Control". In this article I dig into how this pattern works, under the more specific name of "Dependency Injection", and contrast it with the Service Locator alternative.

The choice between them is less important than the principle of separating configuration from use. One of the entertaining things about the enterprise Java world is the huge amount of activity in building alternatives to the mainstream J2EE technologies, much of it happening in open source. A lot of this is a reaction to the heavyweight complexity in the mainstream J2EE world, but much of it is also exploring alternatives and coming up with creative ideas.

Components and Services A Naive Example class MovieLister... Do I really need a Singleton? Replicant project. Multilib Slackware for x86_64 - Alien's Wiki. Adding Multilib Capability to Slackware on x86_64 Architecture This article contains instructions on how to create a true multilib Slackware64. A multilib 64bit Linux system is capable of running 64bit as well as 32bit software. The Filesystem Hierarchy Standard documents the optimal method to achieve a clean separation between 64bit and 32bit software on a single system. When starting with the development of “Slackware64” (the official port to the x86_64 architecture) we chose to adopt this standard. Therefore Slackware64 has been configured to look for 64bit libraries in /lib64 and /usr/lib64 directories. This is why I call Slackware64 “multilib-ready” - even though 32bit libraries will be looked for in /lib and /usr/lib, Slackware64 does not ship with any 32bit software.

This is accomplished as follows: Slackware for the x86_64 architecture (or ”Slackware64” for short) is a pure 64-bit Operating System, but easily upgradable to multilib. Advantage of a multilib system Slackware64 13.0. Firefox OS — mozilla.org.