Converting to a String to XML Document

Tagged:
import java.io.IOException;
import java.io.StringReader;
 
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.TransformerException;
 
import org.w3c.dom.Document;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
 
 
/**
 * StringToXMLDoc.java
 * 
 * Example to convert String to XML Document object
 *
 *
 */
public class StringToXMLDoc {
	public static void main(String[] args) throws Exception {
 
 
		String sourceXML

Installing Eclipse plugins in a clean way

Tagged:

Normally to install eclipse plugins, you just need to extract the plugins, features folders into the corresponding folders in Eclipse installation. But you can make the installation much cleaner and manageable by using the following tip.

How to Connect to Oracle VPD using Hibernate

Oracle VPD or Virtual Private Database is a Oracle Database feature that provides data access control features for the database. You cannot directly access the VPD data using the persistence managers like Hibernate or JPA. There's an option of using Oracle Toplink, but it is not a free for commercial use. The following "work-around" allows you to use Oracle VPD with Hibernate API.

Redhat Developer Studio on Mac OS X

Redhat Developer Studio was not available for Mac OS X. But still you can run the developer studio on your Mac OS X. Here's what it looks like on Mac OS X Leopard

Download Redhat Developer Studio RC1

The Release Candidate 1 version of Redhat Developer Studio is available for download. For those who just want to download from http link, instead of the FTP you can download it by clicking windows version or Linux version.

Redhat/JBoss Developer Studio Beta Released

Tagged:

Redhat has released the widely anticipated Redhat Developer Studio in Beta. The Developer Studio is in fact a series of Eclipse Plugins bundled together. Its 500+ MB download, currently available for Windows and Linux. No Mac OS X version yet.

We'll be publishing our first impressions in a couple of hours. Check back soon!

Executing a Stored Procedure using Java

You can execute a stored procedure using Java using a CallableStatement
 Connection connection = null;
        try {
            // Instantiate  the appropriate JDBC driver
            final String driverName = "oracle.jdbc.driver.OracleDriver";
            Class.forName(driverName);
 
            // Connection parameters
            final String databaseHost = "databaseHost";
            final String portNumber = "1527"; //Port Number
            final String sid = "dbname";
            final String url = "jdbc:oracle:thin:@" + databaseHost + ":" 

Connecting to Oracle Database using JDBC

Connection connection = null;
try {
 // Instantiate  the appropirateJDBC driver
    final String driverName = "oracle.jdbc.driver.OracleDriver";
    Class.forName(driverName);
 
    // Connection parameters
    final String databaseHost = "hotsname";
    final String portNumber = "1521"; //Port on which oracle database is running
    final String sid = "dbname";
    final String url = "jdbc:oracle:thin:@" + databaseHost + ":" + portNumber + ":" + sid;
    final String username = "username";
    final String password = "password";
    connection = DriverManager.g

Web Service development using Netbeans and JBoss

This article is an introduction to creating JavaFirst JAX-WS web service using Netbeans IDE and JBoss Application Server.

Web Services are playing a major part in the enterprise application domain. Before JAX-WS, JAX-RPC was used to develop web services in Java. Apache Axis has been one of the popular implementation for development of Web Services for Java. With the advent of JAX-WS developing web services has become much simpler. This article explains how to create simple web service using Netbeans and JBoss Application Server.

Installing JBossWS : JAX-WS implementation for JBoss

This article explains how to install JBossWS on JBoss Application Server

Introduction

JBossWS is JAX-WS implementation for JBoss Aplication Server. If you want to deploy JAX-WS compatible Web Services, you need to install the JBossWS patch on your JBoss application Server. At the time of writing this article, the latest stable version of JBoss is 4.2.1.GA and that of JBossWS is 2.0.0.GA.

Syndicate content