Thursday, June 13, 2013

Oracle released Java 7 EE with HTML5 support

Java keeping pace with innovation and changes in the enterprise world.

Story at

* Infoworld -
Oracle releases HTML5-focused Java EE 7
 (http://www.infoworld.com/t/java-programming/oracle-releases-html5-focused-java-ee-7-220626)

* eWeek -
Oracle Delivers Java EE 7 With HTML5 Support
(http://www.eweek.com/developer/oracle-delivers-java-ee-7-with-html5-support/)

It claimed to have support for HTML5, with better JSON support, changes to JMS 2.0 etc. NetBean 7.3.1 and Eclipse Kepler will support it.

Thursday, May 30, 2013

5 thing for 2013

In this post - "5 Things a Java Developer Should Consider This Year" http://architects.dzone.com/articles/5-things-java-developer-should
>, Author Manu PK captured exactly my thoughts. This was first published in Feb 2013, caught my attention today. Intend to do all ASAP.
In summary:

1. Create an application using a NoSQL Data store and connect it with Java
2. Get the first app on Java PaaS on Cloud and ask your 5 friends to use it. 
3. What really is Software Design?
4. Learn a new Programming Language and create a sample project
5. Contribute to the community


Wednesday, November 30, 2011

Service Wrapper for Java

From Wikipedia (http://en.wikipedia.org/wiki/Service_wrapper) (Nov 30, 2011)
A service wrapper is a computer program that wraps arbitrary programs thus enabling them to be installed and run as Windows Services or Unix Daemons, programs that run in the background, rather than under the direct control of a user. They are often automatically started at boot time. Arbitrary programs cannot run as services or daemons, unless they fulfill specific requirements which depend on the operating system. They also have to be installed in order for the operating system to identify them as such.
Examples:
* Apache Daemon (http://commons.apache.org/daemon/)
* Launch4j (http://launch4j.sourceforge.net/)
* Java Service Wrapper (http://wrapper.tanukisoftware.com/doc/english/introduction.html)
* YAJSW (http://yajsw.sourceforge.net/)

Monday, June 28, 2010

Service component architecture (SCA)

Service Component Architecture (SCA) is emerging standard which aims to provide a model for the creation of service components in a wide range of languages and a model for assembling service components into a business solution [1].

The SCA specification is divided into a number of documents, each dealing with a different aspect of SCA [4]. Like, the Assembly Model describes wiring components. The Assembly Model is independent of implementation. The Client and Implementation specification deals with the implementation of services and of service clients -- SCA has published specifications for BPEL, C++, Spring and Java component implementation specifications.

List of current SCA specification can be found at OSOA's website at - http://www.osoa.org/display/Main/Service+Component+Architecture+Specifications. Most of the specifications published in 2007. I am still trying to figure out what is the current status of SCA.


References:

[1] Service Component Architecture (SCA) (http://www.oasis-opencsa.org/sca)

[2] What is Service Component Architecture? Is it an alternative to SOA or is it an addition? (http://blog.softwareag.com/index.php/2008/06/10/what-is-service-component-architecture-is-it-an-alternative-to-soa-or-is-it-an-addition/)

[3] Service component architecture - Wikipedia Page (http://en.wikipedia.org/wiki/Service_component_architecture)


[4] Service Component Architecture (http://www.ibm.com/developerworks/library/specification/ws-sca/)

[5] Service Component Architecture Specifications (http://www.osoa.org/display/Main/Service+Component+Architecture+Specifications)

Friday, June 25, 2010

5 thing about Jars - From IBM Developerworks

From IBM Developerworks - 5 things you didn't know about ... JARs

1. JARs are executable: Manifest file can be modified to specify which class to launch when executing JAR. User then just have to execute JAR, at command line or simply by double clicking it.

2. JARs can include dependency information: Manifest allows declaration of JAR dependencies using "Class-path" attribute. This implicitly creates the CLASSPATH without having to declare it.

3. JARs can be implicitly referenced: Use "extension directory", the lib/ext directory, underneath JRE location.

4. Java 6 allows classpath wildcards

5. JARs hold more than code: For example, configuration files like Hibernate mappings.




Powered by ScribeFire.

Inspiring talk from Kathy Sierra

Another inspiring talk from Kathy Sierra

Thanks to blog - Frank Carver's Punch Barrel

Follow her secret answer. Pretty interesting views and so inspiring.


Powered by ScribeFire.

Sunday, August 30, 2009

Auto Tweet on Twitter Using Java @PCQuest

Article: Auto Tweet on Twitter Using Java
Author: Rahul Sah
Link: http://pcquest.ciol.com/content/Developer/2009/109070401.asp
Summary:
Twitter4J is a Java library for Twitter API. It is completely implemented in Java and spares you the hassles of creating your own wrapper for Twitter APIs for your Java application to access Twitter. This article shows how you can it be used to access Twitter through a Servlet Web application.

Additional Link: Twitter4J (http://yusuke.homeip.net/twitter4j/en/index.html)

Powered by ScribeFire.

Saturday, August 29, 2009

How to Use Spring Web Service @JavaLobby

A How-To article (http://java.dzone.com/articles/spring-ws-how) to expose a simple web service using Spring Web Services at JAVALOBBY (http://java.dzone.com) - author Biju Kunjummen.



Powered by ScribeFire.

Monday, August 10, 2009

Spring source bought by VMware

Two companies or rather movements I have come to admire, are coming together. Spring source have been bought up by VMware.

See link: VMware to Buy SpringSource for $420M at Gigaom.com


Powered by ScribeFire.

Monday, November 10, 2008

Article on REST WebServices

Jeremy Deane of Collaborative Consuluting has two part article "RESTful Web Services: Development and Testing
" published at bpminstitute.org. Article covers introduction of REST Web Services and explains development of an example using Restlet framework. Few points from that article -

REST (Represntational State Transfer)
 * Simpler than SOAP, has less steps than SOAP development.
 * Provides access to resources identified by URI using HTTP.
 * Resources are abstraction of information
 * Supports HTTP operations - GET, PUT, POST and DELETE (analogous to CRUD)
 * Each interacion updates the state (except GET).
 * Interactions are idempotent
 * Security is provided by authentication, authorization and auditing
 
Design considerations
 * What are the entities (resources)?
 * What are the resource representations formats?
 * How are entities related to each others (links)?
 * What ids resources (ids should be descriptive and scalable)?
 * How to use HTTP status code? (Should avoid for lose coupling between provider and consumer)
 
Important classes of Restlet framework
 * Converter
 * Router
 * Resource
 * Guard

Monday, November 03, 2008

Java WebServices Standards

Java Standards related to WebServices (Note: not in any particular order)

1. Java API for XML Web Services (JAX-WS) [JSR 224]
2. Java Architecture for XML Binding (JAXB) [JSR 222]
3. WSEE [JSR 109]
4. WS-Metadata [JSR 181]
5. Java Business Integration (JBI) [JSR 208]

Reference:
* SOA Using Java(TM) Web Services by Mark D. Hansen (http://soabook.com/)
* The JAVA EE5 Tutorial (http://java.sun.com/javaee/5/docs/tutorial/doc/)
* Java Standards at SearchSOA.com (http://searchsoa.techtarget.com/topics/0,295493,sid26_tax305810,00.html)

Tuesday, April 08, 2008

Portlet Specification V2.0 at IBM developerworks

Detailed article about portlet specification v2.0 at IBM developerworks -
What's new in the Java Portlet Specification V2.0 (JSR 286)?

Thursday, February 14, 2008

Proxy setting in Eclipse

I have been asked again - "Where is the proxy setting in Eclipse?"

In Eclipse 3.3 - Windows -> Preferences -> General -> Network Connections

In Eclipse 3.2 - Windows -> Preferences -> Internet -> Proxy Settings

Tuesday, February 05, 2008

Reference for JSF, Spring and JPA

I referred to Carol McDonald's Blog entry -
Sample Application using JSF, Spring 2.0, and Java Persistence APIs (http://weblogs.java.net/blog/caroljmcdonald/archive/2007/06/sample_applicat.html) for reference on JSF, Spring and JPA.


Powered by ScribeFire.

Monday, August 20, 2007

Eclipse Basic Shortcuts

Eclipse comes with basic tutorial and it could also be found online at -

http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse.jdt.doc.user/gettingStarted/qs-BasicTutorial.htm

Outlining few shortcuts for the some features explained there -

* Navigate Outline (Ctrl+O) 2 times for inherited items

* Content Assist (Ctrl+Space)

* Run As (Alt+Shift+X) Java Application +J

* Show line numbers -> Windows->Preferences->General->TextEditors

* Source > Organize Imports (Ctrl+Shift+O)

* Restore from local history

* Refactor (Alt+Shit+T)

* Creation and configuration of generated comments in the Java > Code Style > Code Templates preference page.

* Source (Alt+Shift+S) ->
+v: Override/Implement methods
+r: Generate Getters and Setters

* View declaration (Ctrl+G)

* View Type Hierarchy (Ctrl+T) or Navigate > Quick Type Hierarchy
Ctrl+T to toggle between supertype hierarchy and subtype hierarchy.

* Evaluating snippets: New > Other > Java > Java Run/Debug > Scrapbook Page

Wednesday, August 15, 2007

Integration Pattern

Integration is an essential part of most of the enterprise systems now a days. Here is a quick guide for enterprise integration patterns, nicely explained with diagrams :

Enterprise Integration Patterns - Table of Contents (http://www.enterpriseintegrationpatterns.com/toc.html)

This is Table of Contents for the book - Enterprise Integration Patterns (http://www.enterpriseintegrationpatterns.com/index.html) which explains each of
patterns in detail. A sample chapter of the book can be downloaded from:
http://www.enterpriseintegrationpatterns.com/docs/EnterpriseIntegrationPatterns_HohpeWoolf_ch03.pdf




Powered by ScribeFire.

Friday, July 06, 2007

Decoupling user and creator in Factory Pattern

It is a good idea to decouple user and creator in factory pattern. This technique is also mentioned as Simple Factory Pattern/Idiom.

Following is diagram from "Manufacturing Java Objects with the Factory Method Design Pattern by Barry Burd and Michael P. Redlich" (http://javaboutique.internet.com/tutorials/factory/) explaining basic factory pattern.


Here, Creator is also user of the Product. This creation and use is tightly coupled.

A "SimpleProductFactory" element can be added to Creator class (composition), which would be responsible of creating Product. Thus, decoupling use and creation of the Product.

Links:-
* Sun Developer Forums: Problem understanding Factory Method Pattern
* Manufacturing Java Objects with the Factory Method Design Pattern by Barry Burd and Michael P. Redlich (http://javaboutique.internet.com/tutorials/factory/)

Friday, June 15, 2007

JUNIT 4 Tutorial on IBM Developerworks

Look at Jump into JUnit 4 by Andrew Glover, for introduction on JUnit 4.
JUnit 4 is complete makeover of JUnit with excellent use of annotations. Working with test cases has been made easier by relaxing stringent requirements of earlier versions.
Tutorial covers fundamental concepts, new features along with examples.
Article do points that "Many argue that JUnit 4's use of annotations was influenced by TestNG as well as .NET's NUnit."

Other resources:

1. Junit offical website (http://www.junit.org/index.htm)
2. Junit 4.3 JavaDoc (http://www.junit.org/junit/javadoc/4.3/index.htm)
3. JUnit Reloaded by Ralf Stuckert on java.net (http://today.java.net/pub/a/today/2006/12/07/junit-reloaded.html)

Powered by ScribeFire.

Friday, March 23, 2007

Java: Static methods are not overriden

In Java, sub-class static method can have same signature as super-class static method. But it does not mean that super-class static method is overridden by sub-class static method. Look at the following code (from reference)
-------------------------------------------
/*

* SubClass.java

*

* Created on den 23 juni 2005, 21:13

*/

package sample;

/**

*

* @author Thomas

*/

public class SubClass extends SuperClass{

public static Long getStaticLongId(){

return 2L;

}

public Long getInstanceLongId(){

return 20L;

}

public static final void main(String args[]){

SubClass subClassInstance = new SubClass();

System.out.println("Static overloading:\t" +

SubClass.getStaticLongId() + "\t" +

SubClass.getStaticStringId());

System.out.println("Instance overloading:\t"+

subClassInstance.getInstanceLongId() + "\t" +

subClassInstance.getInstanceStringId());

}

}

/*

* SuperClass.java

*

* Created on den 23 juni 2005, 21:09

*/

package sample;

/**

*

* @author Thomas

*/

public class SuperClass {

public static Long getStaticLongId(){

return 1L;

}

public static String getStaticStringId(){

return getStaticLongId().toString();

}

public Long getInstanceLongId(){

return 10L;

}

public String getInstanceStringId(){

return getInstanceLongId().toString();

}
}
------------------------------------------------------

Output will be -
Static overloading: 2 1
Instance overloading: 20 20

For detailed reason about it, look at the reference.

As a side-note, if you put this code in eclipse, you will see little triangle by the side of overridden instance method "getInstanceLongId()". This sign will be missing for static method "getStaticLongId()".

Reference:
* Overriding static methods - why doesn´t it work?

Thursday, March 15, 2007

TSS Article on SOA

Article ESB, Service Implementation and the Return of the EJB on TheServerSide by Frank Teti, tells about SOA in general. Good to read, to know what different options you have in SOA.

It has also a mention about MULE (http://www.mulesource.com/), this open-source ESB solution has recently crossed 500K download mark (http://www.mulesource.com/company/press_releases/500K_011707.php).

Friday, August 11, 2006

Eclipse to test WSDL

With Eclipse you can test WSDL without writting code.
Link: http://help.eclipse.org/help32/topic/org.eclipse.jst.ws.consumption.ui.doc.user/tasks/ttestwsdl.html

Annotations in Java 1.5

Annotations are metadata used in source code to be interpreted by the tools and libraries without affecting the execution of the program. Annotations can be interpreted at compile-time or run-time. A use of annotation could be, mark a method as deprecated; use of deprecated can then be interpreted by the compiler to generate warnings. Another use could be pass configuration values for the tool to be process, generate or modify configuration files. Annotations are beneficial in documentation, code-analysis and compiler checking.

Example:
@deprecated public void foo(){}

Annotations consist of '@' sign followed by type of annotation and a parenthesized list of name-value pair of elements. Annotations can be used everywhere where other modifiers like public or static can be used. As a convention annotation is preceded by other modifiers.


Declaration of annotation type:
Example: public @interface breaksStandard {
public String reviewer();
public String reviewDate;
public String reason default "";}

Similar to interface declaration, modifier '@' sign prefixed to keyword interface. Return types can only be primitives, String, Class, enums and annotations (and arrays of these).

Usage: @breaksStandard(reviewer="XYZ", reviewDate="Aug 10, 2006") public void FOO(){}

Types:
1. In built annotations -
i. The Override annotation
ii. The Deprecated annotation
iii. The SuppressWarnings annotation

2. User Defined annotations

Categories:
1. Marker annotations
2. Single-value annotations
3. Full annotations

Meta-Annotation:
Annotations of annotations are meta-annotation. e.g. @Target, @Retention, @Documented.

Exercise: Work with @Deprecated or @Override annotation in Eclipse.

References:

[1] http://java.sun.com/j2se/1.5.0/docs/guide/language/annotations.html Annotations
[2] http://www-128.ibm.com/developerworks/java/library/j-annotate1/ , Annotations in Tiger, Part 1: Add metadata to Java code, Author: Brett McLaughlin
[3] http://www-128.ibm.com/developerworks/java/library/j-annotate2.html, Annotations in Tiger, Part 2: Custom annotations, Author: Brett McLaughlin
[4] http://www.infoq.com/articles/Annotation-Hammer Annotation Hammer, Author: Venkat Subramaniam
[5] http://www.javaworld.com/javaworld/jw-03-2005/jw-0321-toolbox.html An annotation-based persistence framework, Author:Allen Holub

Friday, July 14, 2006

Controversy controversy controversy

Its every where I see. So many links that I lost count. Can you guess what is IT??

* Richard Monson-Haefel: It's too late to save Java EE (http://www.infoq.com/news/Java-EE-Demise-Report)
* Is Java EE's Complexity Its Worst Enemy?(http://www.internetnews.com/dev-news/article.php/3618166)
* The Beginning of the End for Java Starts(Date.Time.NOW()); (http://www.oreillynet.com/windows/blog/2006/07/the_beginning_of_the_end_for_j.html)
* Analysts see Java EE dying in an SOA world (http://searchwebservices.techtarget.com/originalContent/0,289142,sid26_gci1198211,00.html)
* Analysts see Java EE dying in an SOA world (http://www.theserverside.com/news/thread.tss?thread_id=41283)

Controversies are good sometime. Personally I don't believe that JEE dying. My 2 cents, 'May the best one win'. People!! you have much choices now then say couple of years back. Evaluate and find which one fits best to you. May you choose JEE over others. Complexities will be there with all the Enterprise level projects. There are lot other factors to consider. Resources involved, total cost of ownership, return of investment, maintainability etc etc.

Wednesday, July 05, 2006

Links for eclipse 3.2 Callisto

Will add more soon
1. Eclipse Callisto http://www.eclipse.org/callisto/
2.
What's New in Eclipse 3.2 Java Development Tools http://www.onjava.com/pub/a/onjava/2006/06/28/whats-new-in-eclipse-3-2-java-development-tools.html?page=3
3. Ten coolest Eclipse 3.2 features http://blogs.zdnet.com/Burnette/?p=136
4. Customize Your Callisto Experience http://www.eclipse.org/callisto/custom.php
5. Eclipse Updates 10 Open-Source Projects in 'Callisto' http://www.eweek.com/article2/0,1895,1981651,00.asp
6. Step-by-step Eclipse Callisto http://www.ebernie.net/blog/2006/06/21/step-by-step-eclipse-callisto/

-----------------------------------------------------
New:
7. Series of Callisto podcasts http://www.eclipsezone.com/spotlights.jsp
-----------------------------------------------------

Trivia:
* Release Date: June 30, 2006
* Callisto, named for a moon of Jupiter
* The 10 projects included in the Callisto release are:
1. Business Intelligence and Reporting Tools (BIRT) 2.1
2. C/C++ IDE (CDT) 3.1
3. Data Tools Platform (DTP) 1.0
4. Graphical Editor Framework (GEF) 3.2
5. Graphical Modeling Framework (GMF)1.0
6. Eclipse Project 3.2
7. Test and Performance Tools Platform (TPTP) 4.2
8. Web Tools Platform (WTP) 1.5
9. Visual Editor (VE) 1.2
10. Eclipse Modeling Framework (EMF) 2.2

Tuesday, June 06, 2006

Links for JUnit on Eclipse

List of links for JUnit on Eclipse. Looking forward for more additions.

1. Unit Testing in Eclipse Using JUnit (http://open.ncsu.edu/se/tutorials/junit/#section6_0)
Date: Aug 29, 2005
To the point tutorial.

2. Using JUnit in Eclipse (www.cs.umanitoba.ca/~eclipse/10-JUnit.pdf)
Date: Oct 30, 2003
With a quick example

3. Eclipse Junit testing tutorial (http://www.laliluna.de/eclipse-junit-testing-tutorial.html)
Date: April, 12 2005
Definations, examples and source code