Click is a simple J2EE web application framework for commercial Java developers.
Click is an open source project, licensed using the Apache license.
Click uses the event based programming model for processing Servlet requests and Velocity for rendering the response.
Click is JSP and MVC Free
Monday, July 31, 2006
Introduction to StAX
Processing XML documents has become a critical and integral part of most applications being developed today. Depending on different environments, there are various ways to process an XML document within a program.
Read more about StAX in this link.
Read more about StAX in this link.
Java - Thread Local
Use a thread local variable (where each thread has a separate value) when you want to carry a value along without explicitly passing it from method to method down the call stack, and when appropriate, remember to explicitly clear the value in a finally block to prevent memory leaks:
CrazyBob.org has detail article about this.
CrazyBob.org has detail article about this.
Mashup
Alexis Moussine-Pouchkine's Weblog,he explains how his Mashup implementation uses Java Persistence, NetBeans, and Java Studio Creator to query the, REST-based, GeoEncoding Web Service.
Part 1
Part 2
Part 1
Part 2
JUnit with Spring and database transaction
Manohar Viswanathan's blog explains how to do Better JUnit-ing for Spring, Junit with database transactions.
An Introduction to Java Persistence for Client-Side Developers
This link
gives nice introduction to Java Persistence for Cleint-Side Developers.
gives nice introduction to Java Persistence for Cleint-Side Developers.
Pro EJB 3.0 Java Persistence API - Sample Chapter
The followig sample chapter posted in OTN. This gives nice introduction for EJB 3.0 JPA API programming using TopLink Essentials.
Thursday, July 20, 2006
Java5 Free sample chapters to read
Once again from Hoskinator blog, here is the list of books for Java5.
Questions and Solutions using Generics, foreach and Enumerations
Generics Sample Chapter pdf
Hardcore Java - The Final Story
---This link will talk about final keyword of Java.
Thanks Hoskinator !!!!!
I am regular visitor Hoskinator blog....
Questions and Solutions using Generics, foreach and Enumerations
Generics Sample Chapter pdf
Hardcore Java - The Final Story
---This link will talk about final keyword of Java.
Thanks Hoskinator !!!!!
I am regular visitor Hoskinator blog....
What is TestDriven?
I was reading Hoskinator blog, found two blog entries in the following topics.
Test Driven Development and ObjectiveView magazine
Learning to love Junit and Test-driven development
I know about ObjectiveView online Free magazine.
Checking what is TestDriven? Some excerpt from TestDriven website.
TDD is a lightweight programming methodology that emphasizes fast, incremental development and especially writing tests before writing code. Ideally these follow one another in cycles measured in minutes.
Functionality is added in very small chunks. Typically the first cycle will deal with utterly simple cases: you test what happens when you are out of stock, when the quantity ordered is zero, when the list is empty, when a string has no characters in it, when the user just hits [Enter]. Once you have these very simple tests working, you add more functionality, a bit at a time.
Need to learn more about this.............
Test Driven Development and ObjectiveView magazine
Learning to love Junit and Test-driven development
I know about ObjectiveView online Free magazine.
Checking what is TestDriven? Some excerpt from TestDriven website.
TDD is a lightweight programming methodology that emphasizes fast, incremental development and especially writing tests before writing code. Ideally these follow one another in cycles measured in minutes.
Functionality is added in very small chunks. Typically the first cycle will deal with utterly simple cases: you test what happens when you are out of stock, when the quantity ordered is zero, when the list is empty, when a string has no characters in it, when the user just hits [Enter]. Once you have these very simple tests working, you add more functionality, a bit at a time.
Need to learn more about this.............
Free Hibernate sample chapters
Blog by Hoskinator named A Funny Java Flavoured Look at the World have the list of links for Free Hibernate sample chapters.
Sunday, July 16, 2006
Sematic Web
I was googling for details about codePointAt method of String class from Java. Saw a word SWOOP and it is a browser. Googled SWOOP and found that SWOOP is Hypermedia-based OWL Ontology Browser and Editor.
What is Ontology?
The branch of metaphysics that deals with the nature of being.
Further tried to find information about this browser, the new word pop-up. SEMATIC WEB.
What is Sematic Web?
The Semantic Web provides a common framework that allows data to be shared and reused across application, enterprise, and community boundaries. It is a collaborative effort led by W3C with participation from a large number of researchers and industrial partners. It is based on the Resource Description Framework (RDF).
Read further details about Sematic Web from W3C.
Also found a nice presentation about Introuction to Sematic Web using Google.
Want to know Sematic Web read this presentation.
What is Ontology?
The branch of metaphysics that deals with the nature of being.
Further tried to find information about this browser, the new word pop-up. SEMATIC WEB.
What is Sematic Web?
The Semantic Web provides a common framework that allows data to be shared and reused across application, enterprise, and community boundaries. It is a collaborative effort led by W3C with participation from a large number of researchers and industrial partners. It is based on the Resource Description Framework (RDF).
Read further details about Sematic Web from W3C.
Also found a nice presentation about Introuction to Sematic Web using Google.
Want to know Sematic Web read this presentation.
Saturday, July 15, 2006
SQL Developer Extensions and Eclipse
Recently, I read about SQL Developer extensions for Eclipse from Kris Rice's weblog.
I am giving the contents of his blog posting. I would like to post the contents, rather than giving link. The reason is the link may break and we may loss this information.
Thanks to Kris Rice.
Want to write an extension to SQL Developer but you only use Eclipse? There's a post on the forum about how to use Eclipse to write an extension to sql developer so I figured I'd put it here so it's not lost into the of the forum.
This is actually quite easy to setup. This can be checked by running the shell script with a -x, so bash -x sqldeveloper. This will show what is being executed
First make a run/debug configuration.
1. Main Tab
* Main Class: oracle.ideimpl.Main
* Check the Include libraries when searching for a main class checkbox
2. Arguments Tab
* The paths in the VM arguments should be adjusted to your specifics. Also if there is a space in the paths they will have to quoted like "C:\Document and Settings\sqldeveloper...."
* VM Arguments: -Dide.product=oracle.sqldeveloper -Dide.splash.screen=raptor-splash.gif -Xverify:none -Xmx512M -XX:MaxPermSize=128M -Dice.browser.forcegc=false -Dice.pilots.html4.tileOptThreshold=0 -DEDITOR_J2SE_VERSION=1.5 -DINSIGHT_OMIT_HIDDEN=true -Doracle.xdkjava.compatibility.version=9.0.4 -Dide.debug.controller.stack=false -Dceditor.java.parse.small=300 -Dceditor.java.parse.large=1500 -Dide.extension.cpmissing.nowarn=true -Dcompiler.vmargs=-mx512m -Djbo.debugoutput=silent -Djbo.showdebugwarningbanner=false -Dide.config_pathname=/home/klrice/sqldeveloper/jdev/bin/sqldeveloper.conf -Dide.startingcwd=/home/klrice/sqldeveloper/jdev/bin -Dide.user.dir=/tmp
* Working directory: choose Other . Then enter the path to /jdev/bin
3. Classpath Tab
* Add the following ( all paths are relative to )
* /ide/lib/ide.jar
* /ide/lib/javatools.jar
* /ide/lib/xmlparserv2.jar
* /ide/lib/help4.jar
* /ide/lib/share.jar
* /ide/lib/javax-ide.jar
Now the run configuration is setup and ready to use. You should now be able to run and debug an extension.
Posted by kris.rice at May 3, 2006 03:40 PM
I am giving the contents of his blog posting. I would like to post the contents, rather than giving link. The reason is the link may break and we may loss this information.
Thanks to Kris Rice.
Want to write an extension to SQL Developer but you only use Eclipse? There's a post on the forum about how to use Eclipse to write an extension to sql developer so I figured I'd put it here so it's not lost into the of the forum.
This is actually quite easy to setup. This can be checked by running the shell script with a -x, so bash -x sqldeveloper. This will show what is being executed
First make a run/debug configuration.
1. Main Tab
* Main Class: oracle.ideimpl.Main
* Check the Include libraries when searching for a main class checkbox
2. Arguments Tab
* The paths in the VM arguments should be adjusted to your specifics. Also if there is a space in the paths they will have to quoted like "C:\Document and Settings\sqldeveloper...."
* VM Arguments: -Dide.product=oracle.sqldeveloper -Dide.splash.screen=raptor-splash.gif -Xverify:none -Xmx512M -XX:MaxPermSize=128M -Dice.browser.forcegc=false -Dice.pilots.html4.tileOptThreshold=0 -DEDITOR_J2SE_VERSION=1.5 -DINSIGHT_OMIT_HIDDEN=true -Doracle.xdkjava.compatibility.version=9.0.4 -Dide.debug.controller.stack=false -Dceditor.java.parse.small=300 -Dceditor.java.parse.large=1500 -Dide.extension.cpmissing.nowarn=true -Dcompiler.vmargs=-mx512m -Djbo.debugoutput=silent -Djbo.showdebugwarningbanner=false -Dide.config_pathname=/home/klrice/sqldeveloper/jdev/bin/sqldeveloper.conf -Dide.startingcwd=/home/klrice/sqldeveloper/jdev/bin -Dide.user.dir=/tmp
* Working directory: choose Other . Then enter the path to /jdev/bin
3. Classpath Tab
* Add the following ( all paths are relative to )
* /ide/lib/ide.jar
* /ide/lib/javatools.jar
* /ide/lib/xmlparserv2.jar
* /ide/lib/help4.jar
* /ide/lib/share.jar
* /ide/lib/javax-ide.jar
Now the run configuration is setup and ready to use. You should now be able to run and debug an extension.
Posted by kris.rice at May 3, 2006 03:40 PM
What is mod_plsql?
mod_plsql is an oracle module for Apache.It is essentially an apache module that provides direct access to stored procuders via HTTP requests.
Roland Bouman in his blog gives nice introduction to mod_plsql and how to enable this feature in OracleXE(free oracle database).
Laurent Schneider in his blog gives simple example for mod_plsql.
Roland Bouman in his blog gives nice introduction to mod_plsql and how to enable this feature in OracleXE(free oracle database).
Laurent Schneider in his blog gives simple example for mod_plsql.
Remote Debugging with SQL Developer
Oracle free tool SQL Developer got nice feature. Sue Harper from Oracle in her blog gave very detail tutorial, how to do remote debugging with stored proecedures,funtion and packages using SQL Developer.
You need SQL Developer and Oracle XE.
To download click the links:
SQL Developer
OracleXE
You need SQL Developer and Oracle XE.
To download click the links:
SQL Developer
OracleXE
Friday, July 14, 2006
Making the Most of Oracle SQL Developer Reports - OTN
Oracle SQL Developer (formerly Project Raptor) is Oracle’s new multiplatform graphical user interface (GUI) for developers and DBAs. Like Oracle Database 10g Express Edition (XE) and Oracle JDeveloper, Oracle SQL Developer can be downloaded completely free. Oracle SQL Developer runs on the Windows, Macintosh, and Linux platforms.
Make the best use of the reporting capabilities in Oracle's free database development tool
by
Lewis R. Cunningham
Make the best use of the reporting capabilities in Oracle's free database development tool
by
Lewis R. Cunningham
Websphere Tutorials and Articles
Tuesday, July 11, 2006
Spring 2.0 AOP - Spruce Up Your Domain Model
Debasish Ghosh on his blog talks about Spring 2.0 AOP - Spruce Up Your Domain Model
Sunday, July 09, 2006
Websphere Portal resources
Guides:
Portlet Development Guide: Second Edition
Portlet Development Best Practices and Coding Guidelines
Articles
Developing and Deploying a Struts Application as a WebSphere Portal V5 Portlet
Applying the State Pattern to WebSphere Portal V5 Portlets: Part 1
Applying the State Pattern to WebSphere Portal V5 Portlets: Part 2
Portlet Development Guide: Second Edition
Portlet Development Best Practices and Coding Guidelines
Articles
Developing and Deploying a Struts Application as a WebSphere Portal V5 Portlet
Applying the State Pattern to WebSphere Portal V5 Portlets: Part 1
Applying the State Pattern to WebSphere Portal V5 Portlets: Part 2
Simflet - simple MVC framework for JSR-168 portlet
Simflet is a simple MVC framework for JSR-168 portlet.
Simflet is an open source simple framework for portlet development. The reason it's been written? Because there is no proper MVC model in the Portlet API. As a result, portlet development is like servlet development: complex applications aren't easy, because of the infrastructure issues.
It has following features and more.
Simflet is an open source simple framework for portlet development. The reason it's been written? Because there is no proper MVC model in the Portlet API. As a result, portlet development is like servlet development: complex applications aren't easy, because of the infrastructure issues.
It has following features and more.
Struts like MVC model Simple, easy to use No additional configuration is required Portlet development with Simflet framework can be deploy in any JSR-168 compliant portal Easy file upload handling
Light - OpenSource Portal framework
Saturday, July 01, 2006
How to put file per server in Weblogic Cluster
Let say you want to put file(either property or standard) per server on WebLogic Cluster.
In simple term, you want to write file to each server, when WebLogic server runs on cluster.
You can get thesse information in your code:
T3Services.getT3Services().config().getProperty("weblogic.system.home");
T3Services.getT3Services().config().getProperty("weblogic.system.name");
T3Services.getT3Services().config().getProperty("weblogic.cluster.name");
T3Services.getT3Services().config().getProperty("weblogic.home");
Now using above details we can write file as below.
T3Services.getT3Services().config().getProperty("weblogic.system.home") +
File.seperator +
T3Services.getT3Services().config().getProperty("weblogic.cluster.name") +
File.seperator +
T3Services.getT3Services().config().getProperty("weblogic.system.name") +
"mysoftware.properties";
In simple term, you want to write file to each server, when WebLogic server runs on cluster.
You can get thesse information in your code:
T3Services.getT3Services().config().getProperty("weblogic.system.home");
T3Services.getT3Services().config().getProperty("weblogic.system.name");
T3Services.getT3Services().config().getProperty("weblogic.cluster.name");
T3Services.getT3Services().config().getProperty("weblogic.home");
Now using above details we can write file as below.
T3Services.getT3Services().config().getProperty("weblogic.system.home") +
File.seperator +
T3Services.getT3Services().config().getProperty("weblogic.cluster.name") +
File.seperator +
T3Services.getT3Services().config().getProperty("weblogic.system.name") +
"mysoftware.properties";
Google Map Taglibs
I just found out about the GoogleMaps JSP Taglibrary. It can be as easy as this, but also allows a lot of other usages.
<googlemaps:map id="map" width="250" height="300" version="2" type="STREET" zoom="12">
<googlemaps:key domain="localhost" key="xxxx"/>
<googlemaps:point id="point1" address="74 Connors Lane" city="Elkton" state="MD" zipcode="21921" country="US"/>
<googlemaps:marker id="marker1" point="point1"/>
</googlemaps:map>
Great stuff!
Spring PropertyPlaceholderConfigurer
I found two blog entries for Spring PropertyPlaceholderConfigurer class. It is very informative.
Spring PropertyPlaceholderConfigurer by techno.blog("Dion")
Externalizing Configuration with Spring by Stefan Kleineikenscheidt
Spring PropertyPlaceholderConfigurer by techno.blog("Dion")
Externalizing Configuration with Spring by Stefan Kleineikenscheidt
Sending E-Mail with Spring
This TheServerSide artcile by Matt Raible gives small tutorial, how to send email using Spring and Velocity.
what is singleton?
A singleton class is one in which instantiation is restricted to ensure that only one instance is created for the current Java Virtual Machine. Singletons usually have a private default constructor, to prevent direct instantiation, and a static method to obtain a "new" reference to the single instance. On its first call, the static instance method creates the object using a private constructor and stores a static reference to it for all subsequent calls.
This is useful when exactly one object is needed to coordinate actions across the system. Sometimes it is generalized to systems that operate more efficiently when only one or a few objects exist.
Singleton Example:
//For Single Thread safe
public class Singleton {
// Private constructor suppresses generation of a (public) default constructor
private Singleton() {}
private static class SingletonHolder {
private static Singleton instance = new Singleton();
}
public static Singleton getInstance() {
return SingletonHolder.instance;
}
}
// Correct multithreaded version for J2SE 1.4 and earlier
public class Singleton {
private Helper helper = null;
public synchronized Helper getHelper() {
if (helper == null)
helper = new Helper();
return helper;
}
// other functions and members...
}
What happens to singletons when two JVMs are running?
A: There is only one instance of a true singleton in a single virtual machine. If two virtual machines are running, two separate and independent instances of a singleton exist. If the singleton in question is governing access to the same system resource, there may be conflicts between the two systems, which is why the singleton design pattern is not ideal in this scenario.
For more details on J2EE Patterns by Sun
This is useful when exactly one object is needed to coordinate actions across the system. Sometimes it is generalized to systems that operate more efficiently when only one or a few objects exist.
Singleton Example:
//For Single Thread safe
public class Singleton {
// Private constructor suppresses generation of a (public) default constructor
private Singleton() {}
private static class SingletonHolder {
private static Singleton instance = new Singleton();
}
public static Singleton getInstance() {
return SingletonHolder.instance;
}
}
// Correct multithreaded version for J2SE 1.4 and earlier
public class Singleton {
private Helper helper = null;
public synchronized Helper getHelper() {
if (helper == null)
helper = new Helper();
return helper;
}
// other functions and members...
}
What happens to singletons when two JVMs are running?
A: There is only one instance of a true singleton in a single virtual machine. If two virtual machines are running, two separate and independent instances of a singleton exist. If the singleton in question is governing access to the same system resource, there may be conflicts between the two systems, which is why the singleton design pattern is not ideal in this scenario.
For more details on J2EE Patterns by Sun
Subscribe to:
Posts (Atom)