
Herramientas imprescindibles para un desarrollador de Java Voy a hablar de las herramientas que considero imprescindibles para un desarrollador Java, en concreto para desarrollo J2EE. Puede que alguna se pueda obviar, como por ejemplo, Maven, pero la verdad es que yo no puedo vivir sin él. No incluyo en la lista la maquina virtual, es obvio que sin eso no puedes hacer nada: Lo primero es un IDE. Estas son las herramientas que yo considero imprescindibles, aunque puede haber más, dependiendo el proyecto en el que este trabajando. EJB 2 Message-Driven Beans EJB 2 Message-Driven Beans Pages: 1, 2, 3 Our Example Our email application will be modeled using the PTP domain. JMS Messages The item that is put on the queue is a JMS Message. We will use a MapMessage in our example, as it is one way that we can place email header information and the email body, into the message. EJB 2.0: Message Driven Bean Now we have talked about the fundamentals of JMS, we can talk about the new component type that is in the EJB 2.0 specification. Let's review the design so far. We have talked about JMS, and Message Driven Beans; now it's time to build our example. Email Application Steps We will walk through the following steps to get the email application working. Setup an "Email Queue" message queue in the JMS serverWrite an email client, responsible for sending a java message to the email queueWrite a message driven bean that consumes these messages, and sends emails using their contentsWrite the deployment descriptors for the MDBPackage the code That's it.
Actualite informatique, actualite des entreprises, information economique Java Tips, Hacks, Updates - Architect's Diary Strings in switch statements In the JDK 7 release, you can use a String object in the expression of a switch statement: public String getTypeOfDayWithSwitchStatement(String dayOfWeekArg) { String typeOfDay; switch (dayOfWeekArg) { case "Monday": typeOfDay = "Start of work week"; break; case "Tuesday": case "Wednesday": case "Thursday": typeOfDay = "Midweek"; case "Friday": typeOfDay = "End of work week"; case "Saturday": case "Sunday": typeOfDay = "Weekend"; default: throw new IllegalArgumentException("Invalid day of the week: " + dayOfWeekArg); return typeOfDay; The diamond operator "<>" You can replace the type arguments required to invoke the constructor of a generic class with an empty set of type parameters (<>) as long as the compiler can infer the type arguments from the context. For example, consider the following variable declaration: Map<String, List<String>> myMap = new HashMap<String, List<String>>(); Map<String, List<String>> myMap = new HashMap<>(); List<String> list = new ArrayList<>(); List<?
Object persistence and Java - Java World Object durability, or persistence, is the term you often hear used in conjunction with the issue of storing objects in databases. Persistence is expected to operate with transactional integrity, and as such it is subject to strict conditions. (See the Resources section of this article for more information on transaction processing.) In contrast, language services offered through standard language libraries and packages are often free from transactional constraints. As we'll see in this article, evidence suggests that simple Java persistence will likely stem from the language itself, while sophisticated database functionality will be offered by database vendors. No object is an island In the real world, you rarely find an object that lacks relations to other objects. The relational approach to data storage tends to aggregate data by type. To query or to navigate? setOfGoodCustomers = setOfAccounts.query(account.inGoodStanding()); Persistence and type Canonicalization and language independence
Dr. Dobb's | Good stuff for serious developers: Programming Tools, Code, C++, Java, HTML5, Cloud, Mobile, Testing Examples <html><body><h1>renderSnake it</h1></body></html> Full Source By writing the Javascript source using write. The second parameter (here false) means no HTML escape needed. Or using a StringResource for getting (and caching) the Javascript source from a resource file. Capture a recurring HTML snippet into a component in which you define the defaults. Now you can use this component for rendering on a canvas. And the following HTML is produced. This component implements Renderable for displaying the Form, FormValidator to validate incoming data and FormHandler to process the validated data. Full Source Place static content in resource files which can be loaded and cached by StringResource. Full source of this page
Developer Center : The Flex, Spring, and BlazeDS full stack ... The most challenging part of the project is setting up the Maven build. This project could have been built with Ant, but I don't particularly enjoy writing Ant scripts. As for using an IDE to build projects, depending on a particular development environment is usually not a good idea because any serious project needs some degree of testing and continuous integration. Even though Maven is not perfect, I still see it as the best solution. As for JBoss, it's not a requirement at all—it just happens to be what I'm using. If you prefer, you could use a simple Tomcat setup instead. To see the finished version of this sample project, view the demo. Creating a root Maven project The first thing we have to address when creating a Flex/BlazeDS project with Maven is to determine the right location for configuration files. With that out of the way, let's get started. First, let's create the root todolist module.
Pruebas funcionales de servicios web con soapUI Fecha de publicación del tutorial: 2009-12-28 Indice Introducción Las pruebas unitarias en cualquier paradigma de programación son, más que una buena práctica, una garantía para obtener un software robusto y (más) fácilmente mantenible. Como responsables de diseño o desarrollo de web services hemos de aplicar estas buenas prácticas, y soapUI es una herramienta fenomenal para ello, como veremos a continuación. A propósito de lo anterior, Leo Antolí (evangelizador de las metodologías ágiles y experto en Autentia) nos recomendó el podcast #64 de javaHispano sobre Test de Aplicaciones. Prerrequisitos Este tutorial se ha desarrollado bajo el siguiente entorno: soapUI 3.0.1. Crear el proyecto en soapUI Una vez tenemos el web service publicado, accedemos a soapUI y desde el menú File | New soapUI Project, creamos un proyecto para el tutorial con los datos: Nombre: Pruebas Funcionales WSDL: Nuevo proyecto soapUI OK al diálogo siguiente: Aceptamos el nombres propuesto
Play framework - Home