Interacting with JMS Queue and Topic from Java SE

This article is just a quick post of some code I want to have easy access to. It runs in Java SE – outside any container in a stand alone JVM. It creates a connection with a JMS Queue. One class sends messages to the Queue, the other class registers as a listener and consumes messages from a different queue.

I have created the code in JDeveloper. It runs stand-alone and connects to a WebLogic (more...)

Java Web Application sending JSON messages through WebSocket to HTML5 browser application for real time push

imageThis article describes a Java EE 7 web application that exposes a REST service that handles HTTP POST requests with JSON payload. Any message received is sent through a Web Socket to the web socket (server) endpoint that is published by a Java Class deployed as part of the web application. A static HTML page with two associated JavaScript libraries is opened in a web browser and has opened a web socket connection to this (more...)

StreamExplorer – use REST adapter to feed results from event processing to a REST service

In a recent article, I described how StreamExplorer can be configured to consume events by exposing a REST service to which clients can send HTTP POST requests with JSON payloads. StreamExplorer also can make use of an Outbound REST Adapter through which results of explorations can be sent.

This target service can be implemented in a number of ways – that does not concern StreamExplorer. In this case we will use an implementation in (more...)

Make HTTP POST request from Java SE – no frills, no libraries, just plain Java

This article shows a very simple, straightforward example of making an HTTP POST call to a url (http://localhost:8080/movieevents) and sending a JSON payload to that URL. This example does not use any additional libraries – just the standard Java SE libraries.

package nl.amis.rest;

import java.io.BufferedReader;
import java.io.DataOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;

import java.io.Reader;

import java.io.UnsupportedEncodingException;

import java.net.HttpURLConnection;
import java. (more...)

Eclipse on Fedora

While I previously blogged about installing Netbeans 8, some of my students would prefer to use the Eclipse IDE. This post shows how to install and configure Eclipse IDE, include the mysql-connector-java.jar, and write Java to access the MySQL.

You can download Eclipse IDE and then open it in Fedora’s Archive Manager. You can use the Archive Manager to Extract the Eclipse IDE to a directory of your choice. I opted to extract (more...)

Developer Cloud Service: Develop, Collaborate & Deploy in the Cloud

This session is part of the Oracle Developer Cloud Webcast series and provides an overview, demonstration & real-world use case of Developer Cloud Service. Check it out to see how DevOps in the cloud can help you to build better applications quicker and cheaper. Session Video: Developer Cloud Service: Develop, Collaborate & Deploy in the Cloud

Netbeans 8 – Fedora

Some of my students want to use the Fedora image that I built for my database classes in my Java software development life cycle course. As a result, they wanted a Java development environment installed. I examined JDeveloper 11g (11.1.1.7.0) and 12c (12.1.3) but resolved on the more generic Netbeans 8 (8.0.2) IDE.

JDK 7 with Netbeans 8 Download

You can download the generic Netbeans (more...)

Jumpstarting Development on the Cloud – Part 2 : Packaging and Build

This blog entry by Oracle's A-Team will show you how to use Maven to compile, package and deploy a java application to JCS-SX. Check it out here.

Oracle Developer Cloud Service Webcast – April 30, 2015 @ 9 AM PDT

oracle_reglobbybanner_700x100.jpg

   Oracle Cloud Developer Webcast Series

 

As part of the Oracle Cloud Developer Webcast Series this session will showcase Oracle's new Developer Cloud Service (DCS). DCS provides you with a turnkey, secure development platform hosted in the cloud. This session will show you how you can have a complete DevOps solution spun-up within seconds providing you everything you need to design, develop, build and deploy your applications in the cloud with team collaboration at (more...)

Oracle Developer Cloud Service 15.2.2 Released

We're excited to tell you that we've just released Oracle Developer Cloud Service 15.2.2.

 

This release includes many new features including a New Web UI with support for responsive design. Additional features include:

  • Embedded user assistance
  • New global search across source code, issues, wikis and more
  • Support for markdown in issues and wikis
  • Redesigned merge request UI along with conflict resolution
  • Web based-code Git merge for approved merge requests
  • New build statistics (more...)

The Java Council: First vJUG Podcast. Microservices, Events and all Java.

I was invited to join the vJUG and give a talk about Large Enterprise Java Architecture and as a follow-up I also had the chance to be among the first guests of the newly created Virtual JUG Podcast.

Recording the Podcast with Hangouts, Audacity, Skype and Google Docs.
Featuring regulars Simon Maple, Trisha Gee and Martijn Verburg with guests Markus Eisele and, Daniel Fullarton. The team did a great job guiding the guests through the (more...)

Access Denied when logging in to OSB 12c console

The Oracle SOA Suite 12c quick start is an excellent way to get started with all the new features of 12c. I imagine it must be frustrating when you log in to http://localhost:7101/servicebus and are confronted with an 401 – Access Denied error message. Rest assured, there is nothing wrong with your credential configuration. The cause is likely much more simple; you use the wrong Java version.

Although the certification matrix for FMW 12.1. (more...)

Quick and dirty test for thread leakage in java

I was looking at a bit of code was leaking class loaders when deployed to tomcat - so I wanted to quick rule out that a background Thread was holding onto the loader. Pain by eye, it is quite easy with a few unix commands to process the stack trace, filter for the lines that contain the thread name, filter for just the thread names and sort:
sudo -u tomcat jstack 1853 | grep "  (more...)

So you’ve dumped 150 GiB of JVM heap, now what?

150 GiB worth of JVM heap dump is laying on hard drive and I need analyze specific problem detected in that process.

This is a dump of proprietary hybrid of in-memory RDBMS and CEP system, I'm responsible for. All data are stored in Java heap, so heap size of some installation is huge (400 GiB heap is largest to the date).

Problem of analyzing huge heap dumps were on my radar for some time, so (more...)

Découverte : Java Cloud Service Workshop


Marcus Lagergren 20 years of Java In Review

We know each other since some years now. And I am very very pleased to see, that we finally could make it happen to have him speaking at JavaLand as a Keynoter. And what would be better for a JVM veteran than talking about this years anniversary: Happy Birthday Java!
Thank you Marcus, for taking the time!

I am looking forward to a beer or two at JavaLand! Follow his rumblings about dynamic languages on (more...)

Binary search – is it still most optimal?

If you have a sorted collection of elements, how would you find index of specific value?
"Binary search" is likely to be your answer.
Algorithms theory is teaching us what binary search is most optimal algorithm for this task with log(N) complexity.
Well, hash table can do better, if you need to find key by exact match. In many cases, though, you have reasons to have your collection sorted, not hashed.

On my job, I'm (more...)

Moving My Beers From Couchbase to MongoDB

See it on my new blog : here Few days ago I have posted a joke on Twitter Moving my Java from Couchbase to MongoDB pic.twitter.com/Wnn3pXfMGi — Tugdual Grall (@tgrall) January 26, 2015 So I decided to move it from a simple picture to a real project. Let’s look at the two phases of this so called project: Moving the data from Couchbase to MongoDB Updating the application code to use

JDeveloper Debugging Tips (Watchpoints & Beep)

In a previous blog post I talked about scoping breakpoints for debugging purposes, next to scoping breakpoints JDeveloper has more interesting debugging features to offer.

I created a simple example to show both the watchpoint as well as the beep functionality. To illustrate this, I created a page with an inputText and a button, both bound to a backingBean. 

This  is the jsf code:
 



The code from the bean is also pretty straight forward:
    (more...)

But that’s impossible, or finding out that the JIT has broken your code.

Every now and then you look at some code and think that it cannot be possibly be wrong. Once you have ruled out a simple programmer screw up / enemy action in code (Make sure you read Java Puzzlers or similar) or a concurrency issue (Read Java Concurrency or go on Dr Heniz excellent course) you should sit back and take a few days and then starting thinking about whether the JDK is indeed (more...)