This is again a small JMS configuration stuff we have to do in JBoss 5. There is considerable difference in doing it in JBoss 5 compared to JBoss 4 and don’t expect our old configuration to work well with JBoss 5 without any change. In JBoss 5 they are using JBoss Messaging in place of JBoss MQ. You can read a detailed post on migrating from JBoss 4 to JBoss 5 here.
Upgrading JBoss 4 to JBoss 5 with Java 5 to Java 6
The information presented here comes from an effort to upgrade a Java enterprise application to the most current versions of all of its parts; primarily to get onto Java 6. Its starting system specifications were the following:
We have used Spring Roo in a web project and show how we generated an early prototype and transistioned to early development and then to production code.
Coderetreat is a day-long, intensive practice event, focusing on the fundamentals of software development and design. By providing developers the opportunity to take part in focused practice, away from the pressures of 'getting things done', the coderetreat format has proven itself to be a highly effective means of skill improvement. Practicing the basic principles of modular and object-oriented design, developers can improve their ability to write code that minimizes the cost of change over time.
Setting up Gitorious on your own server
Gitorious is an open source Rails application for managing your projects: Git repositories, wikis, timeline and more. Not identical to, but not completely unlike GitHub. Being open source means you can set up your own Gitorious, even in private mode and host all your company's projects. In this article I'll show you how to get it running.
This document does not claim to be complete, nor does it claim to be exact. The reason I wrote this document is because I got stuck with setting up SAProuter on a DMZ, with a couple of firewalls. So I collected as much information as I could find and crafted this document so I would have a reference.
Working with some other people on the issue(s) it appeared that I was not the only one wandering in the dark, so I decided to release the document to the world for everybody to shoot at. So shoot, and help to make this document better and more complete.
This document is based on tests done with SAProuter running on Debian GNU/Linux and two Debian GNU/Linux firewalls.
When using JUnit in Spring there are several features added that many developers are not aware of.
First, if you are including the Spring Context in your tests, it becomes an Integration Test, no longer a Unit Test.
SFTP-Client mit Java implementieren
August 28th, 2007 in Code-Schnipsel | 2 Kommentare »
Wer innerhalb eines Projektes vor die Aufgabe gestellt wird, eine FTP-Verbindung über den SSH-Port (SFTP) aufzubauen steht schnell vor dem Problem, dass Java von Haus aus hierfür keine geeignete Library zur Verfügung stellt. Da ich selbst beim Suchen nach der geeigneten Lösung einen gewissen Moment in Google, auf diversen Seiten und Foren und im Quellcode von diversen Libs verbrachte, möchte ich hier die von mir präferierte Lösung vorstellen.
We are building a community-written O'Reilly Cookbook about how to build great Android applications. It will be full of how-to information along with code snippets that illustrate the ideas presented. It will be complete, featuring both how-to's that overlap with the official documentation, and material that goes beyond this to be more tutorial, more in-depth, or explaining "lessons from the trenches": what actually works to get the application functioning well. Unlike most books written by one, two or a few individuals, this will have input from hundreds of contributors, who will be able to view and comment on each others' recipes before the book is printed. And after the book is printed, this site will continue to exist - with a larger collection of recipes than will fit in the printed book - and serve as an Android developer resource site long after.
We welcome contributions from anybody who has something useful to say about how to make usable and successful Android applications. There are several ways of contributing: experienced Android developers can write recipes; newer ones can suggest recipes that they'd like to see; anybody can read and comment on recipes; anybody can vote for existing recipes (voting indicates that you like the recipe and/or think it should be included in the printed edition of the book). All we ask of contributors is the following:
The Android Build Cookbook offers code snippets to help you quickly implement some common build tasks. For additional instruction, please see the other build documents in this section.
EJBs in Scala schreiben
Was spricht eigentlich dagegen, eine EJB in Scala zu implementieren? Um diese Frage zu beantworten, habe ich ein Demo-Projekt aufgesetzt, in dem ich zwei EJBs in Scala implementiere.
1.1. Docbook and maven
I was looking for a maven plugin that produces documentation with syntax highlighting from docbook .
1.2. For the impatient
This article has been written in docbook , and generated via maven with the docbkx maven plugin .
You can check it out
*
as multi pages html
*
as a single html page
*
in PDF
You can download a ready-to-build maven project here http://www.springfuse.com/blog/docbook/docbook-1.0.0-src.zip . It is ready to be customized for your needs.
projects
* run your own development projects
* find interesting projects and suitable co-developers
* benefit from state-of-the-art development tools
people
* connect with coders from
around the world
* share your ideas with
like-minded bettercoders
* get help and provide support
to solve problems
you!
* become an even better coder by collaborating with others
* contribute and get recognition for your work
* have lots of fun and fascinating experiences
WSRP is an open standard proposed by OASIS for several years. The spec now is sponsored by a number of
big names like IBM and BEA. There are currently two active implementation of the spec. One is wsrp4j from
Apache foundation (still a incubator project, been developed since 2002). The other one is a subproject of
dev.java.net Open-Portal.
I have been exposed and done lot of development on the Apache's wsrp4j project. Thus, in this guide I will
mainly discuss wsrp4j implementation.
At this point, wsrp4j project is still under heavy development and re-construction. It is almost impossible
to get the trunk snapshot in the project repository and make it work without pulling all your hair out to figure
out how to set it up properly. This mostly caused by the lack of documentation and support from its developers.
Still, there is a stable (enough) revision which we can use to make a perfect wsrp4j environment.
The wsrp4j revison I use here is 440430 along with pluto portal 1.0.1 release for setting up a producer.
Jetspeed 2.1 (latest version currently) will be used as a container for wsrp4j consumer (wsrp4j-proxyportlet).
Of course, you can use pluto to setup wsrp4j consumer as well. But that is very easy to do.
Plus, pluto portal doesn't provide a lot of bell and whistle in the GUI side as Jetspeed portal does.
The first part of the visual git tutorial explains how to locally track project files with the git version control system. It shows how to add and commit changes, how to browse the history, revert changes and how to work with tags and branches.
This article show you how you can fix bugs for maven-plugins (eclipse setup for hacking the code, debugging etc.) with a concrete project: maven-eclipse-plugin. Lets start …
I have been playing with flex for a couple of weeks now,and i am trying to use flex as the UI and keeping the backend in Java with as usal Spring,Hibernate stack.
So in this series i will create a getting started project(CRUD contact management) using Spring,Hibernate/MySQL,Cairngorm as the UI MVC framework,GraniteDS for remoting and Tomcat as the server . For now i will create an eclipse based project and later move that to maven. The base intention of this project is to setup a prototype with all the above technologies defined and explore all the aspects of GraniteDS features to serve as the POC for other developers if they are willing to try it.
Sie wollen die Programmiersprache Java lernen? Dann sind Sie hier genau richtig! Im Java Blog Buch werden nach und nach mehr oder weniger aufeinander aufbauende Lektionen veröffentlicht, so dass am Ende eine Art Buch zur Java Programmierung entsteht. Navigieren Sie sich einfach durch das Kapitelverzeichnis auf der linken Seite oder durchstöbern Sie das Inhaltsverzeichnis!
Gerne dürfen Sie auch interessante Themen vorschlagen, über welche wir dann ggf. bloggen werden.
Aber jetzt wünsche ich Ihnen viel Spaß beim Java lernen!
Ps.: Sollten Sie sich dazu berufen fühlen, einen Beitrag zu diesem Werk zu leisten oder gleich als Autor einzusteigen, so nehmen Sie doch einfach Kontakt zu uns auf.
Jersey 1.0 is an open-source, production-ready reference implementation of JAX-RS, the Java API for RESTful Web Services (JSR-311). Jersey makes it easy to create RESTful web services in Java.
In an earlier Tech Tip, Implementing RESTful Web Services in Java, Paul Sandoz and I introduced RESTful Web Services, JAX-RS, and Jersey, and showed how to write RESTful web services in Java that conform to the JAX-RS specification. In this tip you will learn how to configure data in JSON (JavaScript Object Notation) using Jersey 1.0. JSON is a lightweight data-interchange format that is based on the object notation of the JavaScript language. Because of it's simple text format, JSON provides a good alternative to other data interchange formats such as XML and is particularly attractive as a data interchange format for RESTful web services.
In this tip you will build a Jersey-based web application that provides information about printer status. The application returns the information in JSON format. To build the application, you will use the Maven 2 software project management tool. For more information about Maven, see Welcome to Maven and Building Web Applications with Maven 2.
Hibernate Annotations is my preferred way to map my entity classes, since they don't require any external file (thus keeping mapping info in your Java files), is fully integrated with all Hibernate mapping capabilities and Hibernate documentation encourages us to use this kind of configuration because it's more efficient.
Annotation driven mapping in Hibernate uses the standard JPA API annotations and introduce some specific extensions to deal with some Hibernate features. You can find a full reference in the official documentation.
Post in the Spring Forum:
"
The following is a solution to the circular dependency issue. It's especially useful when you have 3 or more services locked in a circular dependency. The solution involves breaking the circular dependency and instead using a custom injector to inject the dependency. This is achieved by using a BeanPostProcessor and some custom Annotations.
"
Spring, JPA, and JTA with Hibernate and JOTM
2007-04-24 20:35
have been struggling for a couple of hours today to modify a Spring JPA configuration with a single datasource, Hibernate as the JPA provider and the JpaTransactionManager to a configuration with two XA datasources, Hibernate as the JPA provider, and the JtaTransactionManager with JOTM as the standalone JTA provider.
since the Spring and Hibernate reference manual and Javadoc documentation merely contain a number of hints on how to configure JPA with a JTA transaction manager and others are struggling as well i decided to post how i finally got it to work.
With the addition of generics in Java 5, writing a custom DAO for each domain object is no longer required. There are a wide variety of articles on creating generic DAOs, but my current project uses the approach from this IBM DeveloperWorks article. This approach was choses mainly because of the clearly written article and the integration with Spring. You should be able to extend any generic DAO based on Spring to implement the stored procedure configuration.
Thought I've bookmarked this a long time ago... "With the adoption of Java™ 5 generics, the idea of a generic typesafe Data Access Object (DAO) implementation has become feasible. In this article, system architect Per Mellqvist presents a generic DAO implementation class based on Hibernate. He then shows you how to use Spring AOP introductions to add a typesafe interface to the class for query execution."
Exception Handling with Spring and Log4J
How to log exceptions. This technique will log messages to your server log file, send an email, with the tag stack of the error, for error level warnings and display a generic page to the user.
First step is to set up Log4j.
Make sure you have the following classes in application lib or common server lib.
activation.jar
This can be got from http://java.sun.com/products/javabeans/jaf/downloads/index.html
Set up your log4J configuration file, put this file in your WEB-INF directory
Problem:
Easily integrating your Linux host into a Windows environment ...
Solution:
This solution allows one to very easily navigate any number of windows/samba servers and shares with any file management application (and from the shell).
# 2840 Spring Portfolio resources classified in several categories...
# Over 400 unique visitors per day to SpringHub.com...
# Thanks to all subscribers to SpringHub.com from all over the world...
The traditional way to integrate JSF and Spring was to define JSF beans in faces-config as managed beans and refer to the spring beans using the managed-property configuration. With the help of the spring’s delegatingvariableresolver the managed property is resolved from spring application context and JSF’s IOC injects the bean to the JSF Managed bean instance. I’ve written an article it about this way before.First approach is modelled as follows
JSF-Spring-JPA is the popular stack of choice these days, mostly to be used in my consulting and training purposes I’ve created a base project called MovieStore demonstrating the annotation-driven integration of JSF-Spring-JPA. JSF backing beans, spring service level beans and DAO’s are configured and integrated with annotations. Only the core infrastructure like datasource, entityManagerFactory or transactionManager are configured with xml.
Get the @Configurable stuff working within Eclipse...
"Some weeks ago I wrote a custom JSP tag for a Spring project I am currently working on. Inside the tag I wanted to use a Spring bean. Soon I realized that this case had to be handled a bit different because the tag is instantiated by the application server and not from the Spring context. Therefore the simple standard injection mechanism did not work."
This page will try to explain one particular process that can be used to version your projects, as a developer. While the process covered here will use one example of how to accomplish effective versioning, the concepts can be used anywhere.
Subversion’s hook scripts provide a powerful and flexible way to associate actions with repository events. For example, the pre-commit hook allows you to check — and possibly abort — a transaction before it actually gets committed. This entry describes how to install and test a simple Python hook script to prohibit tabs from C++ files.
Having a digital ISDN telephone connection lets you easily integrate Fax and Answering Machine functionality into your Linux server. SuSE (and Debian) distribute a package called Capisuite for this purpose. You will also need a supported ISDN card (an AVM Fritz card is inexpensive and works).
This article presents with an solution on how to page through large amountsofdata effectively without taking down your database and without keeping it all in memory.
When system performance on Linux is affected by using too many file descriptors, usually an error can be seen in the log file '(Too many open files)'. Although this affects the entire system, it is a fairly common problem.
The big issue is the Linux connectivity which became worse an worse over the time as Linux distribution getting more and more complicated. As matter of fact I did not find one instruction in the Internet on how to connect it to Linux via a cradle. Here is How!
Need portable documents that, unlike most XML documents, include representation information? This article introduces XSL-FO (XML Stylesheet Language-Formatting Objects) and explains how it can come to the rescue. To demonstrate the advantage of using XSL-FO, the article includes an example implementation of a database reporting system that uses Java and XML code.
The topic of technical publishing is relatively new to the world of Eclipse. One can make the argument that technical publishing is just another collaborative development process involving several people with different backgrounds and skills. This article will show that the Eclipse platform is a viable platform for technical publishing by discussing how to write documents such as an article or a book within Eclipse. In fact, this article was written using Eclipse.
This mini-HowTo assumes that you’re running Debian Unstable (Sid), but it should also work if you’re using Testing or even Ubuntu. It also assumes you’re doing all these steps as root.
Quite an old article on JavaWorld: "As part of the Java language, the java.lang package is implicitly imported into every Java program. This package's pitfalls surface often, affecting most programmers. This month, I'll discuss the traps lurking in the Runtime.exec() method."
In this article, after a quick introduction to Wicket, you will learn to obtain and set up the requisite software for Wicket-based web development. Then you will learn to develop interactive web pages using Wicket. Along the way, you will be introduced to some key Wicket concepts.
Few things are more frustrating than trying to delete a file only to discover your system says it's locked or in use when you know it shouldn't be. The annoying error messages come in several flavors.
Die wohl beste Kalender-Extension ist Calendar Base (cal) von Mario Matzulla. Sie bietet alles, was man für die Darstellung eines Kalenders und den Terminen benötigt, und darüber hinaus noch viele Extras.
Welcome to the MyEclipse Introduction to Spring tutorial. In this tutorial we are going to cover some of the basic features of the Spring framework, such as dependency injection, and demonstrate using MyEclipse to assist you while developing Spring applications.
If you are having a problem with some code and seeking help, preparing a Short, Self Contained, Correct Example (SSCCE) is very useful. But what is an SSCCE?
The Mozilla Thunderbird email client can be and do almost anything you want it to be and do. Find out how to do amazing things every day and everyday things with amazing efficiency with these Mozilla Thunderbird tips, tricks and tutorials.
This is a howto on setting up a nice spam-virus fighting mailserver. It’s based on a singlebox install but spreading out the components, isn’t that difficult. I’ve tried building it so it could scale and still be easy to manage, with a lot of good webinterfaces. I think I have accomplished that - hope you can agree
This Guide will introduce you to using Oracle for several basic tasks, as well as how to configure the Oracle environment and use special features of its user interface. This guide is divided into the following sections:
The goal of this site is to provide examples and articles that simplify the learning process of various information technologies. -- Very good beginning resource
This blog's entry made my day: Upgrading my old Berkeley DB svn rep from 4.2 to 4.3 without any hassles. Worked as described (I used the --with-apr option).
PortForward.com is proud to offer help setting up port forwarding on your router or firewall. Many Internet users are not aware of how to configure their router or firewall in order to use applications like Peer-to-Peer file sharing (PtoP), Internet Games