Recent Notes

Displaying keyword search results 1 - 5
Created by alfa on June 07, 2011 11:34:26    Last update: June 07, 2011 11:36:37
This is an example that uses dynamic proxies to trace method calls (in logging) and print out elapsed times for them. Because dynamic proxies can only be generated for interfaces, the service classes must be implemented with interface-implementation pairs. Create services A and B. A.java : public interface A { public void service1()... AImpl.java : import java.util.Random; public class AImpl... B.java : public interface B { public void service1()... BImpl.java : public class BImpl implements B { public vo... The call trace proxy: import java.lang.reflect.*; class TraceProx... The performance proxy: import java.lang.reflect.*; class Performan... The service factory: import java.lang.reflect.*; public class Se... The test class: public class Test { public static void main... The output: Entering AImpl.service1 Entering BImpl.service1... The above example has no information...
Created by meiu on February 09, 2010 03:26:14    Last update: March 31, 2011 09:00:19
Simple JDBC code for Oracle. import java.sql.*; public class JDBCHelloWo...
Created by nogeek on December 31, 2010 11:56:25    Last update: December 31, 2010 11:56:25
These are the steps to create a JBoss 5.1.0 configuration with Tomcat from the built-in minimal configuration. Change directory to $JBOSS_HOME/server . Make a copy of the minimal configuration. cp -R minimal tomcatonly Copy bindingservice.beans from the default configuration. cp -R default/conf/bindingservice.beans tomcatonly... Copy login-config.xml from the default configuration. cp default/conf/login-config.xml tomcatonly/conf/ Edit tomcatonly/conf/jboss-service.xml : Add jars from the common/lib directory: <!-- Load all jars from the JBOSS_DIST/serv... Add the JAAS security manager section (copy from the default profile, and yes, JBoss tomcat can't live without the JBoss JAAS manager). <!-- JAAS security manager and realm mappin... Copy the Tomcat (JBoss web) deployer from the default configuration. cp -R default/deployers/jbossweb.deployer tomcaton... Copy metadata-deployer-jboss-beans.xml and security-deployer-jboss-beans.xml from the default profile. cp default/deployers/metadata-deployer-jboss-b... Copy...
Created by Dr. Xi on September 29, 2008 23:21:38    Last update: January 16, 2010 23:36:05
Create a startup script for inetd Copy /etc/init.d/skeleton to /etc/init.d/inetd . Change the top section of the script to read: PATH=/usr/sbin:/usr/bin:/sbin:/bin DESC="In... Now inetd can be stopped/started/restarted like this: sudo /etc/init.d/inetd stop sudo /etc/init.... Add links to rc*.d $ sudo update-rc.d inetd defaults Adding sy... If you no longer need to start inetd at boot up: $ sudo update-rc.d -f inetd remove update-r... This would remove the links from the start up sequence but leave /etc/init.d/inetd in place. Contents of /etc/init.d/skeleton : #! /bin/sh ### BEGIN INIT INFO # Provide...
Created by Dr. Xi on October 09, 2009 19:27:22    Last update: October 09, 2009 19:30:01
PL/SQL code from Pandazen : CREATE OR REPLACE FUNCTION GET_INSERT_SCRIPT(V_TAB... Usage: To create the script for generating the INSERT statements: set head off set pages 0 set trims on set... Run the resulting script to generate the INSERT script: set pages 0 set trims on set lines 2000 ... PL/SQL code from Oracle Ask Tom set serveroutput on size 100000 set feedbac...