Monday, December 29, 2014

Weblogic LDAPAuthenticator configuration; the GUID Attribute

LDAP servers can be configured to use as authenticator in Weblogic Server. In order to efficiently use an LDAP server, it must be possible to uniquely identify LDAP objects. GUID attributes can be considered a unique identifier for an LDAP object. There are several specific and some more generic LDAP authentication providers available for Weblogic Server. The specific authentication providers have default GUID (global universal identifier) attributes (see here at 'Use of GUID and LDAP DN Data in WebLogic Principals'). When using the generic Weblogic Server LDAPAuthenticator, there is no default GUID attribute. In order for LDAP caching to work and to allow browsing of group memberships for users, the GUID attribute needs to be defined. The entryUUID is a good candidate for this since every LDAP server should support it. See RFC 4530. Also see here.


Tuesday, December 9, 2014

Some thoughts on Continuous Delivery

Continuous Delivery is something a lot of companies strife for. It is a software development practice which allows quick (continuous) delivery of software. Quick delivery means the software can quickly provide business value. Why is it difficult to achieve and what are the challenges which need to be faced? Inspired by a Continuous Delivery conference in the Netherlands and personal experiences, some personal thoughts on the subject. The bottom line is that it requires a cultural change in a company and it is a joint effort of several departments/disciplines to make it work. The below image is taken from here. The Continuous Delivery maturity model is an interesting read to understand what Continuous Delivery is and provides a way to measure where you are as a company.

Monday, November 3, 2014

Using Maven to assemble and release artifacts to Nexus

An important part of a release process is storing artifacts in an artifact repository. Many customers use custom implementations of artifact repositories (such as file shares in combination with custom scripts) but there are also products which offer many functions of such a repository (and probably many more) out of the box so that custom implementations are not necessary anymore. Nexus is an example of a popular artifact repository. An added benefit of using a popular product to provide repository functionality is that a lot of development tools can easily be integrated with it. Maven can easily be used to compile and assemble code and deploy it to a Nexus repository.

In this blog I will provide an example of how a shell script (as an example artifact) can be packaged and deployed to Nexus by using Maven. I will use the maven-assembly-plugin to package the script, the nexus-staging-maven-plugin to deploy to Nexus and the maven-release-plugin for the version control part of the release process.

 

Monday, October 20, 2014

Oracle Service Bus: Obtaining a list of exposed SOAP HTTP endpoints

The Oracle Service Bus is often used for service virtualization. Endpoints are exposed on the Service Bus which proxy other services. Using such an abstraction layer can provide benefits such as (among many other things) monitoring/logging, dealing with different versions of services, throttling/error handling and result caching.

In this blog I will provide a small (Java) script, which works for SOA Suite 11g and 12c, which determines exposed endpoints on the Service Bus.

Friday, October 10, 2014

SOA Suite 12c: Getting started with the Spring Component

The Oracle SOA Suite Spring component has been present since SOA Suite 11.1.1.3 (11gR1 PS2). This component allows easy integration of Java code with other SOA Suite components such as (among others) BPEL, BPM and Business Rules. In SOA Suite 12c (12.1.3.0) this component is still present. In This blog post I will provide a short example on how it can be used and how the first problem I encountered with this component can be avoided.


Tuesday, September 30, 2014

ADF and service dependencies

In order to keep the business-IT gap manageable, it is important for analysts, designers and architects to know what their implemented application landscape actually looks like. An important part of this is insight in dependencies between different components. In my previous blog post I’ve described how service dependencies can be determined. In this blog post I will provide a script for analyzing which services are called by ADF pages. Keep in mind both analyses are executed on source code. This can differ from the runtime environment.

The Oracle ADF framework consists (among other things) of several XML files which refer to each other. This comes in handy when you want to analyse ADF code since XML is easily parsed and queried. In order to determine service calls I have made the assumption that webservice calls are executed using the excellent the ADF EMG XML DataControl by Wilfred van der Deijl and Richard Olrichs as announced on http://www.olrichs.nl/2014/05/announcement-adf-emg-xml-datacontrol.html and presented at OOW 2014.



Wednesday, September 17, 2014

Oracle SOA Suite 11g and 12c: Determining composite dependencies to the level of individual operations

In large companies, often there are many services and dependencies between services. It is important to track service dependencies in order to for example estimate the impact of changes. Design documents or architecture views can be used for this but as everybody knows, there is often a gap between theory and practice (design and implementation).

In this blog post I provide code to determine dependencies between composites to the level of operation calls. In order to achieve this, I'll parse the composite.xml files, JCA files (used by adapters) and also the BPEL and BPMN files in order to determine the operations. The script can be used for SOA Suite 11g and 12c composites.



The above picture shows different parts of which a composite is composed and how they are linked. The script first determines references. The references specify which external services are called. Then by using wires, the relevant components are determined. Based on the component type, specific logic is used to extract the operation. Not shown in this picture is how database dependencies can also be determined by the script by parsing the JCA files specified in the reference. If you're in a hurry, you can go to the 'Executing the script' part directly and skip the explanation.

Monday, August 25, 2014

Database releases. How can we make things better?

Releases of Java (technology related) code often are easy. Releases of database code often are not. Why is that? An important difference and cause can be found in that database code tends to be incremental. Being incremental means that a database release is build on top of previous releases. A database release has to be incremental because often a production environment holds data which needs to be preserved. With Java code, the previous releases (EAR, WAR, JAR files and the like) are less important for the present release since usually they are overwritten. Of course Java releases have their own complexities, however often they do not hold data; that is the task of the database. In this blog I will describe some of the common issues and several suggestions to improve (database) releases. Even though I am a developer (with quite some experience in release automation), I tried to also describe the issues system operators are facing and provide suggestions to improve the process.


Friday, August 8, 2014

Oracle SOA Suite 12c: The LDAPAdapter, a quick and easy tutorial

In enterprises, LDAP servers are often used to store user credentials and groups and share them among applications. Oracle SOA Suite 12c introduces a new technology adapter; the LDAPAdapter which allows easy integration with LDAP servers. In this blog post I will provide a quick and easy howto on installation of an LDAP server and browser (ApacheDS and Apache Directory Studio). I will also describe the configuration required to use the LDAPAdapter and provide an example BPEL process which allows creation of new users in the ApacheDS LDAP server by means of webservice calls.


Sunday, August 3, 2014

LDAP and Weblogic; Using ApacheDS as authentication provider for Weblogic

A Lightweight Directory Access Protocol (LDAP) server is often used to centralize management of users/groups/credentials within enterprises. An LDAP server stores user information such as group memberships and often also authorization/authentication data. You can use this information to authenticate on Weblogic Server. In this blog post I will provide a small introduction, some suggestions on how LDAP connections can be debugged and an example how an LDAP server (ApacheDS in this example) can be used as an external authentication provider in Weblogic server.


Tuesday, July 8, 2014

SOA Suite 12c: Obtaining composite resources such as WSDLs, XSDs and WADLs

In SOA Suite 12c and 11g there are several options to obtain composite resources such as WSDL's and WADL's. In this blog post I will demonstrate some of them and provide some background information. First I'll describe how URL's can be used to access composite resources. Next I'll describe how and when the EM test console and the Webservice test client can be used to gain information about composite WSDL's and XSD's.

Thursday, June 26, 2014

SOA Suite 12c: Introducing the REST Adapter

The REST Adapter is an important new feature of Oracle SOA Suite 12c. This new adapter allows easy calling/exposing of RESTful services (see http://javaoraclesoa.blogspot.nl/2014/05/what-is-rest.html for an introduction to REST) based on a WADL or configured manually. Not only does Oracle introduce the REST Adapter, but JSON support is also added in SOA Suite 12c. These features will greatly increase the integration options and flexibility of Oracle SOA Suite. In this blog I'll describe how a RESTful service can be called by using the REST adapter. Exposing a RESTful service will be described in a later blog.

SOA Suite 12c: RESTAdapter: Exposing and testing RESTful services

In my previous two blog posts I have described REST (here) and how the new Oracle SOA Suite 12c REST adapter can be used to call RESTful services (here). I recommend those articles to be read first if you're new to REST in order to better understand this article.

The newly introduced Oracle SOA Suite 12c REST adapter provides options for calling RESTful services but it can also be used to expose RESTful services. These exposed services can use XML or JSON as message exchange format. As described in the previous blog post, JSON support is implemented by implementing NXSD (Native Format Builder schema definition files, more information here) to describe the JSON message and make the transformation to and from XML possible. This XML can then be used as usual by the different components in a composite.

Saturday, May 31, 2014

What is REST?

REST (Representational State Transfer) is a term often used in software engineering when talking about services or other API's. A lot of these so-called RESTful services or interfaces are not RESTful at all. Even the author of REST gets frustrated by the common misuse; http://roy.gbiv.com/untangled/2008/rest-apis-must-be-hypertext-driven: "I am getting frustrated by the number of people calling any HTTP-based interface a REST API.". REST is often confused with an application of REST to HTTP and URI (uniform resource identifier). An URI is a unique identifier to identify a web resource. HTTP is a transport protocol used to interact with the web resource. REST however is a bit more then just that. The division between resource identification and resource interaction is important. The application of REST uses the URI to identify a concept. In this blog post I will elaborate a bit more on REST while trying to avoid literally repeating other sources like Wikipedia. I will also provide some background and examples I found during my short study of the concept. In addition, this post will be introductory to other more (Oracle) implementation focused articles.


Monday, May 12, 2014

MockServer: Easy mocking of HTTP(S) services (e.g. SOAP or JSON)

Testing services as an atomic entity can be difficult. Especially if these services are part of a call chain or call other services. Often in such cases mock services are developed to reduce test dependencies and exclude services which are not interesting to the specific test case. For example, I'm testing service A. Service A calls service B. I'm not interested in service B (or service B is maintained by another department on which I don't want to depend). I would mock service B when testing service A in this case. There are several methods to create mock services. These methods however are mostly not easily usable by testers since they require developing/coding mock services. Testers would benefit from being able to create their own mock services in order to create different tests for a specific service.

In this blog post I provide a brief introduction and describe some features of MockServer. An open source product which can be used to mock services. For a more detailed article (with more examples) you can look at the following written by my colleague Robert van Mölken: http://technology.amis.nl/2014/03/06/functional-boundary-testing-of-a-service-based-environment-using-mockserver/

The below image was taken from http://www.mock-server.com/

Saturday, April 26, 2014

Comparison of Jenkins and Hudson: Options for sharing configuration among projects

Continuous Delivery is a practice which follows from the principles behind the agile manifesto (http://agilemanifesto.org/principles.html); 'Our highest priority is to satisfy the customer through early and continuous delivery of valuable software'. Continuous Integration is a part of the process of Continuous Delivery in which source code changes are integrated and tested frequently in an automated way. Hudson and Jenkins are two products which can be used to implement Continuous Integration. These tools provide build job management, security, integration for products providing reporting capabilities, integration with version control and numerous plugins are available to provide additional functionality.

Hudson and Jenkins share a history. Sun Microsystems was the owner of Hudson. Oracle took over Sun Microsystems. Some friction ensued between the original developers of the product and Oracle. Since Oracle applied for the trademark in 2010 but was not the most contributing party, several developers decided to rename/fork Hudson and Jenkins was born. Since then the projects have diverged.

In this blog post I will look at how job configuration can be reused among projects in Jenkins and Hudson. Since the projects have diverged, the solutions provided will differ. Jenkins provides the Inheritance Plugin (https://wiki.jenkins-ci.org/display/JENKINS/inheritance-plugin) and the Template Project Plugin (https://wiki.jenkins-ci.org/display/JENKINS/Template+Project+Plugin). Hudson provides a core feature called Cascading Projects (http://www.eclipse.org/hudson/the-hudson-book/book-hudson.chunked/ch06.html#section-cascading-project).

Hudson Cascading Job configuration

Friday, April 11, 2014

Controlling BPEL process flow at runtime

When using Oracle BPEL it is often desirable to allow a certain amount of configuration of the process flow at runtime. To allow configuration, properties/preferences/parameters can be used. These can be implemented in various ways. Lucas Jellema has described a method in the Oracle SOA Suite 11g Handbook (http://www.amazon.com/Oracle-SOA-Suite-Handbook-Press/dp/0071608974 page 252) for system parameters which uses Business Rules. In this blog post I compare three other methods; using Domain Value Maps, using BPEL preferences and using a database table. I look at performance, development, re-use potential, updating the preference at runtime and when to use which method.


Monday, March 31, 2014

The Jenkins Build and Delivery Pipeline plugins

Continuous Delivery (CD) is a design practice used in software development to automate and improve the process of software delivery (http://en.wikipedia.org/wiki/Continuous_delivery). Continuous delivery uses the notion of a deployment pipeline in order to validate code. At an abstract level, a deployment pipeline is an automated manifestation of your process for getting software from version control into the hands of your users (http://www.informit.com/articles/article.aspx?p=1621865&seqNum=2). How can such a deployment pipeline be implemented?

In this blog post I'll describe the setup of my environment and my first experience with the Jenkins/Hudson Build and Delivery Pipeline plugins. What it can do to help implement a deployment pipeline and what it won't do for you.


Tuesday, March 11, 2014

Using the Java embedding activity in BPEL to gain more Composite information and control

Java can be used to extend functionality provided in Oracle SOA Suite BPEL. For example to interface with technologies for which there is no adapter available or to provide more specific functionality as is provided by the standard available activities. In this blog post I'll describe an example of how a composite can control its own state by using Java embedded code.

This mechanism can for example be used in exception handling implementations to retire a composite in case of errors.


Monday, February 24, 2014

Oracle SOA fault handling with ordered guaranteed delivery using BPEL, JMSAdapter, custom JMS headers, JMS message selectors, a JMS topic and durable subscribers

In this blog post I will demonstrate an error handling mechanism which can be used to achieve guaranteed delivery of messages in a specific order. To implement this I have used Oracle SOA Suite 11g, BPEL 2.0. The method described however can also be implemented by other technologies/languages. The method used is different from (as far as I know) previously described methods to implement exception handling in Oracle SOA Suite. A single JMS topic is used and JMS message selectors based on custom JMS headers are used by clients. By using a JMS topic, the services are loosely coupled. This method also allows tracing of flows over the topic in the Enterprise Manager Fusion Middleware Control (when Oracle SOA Suite is used). A screenshot of this mechanism implemented is shown in the screenshot below. It will be explained in more detail below.

Friday, February 7, 2014

JAXB and XML generation; missing elements

The Java API for XML Binding, JAXB (https://jaxb.java.net/) is a framework often used in Java to make working with XML easier. Most modern Java IDE's (such as JDeveloper, Eclipse, Netbeans) support direct generation of Java classes from an XML schema definition. JAXB allows Java code to be marshalled to XML and XML to be unmarshalled to Java classes.




If you generate Java classes from an XML schema definition, create an instance of the generated class and unmarshall it to XML, the XML will not in all cases be compliant to the schema the classes were generated from. This can cause problems if correctness is assumed based on usage of the framework. Validation can help detect problems and there are several methods to circumvent them.

Monday, January 20, 2014

JDBC from the Oracle Service Bus

There are different ways to do database calls from the Oracle Service Bus. In this blog post I look at several methods.

The methods looked at;
1 using an external webservice (without OSB)
2 using an external webservice proxied by the OSB
3 using the fn-bea:execute-sql function from the OSB
4 using the JCA DbAdapter from the OSB provided by Oracle as part of Oracle SOA Suite

Friday, January 10, 2014

JasperReports: Quickly generate and customize reports

For a small company I had created an Oracle APEX application. They wanted to create reports from an underlying database (in order to send invoices). Oracle APEX has the option of creating interactive reports (http://www.oracle.com/technetwork/developer-tools/apex/application-express/irrs-083031.html). These reports can be exported to several formats (e.g. CSV, PDF, HTML).

The customer is a small company so commercial products were not an option. The customer wanted to customize/layout the generated reports. The time available to develop a solution was very limited. After development, the customer needed to be able to make small layout changes independent of the developer (since the developer had other things to do). I first looked at the standard APEX Apache FOP implementation. Then I decided to take a look at JasperReports. The below image displays a report which was created in just a couple of minutes based on data from the sample HR schema present in most Oracle databases.