Need to execute the sql files without client installation on the box
download sqlsexecutor installer which will execute any sql file of database type Mysql,Oracle,Sybase and Mssql.
download link
https://sourceforge.net/projects/sqlsexecut...
Thursday, November 25, 2010
Wednesday, July 14, 2010
Jboss service sample
Jboss server as the some features like writing the service which will give permission to access the start, stop ..etc methods of mbean, Where we can write our code which are required on jboss start or shutdown....
Following steps we have to follow for writing the jboss service(.sar).
1. Created the...
Changing Default HSQLDB to User Database in Jboss for JMS
As we know jboss uses HSQLDB for the jms persistence to modify this to persist the JMS messages to user Database like mysql,oracle..e.t Following changes as to be made in jboss.
1. Delete the hsqldb-ds.xml from JBOSS_HOME/server/default/deploy folder.
2. Copy the respective database related ds file...
Thursday, June 3, 2010
Coherenc samples and clustering with help of oracle coherence tutorials

All below explanation and samples are done by reading the document provided by the oracle coherence.
The simplest and most flexible way to create caches in Coherence is to use the cache configuration...
Saturday, May 8, 2010
Xpath ConfigurationUtilities class for xml file manipulation
xml file modification using the xpath api .
....soon i will add the sou...
Friday, May 7, 2010
javax.jms.IllegalStateException: This method is not applicable inside the application server. See the J2EE spec
15:21:58,193 ERROR [STDERR] javax.jms.IllegalStateException: This method is not applicable inside the application server. See the J2EE spec, e.g.
J2EE1.4 Section 6.6
15:21:58,193 ERROR [STDERR] javax.jms.IllegalStateException: This method is not applicable inside the application server. See the J2EE...
Tuesday, March 23, 2010
MySql DB commands
for mysql :
create database test;
grant all on test.* to test@'localhost' identified by 'test';
grant all on test.* to test@'%' identified by 'test';
to run scripts in mysql
mysql> source <path to sql file>
MySql export schema without data
mysqldump -u root -p --no-data dbname > sc...
Generate Webservice proxy classes or client stub classes by MAVEN
Add the following plugin and dependencies
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>axistools-maven-plugin</artifactId>
<version>1.3</version>
<configuration>...
Generate Webservice proxy classes or client stub classes by ANT
For ANT build :
set the <taskdef> for axis-wsdl2java
<taskdef resource="axis-tasks.properties" classpathref="axis.classpath" />
Axis taskdefs :
axis-wsdl2java=org.apache.axis.tools.ant.wsdl.Wsdl2javaAntTask
axis-java2wsdl=org.apache.axis.tools.ant.wsdl.Java2WsdlAntTask
create...
Friday, March 19, 2010
Send and Receive files from remote system
Send and receive files from java socket programing
Sender :
1. Create a Scoket connection
ServerSocket servsock = new ServerSocket(13267);
2. Checks for the socket acceptence from socket client
Socket sock = servsock.accept();
3. Stream the file and output the stream
Receiver :
1. Create socket...
WebServiceClient test code
Following is the sample test code to test the webservice
import javax.xml.rpc.Call;
import javax.xml.rpc.Service;
import javax.xml.namespace.QName;
public class TestClient {
public static void main(String [] args) {
try {
String endpoint = "http://localhost:8080/axis/test.jws";
...
Saturday, March 13, 2010
Clustering or LoadBalancer configuration with apache web server
install Apache HTTP Server2.2.11 web server.
Once the installation starts follow the steps as shown in following figures.
Configuration of Web server ...
JVM_PermGen-space
Java virtual machine has Four generations :
eden, young, old and permanent.
In the eden generation, objects are very short lived and garbage collection is swift and often.
The young generation consists of objects that survived the eden generation (or was pushed down to young because the eden generation...
Wednesday, March 3, 2010
Hide windows Task bar java JNI
See my previous post on javaJNI sample imlpementation for basic info.
Now how to hide the user menu in windows system, user functionalities are in user32.dll file of windows.
Hide task bar
1. write a java class for native method or dll loading
public class WindowLock {
...
java JNI sample implementation
1. First create A simple java class.
public class HelloWorld {
public native void Hello();
static {
System.load("C:/test.dll");
System.out.println("Loaded");
}
public static void main(String[] args) {
new HelloWorld().Hello();
}
}
use load() insted of loadlibrary() and give the absolute path of...