Schlagwörter » Java EE

"Getting Started with Java EE 7" by Arun Gupta

Slides – http://www.slideshare.net/arungupta1/…

IRC Chat – https://docs.google.com/document/d/1W…

Abstract: The Java EE 7 platform focuses on Productivity and HTML5. JAX-RS 2 adds a new Client API to invoke the RESTful endpoints, allows asynchronous client/server, and server-side content negotiation. noch 259 Wörter

Programming

Get External/Local Ip regardless to Network Device in Linux

#!/bin/bash
# Date:     January 2015
# Author:  Hanine HAMZIOUI
# Usage:    Get the Machine IP. Commands are fallbacks
#           Just do: $~ bash ip.sh or bash.sh local/private/host
 
COM1=$(dig +short myip.opendns.com @resolver1.opendns.com 2>/dev/null)
COM2=$(hostname -i 2>/dev/null)
COM3=$(ip route show 2>/dev/null | grep src | grep -vE 'eth1.*|lo' |  awk -Fsrc '{print $2}' | sed -e 's/ //g')
COM4=$(curl -s monip.org 2>/dev/null | grep -o -E '(+\.){3}+')
COM5=$(host `hostname -f 2>/dev/null` | awk -Fddress '{print $2}' | sed 's/ //g')
COM6=$(for i in eth0 em1 bond0; do inf=`ip -4 addr show dev $i 2>/dev/null | grep inet -m1 | cut -d/ -f1 | awk '{ print $2}'`;if [[ "$inf" =~ ?* ]]; then echo "$inf";fi ;done)
if [[ "$1" =~ local ]] ;then
    COM1=$COM3
fi
if [[ "$1" =~ private ]] ;then
    COM1=$COM2
fi
if [[ "$1" =~ host ]] ;then
    COM1=$COM5
fi
IP=''
validip()
{
    local  ip=$1
    local  stat=1
 
    if [[ $ip =~ ^{1,3}\.{1,3}\.{1,3}\.{1,3}$ ]]; then
        OIFS=$IFS
        IFS='.'
        ip=($ip)
        IFS=$OIFS
        [[ ${ip[0]} -le 255 && ${ip[1]} -le 255 && ${ip[2]} -le 255 && ${ip[3]} -le 255 ]]
        stat=$? noch 104 Wörter
Java EE

Java EE Interceptors

History

I think it’s important to take a look at the evolution of Interceptors in Java EE because of the simple fact that it started as an EJB-specific item and later evolved into a separate spec which is now open for extension by other Java EE specifications. noch 814 Wörter

Interceptors

Java EE Batch Framework - Step 3 Reader

This section will cover the batch Reader.  The reader has two main functions of importance.  The first is the open method that will setup the checkpoint and set the iterator to the correct item.   noch 614 Wörter

MongoDB

Java EE Batch Framework - Step 2 Check Point

In this section we will discuss the check point.  The check point is a serializable  object that contains that serves as the bookmark for the batch work flow.   noch 211 Wörter

MongoDB

Java EE Batch Framework - Step 1 Project Setup

To get started, we setup the project using the Netbeans IDE and the Glassfish server.

Project Setup

1)      Within the Netbeans IDE, choose NEW -> Project -> Java Web -> Wen Application and select Next. noch 310 Wörter

Batch