

Building OSB projects with Maven and removing the eclipse dependency
In this earlier post, I talked about a way to automate the build and deployment for OSB, but I did not go so far as to get that working in Maven, though you certainly could. But, OSB PS6 has added a new tool called configjar which lets you build a sbconfig.jar file without needing to have eclipse/OEPE/OSB IDE installed on the machine where you are doing the build. You do still need OSB, but removing that IDE dependency is a big step forward.
You can find configjar sitting under your Oracle_OSB1/tools/configjar directory in your OSB PS6 installation. There is a readme file there that tells you how to use it from ANT and WLST. Here, I want to show you how to use it from Maven, and therefore Hudson, etc. too.
For this post, I went into the OSB IDE and created a simple project called osbProject1 which contains…
View original post 686 more words
Daemonizing JVM-based applications
Deployment architecture design is a vital part of any custom-built server-side application development project. Due to it’s significance, deployment architecture design should commence early and proceed in tandem with other development activities. The complexity of deployment architecture design depends on many aspects, including scalability and availability targets of the provided service, rollout processes as well as technical properties of the system architecture.
Serviceability and operational concerns, such as deployment security, monitoring, backup/restore etc., relate to the broader topic of deployment architecture design. These concerns are cross-cutting in nature and may need to be addressed on different levels ranging from service rollout processes to the practical system management details.
On the system management detail level the following challenges often arise when using a pure JVM-based application deployment model (on Unix-like platforms):
- how to securely shut down the app server or application? Often, a TCP listener thread listening for shutdown requests is…
View original post 900 more words
Java and the Reactor pattern
The Reactor pattern is a common design pattern to provide nonblocking I/O. Instead of having multiple threads that are blocked waiting for IO to complete on a connection, you assign a single thread that is responsible to monitor all the connections. When all the IO operations are completed for a connection, that thread can fire up an event so that another thread starts processing the data coming from the connection. This approach works well when you have to handle a lot of connections, because you are not force to dedicate a thread for each connection, which might consume lot of resources if the number of connections is high.
Since Java 1.4, the Selector class provides an implementation of this pattern. You start by registering connections to a Selector instance. Then you call the select method of the Selector to get a list of all the connections that are ready to…
View original post 119 more words
Implementing OAuth2 with Spring Security
I would share my notes on understanding how to set up Spring Security to implement OAuth2. My ultimate goal is to implement an authority provider (Authorization Server in OAuth2 terminology) to support multiple microservices. In this post, I will describe step by step on how to setup Spring Security with OAuth2 and demonstrate how a web server client should interact with the Oauth2 servers.
OAuth2 Roles
OAuth2 consists of the following “roles”:
- User / Resource Owner – an entity capable of granting access to a protected resource.
- Resource Server – server hosting the protected resources, capable of accepting and responding to protected resource requests using access token
- Client – An application making requests to protected resources on behalf of the owner. It can be a web app server, a mobile app, or a client side (e.g. javascript) application.
- Authorization Server – Server issuing access tokens to client after successfully authentication…
View original post 1,112 more words
Maven install ojdbc6
I really wished the Oracle driver jar was part of any (legal) publicly available Maven repo, but it’s not. So we’ll have to take matters on our hands and install it in our local repo once and for all so we can effortlessly thereafter summon it via our pom file:
Steps:
- Download the jdbc6.jar from the Oracle website. I tried to automate this step via a Groovy script but this pesky agreement radio-button gets in the way (which is there for a reason to be fair)
- Supposing mvn is already setup in your path:
Create JNDI bindings for WMQ
The page describes about how to create jndi bindings files Websphere MQ.
The environment used to describe is as follows:
OS : Windows XP SP3 Websphere MQ: V6.0 Java: 1.6
Once Websphere MQ refered as WMQ from here onwards is installed navigate to the WMQ installation folder from command prompt.
Navigate to <WMQ Install location>bin and execute the following commands
Create a queue manager
crtmqm -q JMS_QUEUE_MANAGER
Start queue manager
strmqm JMS_QUEUE_MANAGER
Open mq command line environment
runmqsc
Define a local queue in mq command line
define qlocal(JMS_QUEUE) end
Create a configuration file with contents
INITIAL_CONTEXT_FACTORY=com.sun.jndi.fscontext.RefFSContextFactory PROVIDER_URL=file: SECURITY_AUTHENTICATION=none
Navigate to <WMQ Install location>Javabin
Open JMSAdmin tool
JMSAdmin.bat -v -cfg
The above command opens JMSAdmin tool environment
Define JMS bindings for Connection factory by executing
define qcf(jms/testJMSQCF) qmgr(JMS_QUEUE_MANAGER)
JNDI name for the Connection factory will be “jms/testJMSQCF”
Define JMS binding for Queue by executing
define q(jms/testJMSQ) qmgr(JMS_QUEUE_MANAGER) queue(JMS_QUEUE) end
JNDI name…
View original post 19 more words
Lessons Learned in Software Development
Here is my list of heuristics and rules of thumb for software development that I have found useful over the years:
Development
1. Start small, then extend. Whether creating a new system, or adding a feature to an existing system, I always start by making a very simple version with almost none of the required functionality. Then I extend the solution step by step, until it does what it is supposed to. I have never been able to plan everything out in detail from the beginning. Instead, I learn as I go along, and this newly discovered information gets used in the solution.
I like this quote from John Gall: “A complex system that works is invariably found to have evolved from a simple system that worked.”
View original post 1,428 more words
Groovy & Grails Understanding – Part1
Introduction
Enterprises today require agile platform for rapid development of applications with ready assurance to quality of services, compliance to architecture and design standards. Two key things influence our ability to be agile. First, it’s the attitude of everyone involved. Second it’s the languages, framework, and tools we use to get our work done.
View original post 1,499 more words