Red Hat Benelux Workshop

 

Red Hat JBoss Middleware Hands-On Labs, join us for a free hands-on lab at one of our Benelux locations


Have you ever wondered how to get started with the Red Hat JBoss Middleware products? Are you unsure where to begin?
You like to receive information, but would prefer to work with the products on the spot?
Join us for one of our free JBoss Hands on Labs, (formerly known as Red Hat in-house Hackathons).
The next one will be on Jboss Fuse @ Arrow – http://www.arrowecs.be
on Thursday June 04 2015 from 17:00
Woluwedal 30, Sint-Stevens-Woluwe, Brussels- 3rd floor

fuseserviceworks_workshop

 

/!\ Do not forget to register at the following URL :

http://www.redhatonline.com/benelux/workshops.php

Kind Regards

Frederic

JEE App. Go To The Cloud

 

 

 

 

 

 

Enterprises are under pressure to deliver new applications fast; however, many factors, including rigid proprietary stacks, inflexible licensing agreements, and cultural silos in IT can prevent enterprises from achieving the agility they need to stay competitive. Enterprises are increasingly implementing DevOps methodologies, and technologies that complement them, to break down siloed communications between development and operations teams and accelerate application development and delivery. As DevOps adoption increases, so does the demand for technologies that complement DevOps methodologies and enable high productivity of developers and operations teams working closely together.

“Although DevOps emphasizes people (and culture) over tools and processes, implementation utilizes technology. As a result, Gartner, Inc. expects strong growth opportunities for DevOps toolsets, with the total for DevOps tools reaching $2.3 billion in 2015, up 21.1 percent from $1.9 billion in 2014. By 2016, DevOps will evolve from a niche strategy employed by large cloud providers to a mainstream strategy employed by 25 percent of Global 2000 organizations.”1

Red Hat is committed to helping enterprises get more out of their technology by allowing for greater freedom of choice. JBoss EAP supports a broad range of third-party frameworks, operating systems, databases, security, and identity systems to make integration into existing infrastructure easier. In addition, new subscription flexibility expands support for customers deploying JBoss EAP across multiple environments based on their individual needs and business requirements, including on-premise, in a Platform-as-a-Service (PaaS) environment, or in hybrid cloud scenarios.

Additional enhancements introduced in JBoss EAP 6.4 include:

  • Support for Java 8 applications, as well as for the Java API WebSockets implementation protocol, JSR 356, enabling developers to build real-time, rich client and mobile applications with reduced overhead and complexity.
  • Expanded JBoss EAP console and Red Hat Customer Portal integration, giving users direct access to the Red Hat Customer Portal, including the ability to receive support, open and manage tickets, and access the knowledge base.
  • New console functionality with an updated user interface enabling users to view log files more easily and manage security configuration for applications.
  • Kerberos authorization for greater application security.

As one of the only open source application platforms that commercially supports Java EE applications deployed in PaaS environments, JBoss EAP deployed on OpenShift provides developers with a fully certified Java EE 6 container and all the tools needed to build, run, and manage a wide range of Java applications. The combination of JBoss EAP and OpenShift Enterprise helps enterprises to optimize both development and operations by offering the ability to build enterprise-grade Java applications in a streamlined PaaS environment more quickly.

Ref :

http://www.redhat.com/en/about/press-releases/red-hat-expands-jboss-enterprise-application-platform-subscription-greater-flexibility-move-cloud

Kind Regards

Frederic

rhel_atomichost

As monolithic stacks give way to applications comprised of microservices, a container-based architecture can help enterprises to more fully realize the benefits of this more nimble, composable approach.Based on the world’s leading enterprise Linux platform, Red Hat Enterprise Linux 7 Atomic Host enables enterprises to embrace a container-based architecture, reaping the benefits of development and deployment flexibility and simplified maintenance,without sacrificing performance, stability, security, or the value of Red Hat’s vast certified ecosystem.

An application architecture based on Linux containers requires not only the tools to build and run containers, but also an underlying foundation that is secure, reliable, and enterprise-grade, with an established lifecycle designed to meet the ongoing requirements of the enterprise over the long term. These requirements include mitigation of security concerns, ongoing product enhancements, proactive diagnostics, and access to support. Red Hat is committed to offering enterprises a complete and integrated container-based infrastructure solution, combining container-based application packaging with robust, optimized infrastructure that will enable easy movement of Red Hat Enterprise Linux-certified applications across bare metal systems, virtual machines and private and public clouds – all of this with the product and security lifecycle that enterprise customers require. The release of Red Hat Enterprise Linux 7 Atomic Host delivers on Red Hat’s intent to make Linux containers a stable and reliable component of enterprise IT across the open hybrid cloud.

The Enterprise-Ready Container Host

Specifically designed to run Linux containers, Red Hat Enterprise Linux Atomic Host delivers only the operating system components required to run a containerized application, reducing overhead and simplifying maintenance. Because Red Hat Enterprise Linux 7 Atomic Host is built from Red Hat Enterprise Linux 7, it inherits Red Hat Enterprise Linux 7’s stability and maturity, as well as its vast ecosystem of certified hardware partners.

Security is always a top enterprise priority, but the security properties of containers – including the ability to maintain security across a container’s lifecycle – have raised additional questions. To address container security and lifecycle concerns, Red Hat Enterprise Linux Atomic Host offers automated security updates on-demand, bringing enterprise customers the support and lifecycle benefits that come with Red Hat Enterprise Linux in a reduced image size. From Heartbleed and Shellshock to Ghost and beyond, Red Hat customers receive security notifications and product updates as they are available and also have access to security tools that address container reliability and security. This is a benefit Red Hat uniquely brings to container deployments for enterprise customers.

For building and maintaining container infrastructure, Red Hat Enterprise Linux 7 Atomic Host provides many benefits, including:

  • Atomic updating and rollback through an image-like update mechanism. An atomic update can be downloaded and deployed in a single step, while the previous version is retained, allowing for easy atomic rollback, if necessary.

  • Container images in docker format can be deployed and run as application containers.

  • Certification and support, along with a chain of trust for containers built using platform images provided by Red Hat, such as Red Hat Enterprise Linux 6 and 7 and certified containers from Red Hat’s independent software vendor (ISV) partners.

  • Container orchestration at scale through Kubernetes, creating large-scale business applications from discrete services deployed in containers across clusters of Red Hat Enterprise Linux 7 Atomic Host.

  • Stronger security by default through SELinux, cgroups and kernel namespaces, isolating each container in a multi-container environment.

  • Support for super-privileged containers enables host management applications to access the host and other containers in a secure manner. This specialized container provides users with the means to install third party software and the atomic command inherent to Red Hat Enterprise Linux 7 Atomic Host makes creating and running super privileged containers dramatically easier.

  • Application portability across the open hybrid cloud by leveraging Red Hat’s vast certified ecosystem, enabling secure, stable container deployments on physical hardware, on certified hypervisors including Red Hat Enterprise Virtualization, VMware and Microsoft Hyper-V, and on certified public cloud services like Amazon Web Services and Google Cloud Platform.

 

Ref :

http://www.redhat.com/en/about/press-releases/red-hat-launches-red-hat-enterprise-linux-7-atomic-host-advances-linux-containers-enterprise

Kind Regards

Frederic

wildfly Camel

In one of my previous posts[1], I explain how you can install Apache Camel[2] on top of Wildfly[3].

In that small tutorial, I am not going to reinvent the wheel. I am just going to explain how you can transform/convert data stored in XML format and upload it to a database of your choice  – In this example H2[4] was the chosen default database -.

Note: H2 is not recommended to be used in production. I would rather recommend you to look at  postgresq[5], MongoDB[6], MariaDB[7], etc… instead.

This example named “camel-jpa”  is coming from the ones provided with the wildfly-camel project[8]

First of all here is the tree of that project :


[fhornain@localhost camel-jpa]$ tree
.
├── pom.xml
└── src
├── main
│   ├── java
│   │   └── org
│   │       └── wildfly
│   │           └── camel
│   │               └── examples
│   │                   └── jpa
│   │                       ├── CustomerRepository.java
│   │                       ├── JpaRouteBuilder.java
│   │                       ├── model
│   │                       │   ├── Customer.java
│   │                       │   └── package-info.java
│   │                       ├── Resources.java
│   │                       └── SimpleServlet.java
│   ├── resources
│   │   ├── META-INF
│   │   │   └── persistence.xml
│   │   └── org
│   │       └── wildfly
│   │           └── camel
│   │               └── examples
│   │                   └── jpa
│   │                       └── model
│   │                           └── jaxb.index
│   └── webapp
│       └── WEB-INF
│           ├── beans.xml
│           ├── customers.jsp
│           ├── customer.xml
│           └── jboss-web.xml
└── test
└── java
└── org
└── wildfly
└── camel
└── examples
└── jpa
└── JPAIntegrationTest.java

26 directories, 14 files

And here is the pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<!--
 #%L
 Wildfly Camel :: Example :: Camel JPA
 %%
 Copyright (C) 2013 - 2014 RedHat
 %%
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at
 
 http://www.apache.org/licenses/LICENSE-2.0
 
 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 #L%
 -->


<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
 <modelVersion>4.0.0</modelVersion>

 <parent>
 <groupId>org.wildfly.camel</groupId>
 <artifactId>wildfly-camel-example</artifactId>
 <version>2.0.0.CR1</version>
 </parent>

 <name>Wildfly Camel :: Example :: Camel JPA</name>

 <artifactId>example-camel-jpa</artifactId>
 <packaging>war</packaging>

 <dependencies>

 <!-- Provided -->
 <dependency>
 <groupId>org.apache.camel</groupId>
 <artifactId>camel-core</artifactId>
 <scope>provided</scope>
 </dependency>
 <dependency>
 <groupId>org.apache.camel</groupId>
 <artifactId>camel-cdi</artifactId>
 <scope>provided</scope>
 </dependency>
 <dependency>
 <groupId>org.apache.camel</groupId>
 <artifactId>camel-jpa</artifactId>
 <scope>provided</scope>
 </dependency>
 <dependency>
 <groupId>org.apache.camel</groupId>
 <artifactId>camel-jaxb</artifactId>
 <scope>provided</scope>
 </dependency>
 <dependency>
 <groupId>javax.enterprise</groupId>
 <artifactId>cdi-api</artifactId>
 <scope>provided</scope>
 </dependency>
 <dependency>
 <groupId>org.hibernate.javax.persistence</groupId>
 <artifactId>hibernate-jpa-2.1-api</artifactId>
 <scope>provided</scope>
 </dependency>
 <dependency>
 <groupId>org.jboss.spec.javax.servlet</groupId>
 <artifactId>jboss-servlet-api_3.1_spec</artifactId>
 <scope>provided</scope>
 </dependency>
 <dependency>
 <groupId>org.jboss.spec.javax.ejb</groupId>
 <artifactId>jboss-ejb-api_3.2_spec</artifactId>
 <scope>provided</scope>
 </dependency>
 <dependency>
 <groupId>org.jboss.spec.javax.transaction</groupId>
 <artifactId>jboss-transaction-api_1.1_spec</artifactId>
 <scope>provided</scope>
 </dependency>

 <!-- Test Scope -->
 <dependency>
 <groupId>org.wildfly.camel</groupId>
 <artifactId>example-camel-common</artifactId>
 <version>${project.version}</version>
 <scope>test</scope>
 </dependency>
 <dependency>
 <groupId>org.jboss.arquillian.junit</groupId>
 <artifactId>arquillian-junit-container</artifactId>
 <scope>test</scope>
 </dependency>
 <dependency>
 <groupId>org.wildfly</groupId>
 <artifactId>wildfly-arquillian-container-remote</artifactId>
 <scope>test</scope>
 </dependency>
 <dependency>
 <groupId>junit</groupId>
 <artifactId>junit</artifactId>
 <scope>test</scope>
 </dependency>
 <dependency>
 <groupId>org.slf4j</groupId>
 <artifactId>slf4j-simple</artifactId>
 <scope>test</scope>
 </dependency>
 </dependencies>

 <!-- Build -->
 <build>
 <plugins>
 <plugin>
 <groupId>org.wildfly.plugins</groupId>
 <artifactId>wildfly-maven-plugin</artifactId>
 <executions>
 <execution>
 <id>wildfly-deploy</id>
 <phase>integration-test</phase>
 <goals>
 <goal>deploy</goal>
 </goals>
 </execution>
 </executions>
 </plugin>
 </plugins>
 </build>

 <!-- Profiles -->
 <profiles>
 <profile>
 <id>ts.all</id>
 <activation>
 <property>
 <name>ts.all</name>
 </property>
 </activation>
 <properties>
 <jboss.home>${basedir}/../target/wildfly-${version.wildfly}</jboss.home>
 </properties>
 </profile>
 </profiles>
</project>

As you can see the project in based on a MVC pattern and is composed of four directories but for the time being we will only cover three of them.
That is to say :

- camel-jpa/src/main/java
- camel-jpa/src/main/resources
- camel-jpa/src/main/webapp

Indeed, the project can be then cut in two parts.

The first part which is taking care of the content routing and the transformation of information of the following XML data sample.


<?xml version="1.0" encoding="UTF-8"?>
<cus:customer xmlns:cus="http://org/wildfly/camel/examples/jpa/model/Customer"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://org/wildfly/camel/examples/jpa/model/Customer">
<cus:firstName>John</cus:firstName>
<cus:lastName>Doe</cus:lastName>
<cus:dateOfBirth>1975-12-25</cus:dateOfBirth>
</cus:customer>

Note : You can retrieve these data in the camel-jpa/src/main/webapp/WEB-INF/customer.xml xml file.
The Second part which transcribes the content of the database in a web page.  – See below – We will call it the servlet[12] part.

Note: This outcome can be found at http://localhost:8080/example-camel-jpa/customers

Screenshot from 2014-12-15 13:37:35

 

 

 


First part of the Project (Content routing and transformation of information)

Here the idea is to unmarshall[11] or deserialize the content of the XML file through Camel Route (Here implemented in the JpaRouteBuilder.java) to an Entity Bean (here in Customer.java) which will then persisted to the H2 Database.

In the camel-jpa/src/java you have got : JpaRouteBuilder.java which is where the Camel route is going to be implemented.


/*
* #%L
* Wildfly Camel :: Example :: Camel JPA
* %%
* Copyright (C) 2013 - 2014 RedHat
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
package org.wildfly.camel.examples.jpa;

import javax.ejb.Startup;
import javax.enterprise.context.ApplicationScoped;
import javax.inject.Inject;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.transaction.UserTransaction;

import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.cdi.ContextName;
import org.apache.camel.component.jpa.JpaEndpoint;
import org.apache.camel.model.dataformat.JaxbDataFormat;
import org.springframework.transaction.jta.JtaTransactionManager;
import org.wildfly.camel.examples.jpa.model.Customer;

@Startup
@ApplicationScoped
@ContextName("jpa-cdi-context")
public class JpaRouteBuilder extends RouteBuilder {

@Inject
private EntityManager em;

@Inject
UserTransaction userTransaction;

@Override
public void configure() throws Exception {

// Configure our JaxbDataFormat to point at our 'model' package
JaxbDataFormat jaxbDataFormat = new JaxbDataFormat();
jaxbDataFormat.setContextPath(Customer.class.getPackage().getName());

EntityManagerFactory entityManagerFactory = em.getEntityManagerFactory();

// Configure a JtaTransactionManager by looking up the JBoss transaction manager from JNDI
JtaTransactionManager transactionManager = new JtaTransactionManager();
transactionManager.setUserTransaction(userTransaction);
transactionManager.afterPropertiesSet();

// Configure the JPA endpoint to use the correct EntityManagerFactory and JtaTransactionManager
JpaEndpoint jpaEndpoint = new JpaEndpoint();
jpaEndpoint.setCamelContext(getContext());
jpaEndpoint.setEntityType(Customer.class);
jpaEndpoint.setEntityManagerFactory(entityManagerFactory);
jpaEndpoint.setTransactionManager(transactionManager);

/*
* Simple route to consume customer record files from directory input/customers,
* unmarshall XML file content to a Customer entity and then use the JPA endpoint
* to persist the it to the 'ExampleDS' datasource (see standalone.camel.xml for datasource config).
*/
from("file://{{jboss.server.data.dir}}/customers")
.unmarshal(jaxbDataFormat)
.to(jpaEndpoint)
.to("log:input?showAll=true");
}
}

In addition to that, We will use JaxbDataFormat to point at our 'model' package in camel-jpa/src/main/java/org/wildfly/camel/examples/jpa/model/package-info.java


@javax.xml.bind.annotation.XmlSchema(namespace = "http://org/wildfly/camel/examples/jpa/model/Customer", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
package org.wildfly.camel.examples.jpa.model;


 

Second part of the Project

In that part of that project,  the idea is to transcribes the content of the database in a web page through a Servlet[12].

In the camel-jpa/src/java you have got : CustomerRepository.java which is only there to send back customer information from the Database to the Servlet SimpleServlet.java


/*
 * #%L
 * Wildfly Camel :: Example :: Camel JPA
 * %%
 * Copyright (C) 2013 - 2014 RedHat
 * %%
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * #L%
 */
package org.wildfly.camel.examples.jpa;

import java.util.List;

import javax.inject.Inject;
import javax.persistence.EntityManager;
import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.CriteriaQuery;

import org.wildfly.camel.examples.jpa.model.Customer;

public class CustomerRepository {
    
    @Inject
    private EntityManager em;

    /**
     * Find all customer records
     *
     * @return A list of customers
     */
    public List<Customer> findAllCustomers() {

        CriteriaBuilder criteriaBuilder = em.getCriteriaBuilder();
        CriteriaQuery<Customer> query = criteriaBuilder.createQuery(Customer.class);
        query.select(query.from(Customer.class));

        return em.createQuery(query).getResultList();
    }
}</pre>
<pre>

Entity Manager which is going to use details defined in your camel-jpa/src/main/resources/META-INF/persistence.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<!--
#%L
Wildfly Camel :: Example :: Camel JPA
%%
Copyright (C) 2013 - 2014 RedHat
%%
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
#L%
-->
<persistence version="2.0"
 xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:schemaLocation="
 http://java.sun.com/xml/ns/persistence
 http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
 <persistence-unit name="camel">
 <jta-data-source>java:jboss/datasources/ExampleDS</jta-data-source>
 <class>org.wildfly.camel.examples.jpa.model.Customer</class>
 <properties>
 <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
 <property name="hibernate.show_sql" value="true"/>
 </properties>
 </persistence-unit>
</persistence>

Note : ExampleDS should be the default datasource set in your Wildfly instance. – see for instance your /wildfly-8.1.0.Final/standalone/configuration/standalone-camel.xml configuration file in your wildfly instance with the additional Camel Patches[1]

Finally here is the Servlet [12] implementation  : SimpleServlet.java:

/*
 * #%L
 * Wildfly Camel :: Example :: Camel JPA
 * %%
 * Copyright (C) 2013 - 2014 RedHat
 * %%
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * #L%
 */
package org.wildfly.camel.examples.jpa;

import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.List;

import javax.inject.Inject;
import javax.servlet.ServletConfig;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.wildfly.camel.examples.jpa.model.Customer;

@SuppressWarnings("serial")
@WebServlet(name = "HttpServiceServlet", urlPatterns = { "/customers/*" }, loadOnStartup = 1)
public class SimpleServlet extends HttpServlet {

    static Path CUSTOMERS_PATH = new File(System.getProperty("jboss.server.data.dir")).toPath().resolve("customers");
    
    @Inject
    private CustomerRepository customerRepository;

    @Override
    public void init(ServletConfig config) throws ServletException {
        super.init(config);

        // Copy WEB-INF/customer.xml to the data dir
        ServletContext servletContext = config.getServletContext();
        try {
            InputStream input = servletContext.getResourceAsStream("/WEB-INF/customer.xml");
            Path xmlPath = CUSTOMERS_PATH.resolve("customer.xml");
            Files.copy(input, xmlPath);
        } catch (IOException ex) {
            throw new ServletException(ex);
        }
    }

    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        /*
         * Simple servlet to retrieve all customers from the in memory database for
         * output and display on customers.jsp
         */

        List<Customer> customers = customerRepository.findAllCustomers();

        request.setAttribute("customers", customers);
        request.getRequestDispatcher("/WEB-INF/customers.jsp").forward(request, response);
    }
}

Object which will be called by the camel-jpa/src/main/webapp/WEB-INF/customers.jsp JSP file when you will access to the following URL  : http://localhost:8080/example-camel-jpa/customers

<%--
 #%L
 Wildfly Camel :: Example :: Camel JPA
 %%
 Copyright (C) 2013 - 2014 RedHat
 %%
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

 http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 #L%
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<c:forEach var="customer" items="${customers}">
 ${customer.firstName} ${customer.lastName}
</c:forEach>

Now up, you can compile you code using the following command at the root of your project /camel-jpa :


[fhornain@localhost camel-jpa]$ mvn clean package
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Wildfly Camel :: Example :: Camel JPA 2.0.0.CR1
[INFO] ------------------------------------------------------------------------
[INFO]
.......................
.......................
.......................
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.491s
[INFO] Finished at: Mon Dec 15 15:10:01 CET 2014
[INFO] Final Memory: 36M/333M
[INFO] ------------------------------------------------------------------------

and then deploy your code to your wildfly instance[1] with its additional camel patches.


[fhornain@localhost target]$ pwd
/camel-jpa/target
[fhornain@localhost target]$ cp -pR example-camel-jpa-2.0.0.CR1.war /wildfly-8.1.0.Final/standalone/deployments/

Then, you can play with the example.

You should have a customer directory in /wildfly-8.1.0.Final/standalone/data

Directory

 

 

 

 

 

 

Do a copy/paste of the the camel-jpa/src/main/webapp/WEB-INF/customer.xml xml file in that directory /wildfly-8.1.0.Final/standalone/data.


[fhornain@localhost WEB-INF]$ pwd

/camel-jpa/src/main/webapp/WEB-INF

[fhornain@localhost WEB-INF]$ cp -pR customer.xml /wildfly-8.1.0.Final/standalone/data/customers

You should now see an additional customer in the following web page : http://localhost:8080/example-camel-jpa/customers

New Web screenshot

N.B. if you are looking for certified and supported enterprise solutions please consider Red Hat JBoss EAP[8] or Red Hat JBoss Fuse[9]

Kind Regards

Frederic

[1] https://fhornain.wordpress.com/2014/12/14/wildfly-extras-wildfly-and-apache-camel/

[2] https://camel.apache.org/

[3] http://wildfly.org/

[4] http://www.h2database.com/html/main.html

[5] http://www.postgresql.org/

[6] http://www.mongodb.org/

[7] https://mariadb.org/

[8] https://github.com/wildfly-extras/wildfly-camel

[9] http://www.redhat.com/en/technologies/jboss-middleware/application-platform

[10] http://www.redhat.com/en/technologies/jboss-middleware/fuse

[11] http://en.wikipedia.org/wiki/Marshalling_%28computer_science%29

[12] http://en.wikipedia.org/wiki/Java_Servlet

 

 

 

 

 

 

 

 

 

 

 

Red Hat Satellite Overview

 

 

 

 

 

 

 

In 2014, Red Hat launched Red Hat® Satellite 6, a new version of its classic Red Hat Enterprise Linux® life-cycle management solution. It includes some of the best in open system-management technology and a flexible architecture to manage scale from bare-metal to virtualized environments, and in public and private clouds.

 

Red Hat® Satellite is a complete cloud system management product that manages the full life cycle of your Red Hat deployments across physical, virtual, and private clouds. Watch this demo to see how Red Hat Satellite delivers system provisioning, configuration management, software management, and subscription management—all while maintaining high scalability and security.

 

Kind Regards

Frederic

Wildfly Camel

 

 

 

This quick tutorial  takes you through the first steps of getting Camel into WildFly[1][2] and provides the initial pointers to get up and running.

This explanation is based on the wildfly-camel Project[5].

First step is to download wilfly 8.1.0.Final at the following link : http://download.jboss.org/wildfly/8.1.0.Final/wildfly-8.1.0.Final.zip

Second step is to download the WildFly Camel Patch at the following link : https://repository.jboss.org/nexus/content/groups/public-jboss/org/wildfly/camel/wildfly-camel-patch/2.0.0.CR1/wildfly-camel-patch-2.0.0.CR1.tar.gz

Third step is to install the Camel Subsystem by applying  the patch into the wildfly 8.1.0.Final directory

[fhornain@localhost Project]$ ls
wildfly-8.1.0.Final  wildfly-8.1.0.Final.zip  wildfly-camel-patch-2.0.0.CR1.tar
[fhornain@localhost Project]$ cd wildfly-8.1.0.Final
[fhornain@localhost wildfly-8.1.0.Final]$ tar -xvf ../wildfly-camel-patch-2.0.0.CR1.tar

Then you have to create few users in order to have access to the wildfly administrator console and hawtio administration console/

[fhornain@localhost wildfly-8.1.0.Final]$ bin/add-user.sh 

What type of user do you wish to add?
 a) Management User (mgmt-users.properties)
 b) Application User (application-users.properties)
(a): a              

Enter the details of the new user to add.
Using realm 'ManagementRealm' as discovered from the existing property files.
Username : fhornainWildfly
Password recommendations are listed below. To modify these restrictions edit the add-user.properties configuration file.
 - The password should not be one of the following restricted values {root, admin, administrator}
 - The password should contain at least 8 characters, 1 alphabetic character(s), 1 digit(s), 1 non-alphanumeric symbol(s)
 - The password should be different from the username
Password :
Re-enter Password :
What groups do you want this user to belong to? (Please enter a comma separated list, or leave blank for none)[  ]:
About to add user 'fhornainWildfly' for realm 'ManagementRealm'
Is this correct yes/no? yes
Added user 'fhornainWildfly' to file '/home/fhornain/OttoProject/YttyProject2/wildfly-8.1.0.Final/standalone/configuration/mgmt-users.properties'
Added user 'fhornainWildfly' to file '/home/fhornain/OttoProject/YttyProject2/wildfly-8.1.0.Final/domain/configuration/mgmt-users.properties'
Added user 'fhornainWildfly' with groups  to file '/home/fhornain/OttoProject/YttyProject2/wildfly-8.1.0.Final/standalone/configuration/mgmt-groups.properties'
Added user 'fhornainWildfly' with groups  to file '/home/fhornain/OttoProject/YttyProject2/wildfly-8.1.0.Final/domain/configuration/mgmt-groups.properties'
Is this new user going to be used for one AS process to connect to another AS process?
e.g. for a slave host controller connecting to the master or for a Remoting connection for server to server EJB calls.
yes/no? yes
To represent the user add the following to the server-identities definition <secret value="XXXXXXXXXXXXXXXXXXX" /></pre>
<pre>[fhornain@localhost wildfly-8.1.0.Final]$
[fhornain@localhost wildfly-8.1.0.Final]$
[fhornain@localhost wildfly-8.1.0.Final]$ bin/add-user.sh 

What type of user do you wish to add?
 a) Management User (mgmt-users.properties)
 b) Application User (application-users.properties)
(a): b

Enter the details of the new user to add.
Using realm 'ApplicationRealm' as discovered from the existing property files.
Username : fhornainHawtio
Password recommendations are listed below. To modify these restrictions edit the add-user.properties configuration file.
 - The password should not be one of the following restricted values {root, admin, administrator}
 - The password should contain at least 8 characters, 1 alphabetic character(s), 1 digit(s), 1 non-alphanumeric symbol(s)
 - The password should be different from the username
Password :
Re-enter Password :
What groups do you want this user to belong to? (Please enter a comma separated list, or leave blank for none)[  ]: admin
About to add user 'fhornainHawtio' for realm 'ApplicationRealm'
Is this correct yes/no? yes
Added user 'fhornainHawtio' to file '/home/fhornain/OttoProject/YttyProject2/wildfly-8.1.0.Final/standalone/configuration/application-users.properties'
Added user 'fhornainHawtio' to file '/home/fhornain/OttoProject/YttyProject2/wildfly-8.1.0.Final/domain/configuration/application-users.properties'
Added user 'fhornainHawtio' with groups admin to file '/home/fhornain/OttoProject/YttyProject2/wildfly-8.1.0.Final/standalone/configuration/application-roles.properties'
Added user 'fhornainHawtio' with groups admin to file '/home/fhornain/OttoProject/YttyProject2/wildfly-8.1.0.Final/domain/configuration/application-roles.properties'
Is this new user going to be used for one AS process to connect to another AS process?
e.g. for a slave host controller connecting to the master or for a Remoting connection for server to server EJB calls.
yes/no? yes
To represent the user add the following to the server-identities definition <secret value="XXXXXXXXXXXXXXXXXXX" /></code></pre>
<pre>

Finally, you can start your wildfly 8.1.0.Final java application server with the following command :

</pre>
<pre>[fhornain@localhost wildfly-8.1.0.Final]$ <code>bin/standalone.sh -c standalone-camel.xml</code></pre>
<pre>

Then you can log on the wildfly admin console via the following URL :  http://localhost:9990/console/App.html

Wildfly admin console

 

 

 

 

 

 

 

Or you can log on the hawtio[8] console via the following URL : http://127.0.0.1:8080/hawtio/login

Hawtio Console

 

 

 

 

 

 

 

Then you can see the sample camel route created by default for you through hawtio console :

Camel route diagram

 

 

 

 

 

 

 

Camel Route Source

 

 

 

 

 

 

 

FYI, this Camel XML route sample is located in your “standalone-camel.xml” configuration file you used to start your wildfly application server few minutes ago.

 <subsystem xmlns="urn:jboss:domain:camel:1.0">
 <camelContext id="system-context-1">
 <![CDATA[
 <route>
 <from uri="direct:start"/>
 <transform>
 <simple>Hello #{body}</simple>
 </transform>
 </route>
 ]]>
 </camelContext>
 </subsystem>

In conclusion, you are now ready to create camel route on top of wildfly[2].

N.B. if you are looking for certified and supported enterprise solutions please consider Red Hat JBoss EAP[6] or Red Hat JBoss Fuse[7]

Kind Regards

Frederic

[1] Based on the definition written on Wikipedia :

WildFly, formerly known as JBoss AS, or simply JBoss, is an application server authored by JBoss, now developed by Red Hat. WildFly is written in Java, and implements the Java Platform, Enterprise Edition (Java EE) specification. It runs on multiple platforms. http://en.wikipedia.org/wiki/WildFly

[2] http://wildfly.org/

[3] Based on the definition written on Wikipedia :

Apache Camel is a rule-based routing and mediation engine that provides a Java object-based implementation of the Enterprise Integration Patterns using an API (or declarative Java Domain Specific Language) to configure routing and mediation rules. The domain-specific language means that Apache Camel can support type-safe smart completion of routing rules in an integrated development environment using regular Java code without large amounts of XML configuration files, though XML configuration inside Spring is also supported. http://en.wikipedia.org/wiki/Apache_Camel

[4] https://camel.apache.org/

[5] https://github.com/wildfly-extras

[6] http://www.redhat.com/en/technologies/jboss-middleware/application-platform

[7] http://www.redhat.com/en/technologies/jboss-middleware/fuse

[8] http://hawt.io/

Open Shift Presentation

 

 

 

 

 

 

 

Following my previous post named : [Open Source Cloud Day] Openshift | PaaS Sessions

Presentation can be downloded at http://www.slideshare.net/fhornain/openshift-technical-usergroup9dec14kangaroot

Kind Regards

Frederic

 

Open Source Cloud Day

 

 

 

 

 

On Wednesday December 10 2014, I did a Openshift[1] presentation and workshops @ the Open Source Days event[2] organized by our Belgian partner Kangaroot[3] – Mechelen.

I would like to thank Bart Janssens from Kangaroot[3] for his excellent job before and during the workshop session.

Open cloud days kangaroot

 

 

 

 

 

 

 

 

 

Below you will find presentation I used during the Openshift Enterprise Presentation session and workshop.

Open Shift Presentation

 

 

 

 

 

 

Openshift Workshop

 

 

 

 

 

 

 

 

[1] http://www.redhat.com/en/technologies/platform-as-a-service

http://www.redhat.com/en/technologies/cloud-computing/openshift

[2] http://www.opensourcecloudday.be/

[3] http://kangaroot.net/

[4] http://www.slideshare.net/

N.B. Presentations should be available on Slideshare[4] in the next few hours. I will include links asap.

Kind Regards

Frederic

Red Hat JBoss PKI

 

 

 

 

 

 

 

Red Hat® JBoss® Middleware is fast becoming recognized as government’s trusted choice for applications that need robust encrypted data transport and secure identity and access control.
Red Hat works continuously with government agencies and the open source community to implement Red Hat JBoss Middleware that supports the most stringent federal protocols, standards, and security features.


For more information visit: http://www.red.ht/OpenSourceSecurity

[1] http://www.redhat.com/en/insights/security

Kind Regards

Frederic

Secure Virtualization

 

 

 

 

 

 

 

In the escalating battle against malicious attackers who want to compromise enterprise level systems, you need cost-effective solutions to stop potential threats — both inside and outside the walls of government offices. Red Hat delivers rigorous security controls to prevent unauthorized access to systems and data with Red Hat® Security-Enhanced Linux® (SELinux) and Red Hat sVirt for virtual and cloud environments.

For more information visit: http://www.red.ht/OpenSourceSecurity

[1] http://www.redhat.com/en/insights/security