Thursday, November 25, 2010

Universal sql file executor

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...

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

Saturday, May 8, 2010

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...

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

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...