Writing a simple MicroProfile application (4): Using WebSockets and CDI events

Alasdair takes his <a href="https://developer.ibm.com/wasdev/docs/writing-simple-microprofile-application/">simple MicroProfile application</a> and adds WebSockets and CDI Events to notify the client about changes to the meeting. All code is in <a href="https://github.com/WASdev/sample.microprofile.meetingapp.git">GitHub</a>. Continue reading Writing a simple MicroProfile application (4): Using WebSockets and CDI events

Filed under: coding, java-ee

Installing Liberty on z/OS: Java EE 7 on the Big Iron – up to 141 processors and 10 TB of memory (on psamolysov.blogspot.co.uk)

Pavel Samolysov explains how to implement all Java EE 7 capabilities on z/OS. Mainframes and Liberty work together providing up to 141 5 GHz processors and 10 TB of the main memory for your Java EE-based applications. Continue reading Installing Liberty on z/OS: Java EE 7 on the Big Iron – up to 141 processors and 10 TB of memory (on psamolysov.blogspot.co.uk)

Filed under: installation, java-ee

Microinvader: The importance of common interfaces in microservices

Common interfaces are essential when building microservices. If each microservice in a larger application has the same interface implemented, it makes maintenance of the microservices easier because of the similarities in the source code. Microinvader is a graphical game that demonstrates some of the concepts of microservices, including the benefits of common interfaces. Think about […] Continue reading Microinvader: The importance of common interfaces in microservices

Filed under: coding, java-ee

MicroProfile and WebSphere Liberty

What are microprofile.io and MicroProfile? microprofile.io is a community created in 2016 dedicated to rapid innovation around Microservices and Enterprise Java, supported by many people from the Java EE community including a number of Java User Groups and Enterprise Java vendors IBM, Red Hat, Tomitribe, and Payara. This community is actively working together on building […] Continue reading MicroProfile and WebSphere Liberty

Filed under: microprofile, coding, java-ee

Managing global (XA) transactions on AWS with WebSphere Liberty

A <a href="https://en.wikipedia.org/wiki/Transaction_processing">transaction</a> is an <em>atomic</em> unit of work in which multiple updates (e.g. to a database) must be completed within the transaction or, if there are problems, none of the updates are made at all (also known as <em>two-phase commit</em>). The purpose of transactions is to avoid situations where only part of an update is made. This article demonstrates a WebSphere Liberty application that processes global (XA) transactions across multiple resources and how Liberty automatically recovers the XA transaction during a simulated server failure in a cloud environment. Continue reading Managing global (XA) transactions on AWS with WebSphere Liberty

Filed under: java-ee, cloud

Get started with CDI interceptors in WebSphere Liberty (Part 2)

Interceptors are classes that intercept method invocation or lifecycle events of a target class to perform some form of pre- or post-processing that is usually separate from the business logic, such as logging or auditing. The first article in this series showed how to associate an interceptor with a CDI bean using interceptor bindings. This second article shows how you can associate multiple CDI interceptors with a bean, allowing each interceptor to be dedicated to performing a specific task. This will create a chain of interceptors, which will be executed in the order defined in the <code>beans.xml</code> or using the <code>Priority</code> annotation. Continue reading Get started with CDI interceptors in WebSphere Liberty (Part 2)

Filed under: coding, java-ee

On the cloud: WAS as a service with Java EE 7 samples

For WebSphere Application Server (WAS) V9, available on <a href="https://console.ng.bluemix.net/catalog/services/application-server-on-cloud">IBM Bluemix</a>, there are some downloadable Java EE 7 sample applications that allow you to explore some selected Java EE 7 technologies. You will deploy the samples for yourself, and will <a href="https://github.com/WASdev?utf8=%E2%9C%93&query=.javaee7.">find the samples on GitHub</a>. These applications run on both WAS V9 and on Liberty (which already supports the Java EE 7 Full Platform). Let's take a closer look at these samples. Continue reading On the cloud: WAS as a service with Java EE 7 samples

Filed under: java-ee, cloud

Traditional WebSphere or Liberty: how to choose?

WebSphere Liberty has now 'grown-up' to provide the full Java EE 7 platform. Combining that API set with operational capabilities that have been rapidly expanded over the past three years, Liberty is now a great deployment choice for many Java applications. WAS traditional remains fully strategic, however, and will evolve to the Java EE 7 standards itself in time, so how do you choose between the two? Continue reading Traditional WebSphere or Liberty: how to choose?

Filed under: java-ee, devops

Creating a simple Java batch application using WebSphere Developer Tools

WebSphere Application Server Developer Tools for Eclipse (WDT) provides tools to create Java batch projects based on the Java Batch 1.0 standard (JSR 352) and submit them to a Liberty profile server. This article explains how to set up the tools for creating batch projects, create a simple batch project, deploy the project to a Liberty profile server and submit a job. Continue reading Creating a simple Java batch application using WebSphere Developer Tools

Filed under: java-ee

Liberty batch and inline JSL

The Java batch specification (JSR-352) defines a way to package your job definition file within your batch application. But what if you want to manage your batch application and job definitions separately? We've added a new capability to the Liberty batch REST API that allows you to submit your job definition inline as part of your REST job submission request. Continue reading Liberty batch and inline JSL

Filed under: java-ee

Liberty OAuth 2.0: Advanced scenarios, tips, and samples

OAuth 2.0 is the de facto standard for delegated authorization across web applications, desktop applications, cloud applications, and mobile devices. OAuth 2.0 support was first added to WebSphere Application Server Liberty profile V8.5.0.2, and was enhanced when OpenID Connect support was added in V8.5.5.2. This article will discuss architecture, tips, sample configuration, and sample codes for advanced deployment. Continue reading Liberty OAuth 2.0: Advanced scenarios, tips, and samples

Filed under: java-ee

How to learn and use WAS Liberty OpenID Connect

OpenID Connect (OIDC) is the new Internet Single Sign-on (SSO) protocol based on OAuth 2.0 specifications. Using OIDC, a client can request the user’s identity as an ID token in a standardized REST-like manner, and it can use the access token to access protected REST-like Services. This article discusses some advanced use scenarios and tips, and lists some resources for further reading on Liberty OpenID Connect. Continue reading How to learn and use WAS Liberty OpenID Connect

Filed under: java-ee, security

Developing JPA 2.1 applications in WebSphere Developer Tools and Liberty

Developing JPA 2.1 applications in WebSphere Developer Tools (WDT) for Liberty can greatly benefit from using the WebSphere Developer Tools (WDT) database connectivity tools with its JPA tooling. I'll show some examples of configuring data sources for Liberty in a JPA application, taking advantage of the new schema generation feature in JPA 2.1 to create tables based on entities, and finally the auto-generation of JPA entities based on a database schema. Continue reading Developing JPA 2.1 applications in WebSphere Developer Tools and Liberty

Filed under: coding, java-ee

Get started with CDI interceptors in WebSphere Liberty (Part 1)

Interceptors are classes that intercept method invocation or lifecycle events of a target class to perform some form of pre- or post-processing that is usually separate from the business logic, such as logging or auditing. The basic functionality of interceptors is defined in the interceptors specification and is extended in the CDI specification. This mini-series on interceptors shows how to create a simple interceptor and associate it with a CDI-managed bean. It also describes how to use multiple interceptors and define their ordering, the different life cycle events that can be intercepted, and how to globally enable an interceptor so it can be used across the whole application. Continue reading Get started with CDI interceptors in WebSphere Liberty (Part 1)

Filed under: java-ee

Why Java Batch?

Java batch is a new standard that makes it easier to process large amounts of data and manage how that data is processed. Here, we introduce Java batch and how it is used in practice. We walk through a simple batch scenario and talk about some of the unique operational batch features in Liberty that you can use to build a complete batch environment. Continue reading Why Java Batch?

Filed under: java-ee

Converting Java EE Projects to OSGi Bundle Projects

In case you didn't know, Rational Application Developer (RAD) and WebSphere Developer Tools for Eclipse (WDT) let you take your existing Java EE projects (say a Dynamic Web project, for example) and easily convert them to OSGi bundle projects. This capability has been there since the beginning but recently we took the opportunity to improve on it in RAD and WDT V8.5.1. Continue reading Converting Java EE Projects to OSGi Bundle Projects

Filed under: coding, java-ee, osgi-techs

Getting Started with OSGi Applications: Blueprint Container (Part 3)

A Blueprint Container is a mechanism to simplify this process and remove all of the OSGi specific Java code, replacing it with a simple XML file and using dependency injection in the Java code. Today we'll start using Blueprint by creating a new bundle that imports the service we created last time and registers a second service. We'll then use this new service to print a message containing the date in the Servlet. Continue reading Getting Started with OSGi Applications: Blueprint Container (Part 3)

Filed under: coding, java-ee, osgi-techs

Getting Started with OSGi Applications: Bundle Lifecycle (Part 1)

OSGi Applications that run in an enterprise environment are a great alternative to deploying the traditional EAR file. This series is going to run through an introduction to OSGi Applications for an enterprise developer, if you don’t know why you might want to do this then Ian Robinson has done an excellent explanation of <a href="http://www.youtube.com/watch?v=J2wqOY603-Q&feature=c4-overview&list=UUkzD7uqVyLzlWMDPQC3hzEQ">the advantages of using OSGi Applications</a>. Continue reading Getting Started with OSGi Applications: Bundle Lifecycle (Part 1)

Filed under: coding, java-ee, osgi-techs