Archive

Archive for January, 2010

Hibernate, JBoss, Log4j Logging

January 29, 2010 Leave a comment

Question: How to enable Hibernate logging in JBoss?

<!-- Hibernate Logging -->
    <category name="org.hibernate">
        <priority value="ERROR" />
        <appender-ref ref="CONSOLE"/>
        <appender-ref ref="FILE"/>
   </category>
    <category name="org.hibernate.SQL">
        <priority value="TRACE" />
        <appender-ref ref="CONSOLE"/>
        <appender-ref ref="FILE"/>
   </category>
    <category name="org.hibernate.type">
        <priority value="TRACE" />
        <appender-ref ref="CONSOLE"/>
        <appender-ref ref="FILE"/>
   </category>

-o-

R2I – Returning to India

January 27, 2010 Leave a comment

Returning to India is debatable and hard to make decision.
We need to balance Money, Kids Education and Family Members.

Everybody have their own reasons.

http://saroscorner.blogspot.com/2009/06/return-to-india-r2i-25-things-to-do.html
http://saroscorner.blogspot.com/2009/10/100-reasons-to-return-to-india-r2i.html

-o-

Java XPath

January 25, 2010 Leave a comment

Quick way to extract data from XML is XPath.

http://www.whitebeam.org/library/guide/TechNotes/xpathtestbed.rhtm

http://www.whitebeam.org/library/guide/TechNotes/xpath.rhtm

import javax.xml.xpath.XPath;
import javax.xml.xpath.XPathFactory;
import java.io.*;

String xmlData = "place the XML Data here.";
XPath xpath = XPathFactory.newInstance().newXPath();
InputStream inStream = new ByteArrayInputStream(xmlData.getBytes());
InputSource inputSource = new InputSource(inStream);
String nodeValue = xpath.evaluate("//nodeName", inputSource);
System.out.println("nodeValue==>" + nodeValue);

Categories: XML Tags: ,

Restlet API

January 25, 2010 Leave a comment

Working on Restlet API for now….

http://www.restlet.org/

Test Restlet with http://code.google.com/p/rest-client/

Now Spring 3.0 is having support for Restlets, but I didn’t get a chance to look into it.

-o-

Categories: Restlet Tags:

Oracle – Functions in where clause and Performance Issues.

January 22, 2010 Leave a comment

Using Functions in Where clause cause performance issues.

Option 1: Use data conversions in upper layer, before sending data for comparison in where clause.

Option 2:  Use Function based indexes.

For more information read….

http://www.oraclebrains.com/2006/12/understanding-function-based-indexes/

http://www.dba-oracle.com/oracle_news/2004_1_19_using_function_based_indexes%20.htm

http://www.dba-oracle.com/art_9i_indexing.htm

-o-

Java Services

January 7, 2010 Leave a comment

Hmm….thought of developing project which should have service as back end, Apache fuse ESB and Client program.

Service must run under Java Service Wrapper and OSGi
Java Service Wrapper ==> http://www.tanukisoftware.com
Pax Runner with Profiles ==> http://www.jroller.com/habuma/entry/pax_runner_profiles_and_distributed

Here is the list of Arch Types to generate project http://docs.codehaus.org/display/MAVENUSER/Archetypes+List

Rest we need to prepare maven archtype, which should give basic code.
The given code should have following
1. Service side code.
2. Fuse ESB Service assembly
3. Client Code

-o-

Categories: OSGi
Follow

Get every new post delivered to your Inbox.