Quick Tip: Spring REST Utility for Current HTTP Request

Utility Method for Spring REST

 public static HttpServletRequest getCurrentRequest() {
     RequestAttributes requestAttributes = RequestContextHolder.getRequestAttributes();
     Assert.state(requestAttributes != null, "Could not find current request via RequestContextHolder");
     Assert.isInstanceOf(ServletRequestAttributes.class, requestAttributes);
     HttpServletRequest servletRequest = ((ServletRequestAttributes) requestAttributes).getRequest();
     Assert.state(servletRequest != null, "Could not find current HttpServletRequest");
     return servletRequest;
 }

Sometimes it’s easier to get the underlying Servlet request to get some headers or variables.

 final String userIpAddress = getCurrentRequest().getRemoteAddr();
 final String userAgent = getCurrentRequest().getHeader("user-agent");

This is used in the simple REST service using HTTP Post verb @ the awesome CloudFoundry:

(Source)

Tool for Creating Your Test JSON.

Spring Boot Documentation

 

Quick Tip: Maven Cleaning

Purge Cache

Or you can manually delete all or some of the directories under your .m2 directory.

We find if anything majorly changes in a few related modules, this is the safest course of action.   Delete all directories, delete .m2 directories, fresh clone from Git, mvn clean and enjoy.

Quick Links: Modern Tools for Modern Big Data Applications

Modern Front-End Tools (Front-End Build Wars)

A ton of great tools for running tons of tasks and building modern front-ends.   These are to the front what maven and gradle are to the back.
Build Wars: Gulp vs Grunt
Spring-cleaning Unused CSS With Grunt, Gulp, Broccoli or Brunch
Yeoman – Modern workflows for modern webapps
Environment-specific Builds With Grunt, Gulp or Broccoli
Gulp, Grunt, Whatever – Pony Foo
Brunch | ultra-fast HTML5 build tool
Modern Web Apps (Java 8 + AngularJS + Spring 4 + Gradle)
trackr: An AngularJS app with a Java 8 backend – Part I | techdev Solutions
trackr: An AngularJS app with a Java 8 backend – Part II | techdev Solutions
Pagination with Spring Data and HATEOAS in an AngularJS app | Patrick Grimard’s Java Blog
Modern Rapid Development and Production Deployment Tools (Spring Boot, Spring 4)
joshlong/bookmarks
joshlong/boot-examples
joshlong/boot-it-up
RestController in Spring 4.0
Spring 4 Tutorials
Spring Transaction Management
Spring Framework 4 on Java 8 // Speaker Deck
Pivotal presentations channel
Big Data (Spring with Hadoop)
SpringOne2GX 2013 Replay: Real Time Analytics with Spring
SpringOne2GX 2013 Replay: Hadoop – Just the Basics for Big Data Rookies
dzone.com – Seven Databases in Seven Weeks: Hbase, Day 2
Apache Solr real-time live index updates at scale with Apache Hadoop | Java Code Geeks
Modern Cloud Development and Hosting (Cloud Foundry)
Run Your Java Code on Cloud Foundry – Andy Piper (Pivotal)
clds.sdsc.edu/sites/clds.sdsc.edu/files/Pivotal_DS_supercomputing2013.pdf
Run the site on Cloud Foundry · spring-io/sagan Wiki
Pivotal Resources 
A real-time architecture using Hadoop and Storm @ JAX London
Spring Boot with Groovy and Friends
HyperLogLog – Wikipedia, the free encyclopedia
The lost outpost | a weblog by Andy Piper about technology, photography, and life
Installing a Hadoop Cluster with three Commands | codecentric Blogcodecentric Blog
Using Ambari Blueprints to automatically provision and install the Lambda Architecture | codecentric Blogcodecentric Blog
3 lessons in database design from the team behind Twitter’s Manhattan — Tech News and Analysis
Bloom filter – Wikipedia, the free encyclopedia
Hadoop Tips: Bloom Filters in HBase and Chrome
Enterprise-ready production-ready Java batch applications powered by Spring Boot | codecentric Blogcodecentric Blog
MapReduce Introduction – Tutorial
Scaling SQL with Redis – David Cramer’s Blog
HBase – Apache HBase™ Home
Work with Hadoop and NoSQL Databases with Toad for Cloud – ReadWrite
Google Research Publication: MapReduce
Overview | Postgres-XL
headissue/cache2k-benchmark
In 45 Min, Set Up Hadoop (Pivotal HD) on a Multi-VM Cluster & Run Test Data | Pivotal P.O.V.
BOSH Components | Cloud Foundry Docs
Pivotal Open Source Hub (San Francisco, CA) – Meetup
WebScaleSQL | “We’re Gonna Need A Bigger Database”
Eight Terminal Utilities Every OS X Command Line User Should Know · mitchchn.me
Report: NoSQL Databases – Providing Extreme Scale and Flexibility — Gigaom Research
HDFS Architecture
PostgreSQL: PostgreSQL 9.4 Beta 1 Released
Using Redis at Pinterest for Billions of Relationships | Pivotal P.O.V.
Replication, Clustering, and Connection Pooling – PostgreSQL wiki
Hadoop Content on InfoQ
dzone.com – JSON on Hadoop Example for Extending HAWQ Data Formats Using Pivotal eXtension Framework (PXF)
When should I use Greenplum Database versus HAWQ? | PivotalGuru
dzone.com – In 45 Min, Set Up Hadoop (Pivotal HD) on a Multi-VM Cluster & Run Test Data
PostgreSQL: Documentation: 9.3: High Availability, Load Balancing, and Replication
PostgreSQL – Wikipedia, the free encyclopedia
The Hadoop Ecosystem Table
Pivotal Hadoop Distribution and HAWQ Realtime Query Engine | Architects Zone
momjian.us/main/writings/pgsql/replication.pdf
dzone.com – EMC World 2014: Pivotal and Isilon Take Hadoop Prime Time in the Enterprise
dzone.com – Pivotal ship Hadoop distro complete with ‘world’s fastest’ SQL query engine
dzone.com – Pivotal Hadoop Distribution and HAWQ Realtime Query Engine
HAWQ | Pivotal P.O.V.
Cloud Foundry Eclipse Plugin | Pivotal Docs
dzone.com – Transform Your Skills: Simple Steps to Set Up SQL on Hadoop
dzone.com – What Makes Hadoop So Important & How To Gain Business Value From It
Search Results For: hadoop pivotal
Cloud Foundry Environment Variables | Cloud Foundry Docs
PCC Installation Checklist | Pivotal Docs
Pivotal Web Services Documentation | Pivotal CF Docs
Hadoop Tutorials from Hortonworks
Tips for Java Developers | Cloud Foundry Docs
Spring for Apache Hadoop
Spring Framework Reference Documentation
16. Web MVC framework
cloudfoundry/java-test-applications
Getting Started with Pivotal Web Services | Pivotal CF Docs
6 Easy Steps: Deploy Pivotal’s Hadoop on Docker | Pivotal P.O.V.
cloudfoundry/java-buildpack-dependency-builder
Pivotal-Field-Engineering/checkgreenplum
Pivotal-Field-Engineering/groovy-sqlfire
OpenTSDB – A Distributed, Scalable Monitoring System
Pivotal-Field-Engineering/pxf-field
Pivotal-Field-Engineering/tcollector
Pivotal-Field-Engineering/pmr-common
Pivotal-Field-Engineering/cf-scale-boot
Pivotal-Field-Engineering/gemfire-bosh-release
Big Data Benchmark
vFabric/vFabricReferenceArchitecture
vFabric
Pivotal-Field-Engineering/benchmark
Pivotal-Field-Engineering/retail-demo-xd
gopivotal/spring-travel-app
gopivotal/SpringTraderHD
gopivotal/pivotal-samples
Pivotal Web Services

Quick Links: Hibernate / JPA Testing Strategies

http://www.mkyong.com/hibernate/how-to-configure-log4j-in-hibernate-project/

http://damnhandy.com/2008/08/20/hibernate-and-and-the-found-two-representations-of-same-collection-error/

http://www.infoq.com/articles/testing-in-spring

https://github.com/michaelyaakoby/testfun

http://www.oracle.com/technetwork/articles/java/unittesting-455385.html

http://webcache.googleusercontent.com/search?q=cache:ZXg8qoRBYcMJ:struberg.wordpress.com/2012/03/27/unit-testing-strategies-for-cdi-based-projects/+&cd=1&hl=en&ct=clnk&gl=us

https://github.com/struberg/lightweightEE/blob/master/backend/src/test/java/de/jaxenter/eesummit/caroline/backend/test/CdiContainerTest.java

http://blog.novatec-gmbh.de/unit-testing-jee-applications-cdi/

https://ops4j1.jira.com/wiki/display/PAXEXAM3/Pax+Exam;jsessionid=884744B7143030CD229BB9105F0F482D

https://ops4j1.jira.com/wiki/display/PAXEXAM3/Maven+Dependencies

http://ocpsoft.org/jboss/cdi-powered-unit-testing-using-arquillian/

 

https://github.com/jbosstm/quickstart/tree/master/ArjunaJTA/maven
http://planet.jboss.org/post/cdi_powered_unit_testing_using_arquillian0

 

http://stackoverflow.com/questions/6469751/testing-an-ejb-with-junit
http://ejb3unit.sourceforge.net/
http://www.junitee.org/
http://www.caucho.com/articles/JavaEE6_Testing.pdf
http://myfaces.apache.org/extensions/cdi/
http://deltaspike.apache.org/container-control.html
http://ctpjava.blogspot.com/2009/10/unit-testing-ejbs-and-jpa-with.html
https://www.42lines.net/2011/11/21/adding-jpahibernate-into-the-cdi-and-wicket-mix/
http://www.murraywilliams.com/2012/04/maven-and-jpa-programming/
http://www.brainhemorage.com/?p=292
http://www.mastertheboss.com/cdi/cdi-and-jpa-tutorial
http://www.slideshare.net/agoncal/injection-with-cdi-in-15-minutes-29358389

 

Bootstrap CDI
http://antoniogoncalves.org/2011/01/12/bootstrapping-cdi-in-several-environments/

 

http://needle.spree.de/overview

 

https://community.jboss.org/wiki/CreatingUnitTestsWithWeldAndJunit4

 

http://deltaspike.apache.org/documentation.html#testing-snapshots

 

http://planet.jboss.org/post/cdi_powered_unit_testing_using_arquillian

 

http://jglue.org/cdi-unit/

 

http://www.javaworld.com/article/2099020/open-source-tools/integrating-arquillian-and-jbehave.html?source=IFWNLE_ifw_java_2014-02-25#tk.rss_all

 

https://github.com/matzew/spring-cdi-bridge

 

Test REST
https://opencast.jira.com/wiki/display/MH/Unit+Testing+REST+Endpoints

 

https://code.google.com/p/rest-assured/

 

http://www.tmro.net/2009/03/unit-test-jax-rs-using-java-6-and-junit-4/

 

http://hc.apache.org/

 

http://howtodoinjava.com/2013/08/03/jax-rs-2-0-resteasy-3-0-2-final-client-api-example/

 

REST Mock
https://github.com/robfletcher/betamax

 

http://download.eclipse.org/recommenders/updates/stable/

 

https://github.com/forge/core#jboss-forge-20
http://download.jboss.org/jbosstools/builds/staging/jbosstools-forge_master/all/repo/

 

http://projectlombok.org/

 

Quick Note: SSL with SOAP and SOAPUI

For doing SSL with SOAP, there’s a few things you need to setup.

C:Program Files (x86)SmartBearsoapUI-Pro-4.5.1jrelibsecurity

Also did it at the main jre at C:Program Files (x86)Javajre7libsecurity

keytool -genkey -alias svs -keyalg RSA -keystore keystore.jks -keysize 2048
git config --global core.autocrlf true
javax.net.ssl.trustStore=<>
javax.net.ssl.trustStorePassword=<>
If these properties are not set, the default ones will be picked up from your the default location.[$JAVA_HOME/lib/security/jssecacerts, $JAVA_HOME/lib/security/cacerts]

To view the contents of keystore file, use

keytool -list -v -keystore file.keystore -storepass changeit
To debug the ssl handshake process and view the certificates, set the VM parameter -Djavax.net.debug=all
keytool -genkey -keyalg RSA -alias selfsigned -keystore keystore.jks -storepass changeit -validity 360 -keysize 2048
-Djava.net.preferIPv4Stack=true
added to soapui.bat
C:Program Files (x86)SmartBearSoapUI-4.6.3bin
-Djavax.net.debug=ssl,trustmanager

http://www.sslshopper.com/article-how-to-create-a-self-signed-certificate-using-java-keytool.html

openssl s_client -showcerts -host webservices-cert.storedvalue.com -port 443
keytool -keystore clientkeystore -genkey -alias client
wsdl2java.bat -uri my.wsdl -o svsproj -p com.agilemobiledeveloper.service -d xmlbeans -t -ss -ssi -sd -g -ns2p
System.setProperty("javax.net.ssl.keyStore", keystore.jks");
System.setProperty("javax.net.ssl.keyStorePassword", "changeit");
System.setProperty("javax.net.ssl.trustStore", "clientkeystore");
System.setProperty("javax.net.ssl.trustStorePassword", "changeit");
setx -m JAVA_HOME "C:Program FilesJavajdk1.7.0_51″
setx -m javax.net.ssl.keyStore "keystore.jks");
setx -m javax.net.ssl.keyStorePassword "changeit");
setx -m javax.net.ssl.trustStore "keystore.jks");
setx -m javax.net.ssl.trustStorePassword "passwordislong");

Quick Tip: Using JBoss Forge 2.4.1

JBOSS Forge 2.4.1
C:toolsforge-distribution-2.4.1.Finalbin

set forge
JAVA_HOME=”/C/Program Files/Java/jdk1.7.0_51″
FORGE_HOME=”/C/tools/forge-distribution-2.4.1.Final”

use git bash
forge –install core
forge –install shell
forge
uses forge
forge
build
addon-git-install –url https://github.com/forge/angularjs-addon.git

forge –install groupId:artifactId,version

C:forgeprojectsbaconlandia
mvn package install

Quick Links: C# to Java and .Net to JVM

Convert C# to Java

  • <a style="color: #047ac6;” href=”http://www.cs2j.com/download/”>http://www.cs2j.com/download/
  • <a style="color: #047ac6;” href=”http://csharpjavamerger.org/download.html”>http://csharpjavamerger.org/download.html
  • <a style="color: #047ac6;” href=”http://jni4net.sourceforge.net/”>http://jni4net.sourceforge.net/
  • <a style="color: #047ac6;” href=”http://sourceforge.net/projects/j2cstranslator/”>http://sourceforge.net/projects/j2cstranslator/
  • <a style="color: #047ac6;” href=”http://sourceforge.net/apps/mediawiki/j2cstranslator/index.php?title=Main_Page”>http://sourceforge.net/apps/mediawiki/j2cstranslator/index.php?title=Main_Page

<

p style=”color: #000000″>
java to msmq

  • <a style="color: #047ac6;” href=”https://msmqjava.codeplex.com/”>https://msmqjava.codeplex.com/
  • <a style="color: #047ac6;” href=”http://sourceforge.net/projects/javamsmq/”>http://sourceforge.net/projects/javamsmq/
  • <a style="color: #047ac6;” href=”http://sourceforge.net/projects/jms-msmq/”>http://sourceforge.net/projects/jms-msmq/

<

p style=”color: #000000″>
Zing JVM

  • <a style="color: #047ac6;” href=”http://www.azulsystems.com/products/zing/whatisit”>http://www.azulsystems.com/products/zing/whatisit
  • <a style="color: #047ac6;” href=”http://www.azulsystems.com/products/zing/how-to-evaluate”>http://www.azulsystems.com/products/zing/how-to-evaluate
  • <a style="color: #047ac6;” href=”http://www.azulsystems.com/sites/default/files/images/What_Zing_Can_Do_v4.pdf”>http://www.azulsystems.com/sites/default/files/images/What_Zing_Can_Do_v4.pdf
  • <a style="color: #047ac6;” href=”http://www.infoq.com/news/2013/05/lmax-zing”>http://www.infoq.com/news/2013/05/lmax-zing

 

Quick Note: liquibase – agile database toola

Liquibase

Liquibase Documentation

For Oracle, use the latest JDBC Driver:  ojbc7.jar

 cd C:toolsliquibase-3.1.1-bin
 liquibase --classpath=ojdbc7.jar --driver=oracle.jdbc.OracleDriver --url=jdbc:oracle:thin:@//SERVER:PORT/SERVICENAME --username=USERNAME--password=PASSWORD--referenceUrl=jdbc:oracle:thin:@//QASERVER:QAPORT/QASERVICENAME diff --referenceUsername=QAUSER --referencePassword=QAPASS
liquibase --classpath=ojdbc7.jar --driver=oracle.jdbc.OracleDriver --url=jdbc:oracle:thin:@//SERVERNAME:PORT/EORDD --username=USERNAME--password=PASSWORD--changeLogFile=change.xml dbDoc docs

Liquibase is a very cool utility for migrating and managing database changes between platforms.  It works well with open source database and proprietary databases like Oracle.

Quick Note: Object Mapping Frameworks for Java

Object Mapping
For transforming object to object, often for JAXB Pojo to DTO or JPA Entity to JSON Pojo for web services.     Orika is proving very helpful and fast for a number of use cases for mapping big objects without a ton of boilerplate (and error prone) copying.   Now if there was only a JUnit builder with this…

 

Quick Notes: Security with soap

<?xml version=”1.0″ encoding=”UTF-8″ standalone=”yes”?>
<javaee:handler-chains
xmlns:javaee=”http://java.sun.com/xml/ns/javaee”
xmlns:xsd=”http://www.w3.org/2001/XMLSchema”>
<javaee:handler-chain>
<javaee:handler>
<javaee:handler-class>UserNameTokenInjectHandler</javaee:handler-class>
</javaee:handler>
</javaee:handler-chain>
</javaee:handler-chains>

 

package webservice.client;

import java.util.Set;

import javax.xml.namespace.QName;
import javax.xml.soap.SOAPElement;
import javax.xml.soap.SOAPEnvelope;
import javax.xml.soap.SOAPException;
import javax.xml.soap.SOAPFactory;
import javax.xml.soap.SOAPHeader;
import javax.xml.soap.SOAPMessage;
import javax.xml.ws.handler.MessageContext;
import javax.xml.ws.handler.soap.SOAPHandler;
import javax.xml.ws.handler.soap.SOAPMessageContext;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* @author tim
*
*/
public class UserNameTokenInjectHandler implements SOAPHandler<SOAPMessageContext> {

private static final Logger log = LoggerFactory.getLogger(UserNameTokenInjectHandler.class);

@Override
public boolean handleMessage(SOAPMessageContext context) {
if (context != null) {
log.debug(Constants.HANDLE_MESSAGE_ERROR, context.toString());
}
else {
return true;
}

Boolean isRequest = (Boolean) context.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY);

// if this is a request, true for outbound messages, false for inbound
if (isRequest) {

try {
context.put(Constants.REQUEST_TIME_OUT,Constants.TIMEOUT);
context.put(Constants.RECEIVE_TIME_OUT, Constants.TIMEOUT);
} catch (Exception e) {
log.error(Constants.TIMEOUT_ERROR_MESSAGE, e);
}
try {
SOAPMessage soapMsg = context.getMessage();
SOAPEnvelope soapEnv = soapMsg.getSOAPPart().getEnvelope();
SOAPHeader soapHeader = soapEnv.getHeader();

// if no header, add one
if (soapHeader == null) {
soapHeader = soapEnv.addHeader();
}
SOAPFactory soapFactory = SOAPFactory.newInstance();

// WSSecurity <Security> header
SOAPElement wsSecHeaderElm = soapFactory.createElement(
SVSConstants.SOAP_ENV_HEADER_LOCAL_NAME,
SVSConstants.SOAP_ENV_HEADER_PRE,
SVSConstants.SOAP_ENV_HEADER_XML_NS);
SOAPElement userNameTokenElm = soapFactory.createElement(Constants.SOAP_ENV_HEADER_USERNAME_TOKEN,
SVSConstants.SOAP_ENV_HEADER_PRE,
SVSConstants.SOAP_ENV_HEADER_XML_NS);
SOAPElement userNameElm = soapFactory.createElement(Constants.SOAP_ENV_HEADER_USERNAME_ELEMENT,
SVSConstants.SOAP_ENV_HEADER_PRE,
SVSConstants.SOAP_ENV_HEADER_XML_NS);
userNameElm.addTextNode(Constants.WSSE_USERNAME);

SOAPElement passwdElm = soapFactory.createElement(Constants.SOAP_ENV_HEADER_PASSWORD_ELEMENT,
SVSConstants.SOAP_ENV_HEADER_PRE,
SVSConstants.SOAP_ENV_HEADER_XML_NS);
passwdElm.addTextNode(Constants.WSSE_PASSWORD);

userNameTokenElm.addChildElement(userNameElm);
userNameTokenElm.addChildElement(passwdElm);

// add child elements to the root element
wsSecHeaderElm.addChildElement(userNameTokenElm);

// add SOAP element for header to SOAP header object
soapHeader.addChildElement(wsSecHeaderElm);

soapMsg.saveChanges();
soapMsg.writeTo(System.out);
} catch (SOAPException e) {
log.error(SVSConstants.SOAP_ERROR_MESSAGE, e);
} catch (Exception e) {
log.error(SVSConstants.SOAP_ERROR_MESSAGE, e);
}
}
// continue other handler chain
return true;
}

@Override
public void close(MessageContext arg0) {
return;
}

@Override
public boolean handleFault(SOAPMessageContext context) {
try {
if (context != null) {
SOAPMessage soapMsg = context.getMessage();
soapMsg.writeTo(System.out);
log.debug(Constants.SOAP_HANDLE_FAULT_MESSAGE, soapMsg.toString());
}
} catch (Exception e) {
log.error(Constants.SOAP_HANDLE_FAULT_MESSAGE2, e);
}
return true;
}

@Override
public Set<QName> getHeaders() {
return null;
}
}

Big Data Links (16-May-2014) – Hadoop, Redis, SQLFire, HDFS, Pivotal HD

Map Reduce

MEAN 2

MEAN Stack Starters

Developing an Example MEAN Application on Windows

E:meanprojectsmean> npm install

npm http 200 https://registry.npmjs.org/mpromise/0.2.1
npm http 200 https://registry.npmjs.org/regexp-clone/0.0.1
npm http GET https://registry.npmjs.org/mongodb/-/mongodb-1.3.11.tgz
npm http 200 https://registry.npmjs.org/mpath/0.1.1

npm http GET https://registry.npmjs.org/mpromise/-/mpromise-0.2.1.tgz
npm http GET https://registry.npmjs.org/regexp-clone/-/regexp-clone-0.0.1.tgz
npm http GET https://registry.npmjs.org/mpath/-/mpath-0.1.1.tgz
npm http 200 https://registry.npmjs.org/sliced/-/sliced-0.0.3.tgz
npm http 200 https://registry.npmjs.org/hooks/-/hooks-0.2.1.tgz
npm http 200 https://registry.npmjs.org/muri/-/muri-0.3.1.tgz
npm http 200 https://registry.npmjs.org/mongodb/-/mongodb-1.3.11.tgz
npm http 200 https://registry.npmjs.org/mpromise/-/mpromise-0.2.1.tgz
npm http 200 https://registry.npmjs.org/regexp-clone/-/regexp-clone-0.0.1.tgz
npm http 200 https://registry.npmjs.org/mpath/-/mpath-0.1.1.tgz
npm http GET https://registry.npmjs.org/wordwrap
npm http 304 https://registry.npmjs.org/wordwrap
npm http GET https://registry.npmjs.org/mailcomposer/0.1.34
npm http GET https://registry.npmjs.org/simplesmtp/0.3.4
npm http 200 https://registry.npmjs.org/simplesmtp/0.3.4
npm http GET https://registry.npmjs.org/simplesmtp/-/simplesmtp-0.3.4.tgz
npm http 200 https://registry.npmjs.org/mailcomposer/0.1.34
npm http GET https://registry.npmjs.org/mailcomposer/-/mailcomposer-0.1.34.tgz
npm http 200 https://registry.npmjs.org/simplesmtp/-/simplesmtp-0.3.4.tgz
npm http 200 https://registry.npmjs.org/mailcomposer/-/mailcomposer-0.1.34.tgz

E:meanprojectsmean>bower install
bower cloning git://github.com/angular/bower-angular-cookies.git
bower cloning git://github.com/angular/bower-angular-resource.git
bower cloning git://github.com/angular-ui/bootstrap-bower.git
bower cloning git://github.com/angular/bower-angular.git
bower caching git://github.com/angular-ui/bootstrap-bower.git
bower cached git://github.com/angular/bower-angular.git
bower fetching angular
bower cached git://github.com/angular/bower-angular-cookies.git
bower fetching angular-cookies
bower fetching angular-resource
bower cached git://github.com/angular/bower-angular-resource.git
bower cloning git://github.com/twitter/bootstrap.git
bower cloning git://github.com/bestiejs/json3.git
bower cloning git://github.com/angular/bower-angular-mocks.git
bower cloning git://github.com/angular/bower-angular-scenario.git
bower caching git://github.com/twitter/bootstrap.git
bower cloning git://github.com/components/jquery.git
bower cached git://github.com/angular/bower-angular-mocks.git
bower fetching angular-mocks
bower cached git://github.com/angular/bower-angular-scenario.git
bower fetching angular-scenario
bower cached git://github.com/bestiejs/json3.git

Please note that
angularJS-IL requires jquery ~1.9.1
bootstrap requires jquery ~1.8.0

Resolved to jquery v1.9.1, which matches the requirement defined in the project’
s bower.json.
Conflicts may occur.
bower installing jquery#1.9.1

Tweaked config/config.js

development: {
db: ‘mongodb://

to point to mongolab and include name:password@

> node server

Test locally with http://localhost:3000

 

mean

For the Angular-App example:

npm install -g grunt-cli karma
cd server
npm install
cd ..
cd client
npm install
cd ..
..... configuration .....
cd client
grunt build
grunt test-watch
cd ..
cd server
node server.js

We will be deploying the application to AppFog, CloudBees, OpenShift, Mongolab, MongoHQ and Heroku.  All PAAS clouds have great support for Node.js.

Deployed Cloud Apps:

References:

TDD With MEAN

LEAN Process and LEAN UX

 

AngularJS

 

ExpressJS

 

MongoDB and Mongoose 

 

 

Migrating to Spring 4

Spring 4 is now stable enough to forget about Spring 3.2 and move on.  With support for all the current and newest SE and EE Java technologies,

it is now time to embrace this upgrade.

For personal projects I have started and the excellent Spring Boot as a help.  For commercial work, we are replacing are maven dependencies now.

References

 

picture-297029

Recent Interesting Enterprise Java Articles

Enterprise REST
http://martinfowler.com/articles/enterpriseREST.html

Visual JVM, MissionControl, Jconsole
http://visualvm.java.net/
http://visualvm.java.net/eclipse-launcher.html
https://visualvm.java.net/gettingstarted.html

JPA Tx
http://apmblog.compuware.com/2010/09/14/week-38-transactions-in-a-jpa-world/
http://www.adam-bien.com/roller/abien/entry/don_t_use_jpa_s
http://java.dzone.com/articles/jpa-performance-optimization
http://java.dzone.com/sites/all/files/Table1.png
http://apmblog.compuware.com/2009/11/12/w-jax-jpa-under-the-hood/
http://en.wikibooks.org/wiki/Java_Persistence/Advanced_Topics
http://docs.jboss.org/hibernate/core/4.3/manual/en-US/html_single/#configuration-j2ee
org.hibernate.transaction.JBossTransactionManagerLookup JBoss AS
http://www.developerfusion.com/article/84945/flush-and-clear-or-mapping-antipatterns/
http://java.dzone.com/articles/jpa-performance-optimization

Hibernate Monitoring
— you can monitor a sessionfactory via JMX
— or call getStatistics
http://docs.jboss.org/hibernate/core/4.3/manual/en-US/html_single/#performance-monitoring

Testing DB via JMeter
http://jmeter.apache.org/usermanual/build-db-test-plan.html

Java Load Testing Framework
http://grinder.sourceforge.net/
http://gatling-tool.org/

Debugging c3p0 pool
http://www.mchange.com/projects/c3p0/#configuring_to_debug_and_workaround_broken_clients

Visualize EE
http://mvnrepository.com/artifact/de.struller-baumann/visualee

Document Your APIs
http://www.infoq.com/research/api-documentation?utm_source=infoqEmail&utm_medium=WeeklyNL_ResearchContent&utm_campaign=110513news
https://developers.helloreverb.com/swagger/
http://jashkenas.github.io/docco/

JBoss/JEE Tips
http://mastertheboss.com/jboss-as-7/a-thread-pattern-for-jboss-enterprise-applications
http://mastertheboss.com/resteasy/restful-web-services-on-jboss-as-7
http://mastertheboss.com/cdi/cdi-and-jpa-tutorial
http://mastertheboss.com/quickstart-tutorials-hibernate/jpa/jpa-21-tutorial
http://mastertheboss.com/jboss-performance/jboss-as-7-performance-tuning/page-2
http://mastertheboss.com/jboss-performance/jboss-as-7-performance-tuning

Java Leader
http://blog.arungupta.me/

p6 Spy for JDBC Interception
http://sourceforge.net/projects/p6spy/
http://www.mastertheboss.com/jboss-datasource/how-to-trace-jdbc-statements-with-jboss-as

JDBC/JBoss/Hibernate/JPA Performance
http://mastertheboss.com/jboss-performance/jboss-performance-tuning-part-2
http://mastertheboss.com/jboss-performance/jboss-performance-tuning-part-1
http://mastertheboss.com/jboss-performance/jboss-performance-tuning-part-1/page-3
http://people.redhat.com/alikins/system_tuning.html
https://community.jboss.org/wiki/JBossASTuningSliming
http://mastertheboss.com/jboss-performance/jboss-as-7-performance-tuning/page-4
http://mastertheboss.com/jboss-performance/jboss-as-7-performance-tuning/page-6