Thursday, July 29, 2010 22:31

Posts Tagged ‘Java’

Tomcat Out of Memory

Sunday, February 8, 2009 14:27

We always get out of memory error on Tomcat when the system occupy many memory resource. To avoid this, we can dedicate how much memory tomcat can use. 1. add JAVA_OPTS='-Xms1024m -Xmx1024m' in catalina.sh 2. add set JAVA_OPTS=-Xms128m -Xmx350m in catalina.bat 3. use tomcat service(tomcat.exe) which read JAVA_OPTS from regedit table. add -Xms1024m -Xmx1024m ...

This was posted under category: Java  |  Read Full Story  |  0 Comments

Java and XSLT

Friday, February 6, 2009 17:34

Reference: https://jaxp.dev.java.net/ http://en.wikipedia.org/wiki/Java_API_for_XML_Processing http://www.oreillynet.com/pub/a/oreilly/java/news/javaxslt_0801.html http://www.ling.helsinki.fi/kit/2004k/ctl257/JavaXSLT/Ch05.html http://www.ibm.com/developerworks/xml/library/x-injava/index.html

This was posted under category: Java  |  Read Full Story  |  0 Comments

MyEclipse UML plugin

Wednesday, January 14, 2009 17:27

I'd like to share some experiences about how to use myeclipse's uml plugin with you guys. 1.  in the class diagram, you have to edit the operation name manually to hidden the parameters 2.  if you want to export a picture with no grid backgroup, you should set it in the myeclipse's ...

This was posted under category: Java  |  Read Full Story  |  0 Comments

Performance of XSLT

Friday, January 9, 2009 16:18

Performance of XSLT One common critiscism of XSLT is its performance. The overhead of transformation from XML to another format is the price paid for clean separtion between data and programming logic, as well as the ability to customize transformations for different clients. There are some strategies for improving ...

This was posted under category: Java  |  Read Full Story  |  0 Comments

log4j study note

Monday, January 5, 2009 13:10

Log4j (Short introduction to log4j) =========================================================== Usage in Source Code ----------------------------------------------------------- Get Logger * Logger.getRootLogger()|Logger.getLogger(String loggerName) Print Methods: * public void debug(Object message);    // 7 * public void info(Object message);    // 6 * public void warn(Object message);    // 4 * public void error(Object message);    // 3 * public void fatal(Object message);    // 0 * public void log(Level,Object message);  // generic print method ----------------------------------------------------------- Configure File ----------------------------------------------------------- Logger ----------------------------------------------------------- log4j.rootLogger ...

This was posted under category: Java  |  Read Full Story  |  0 Comments

Application,session,request objects in jsp

Sunday, January 4, 2009 21:28

JSP provides a set of implicit object variables for you. One of them is the 'application' variable. getServletContext().get.... can be replaced with: ...

This was posted under category: Java  |  Read Full Story  |  0 Comments

uncaughtException

Sunday, January 4, 2009 13:54

uncaughtException(Thread t, Throwable e) Called by the Java Virtual Machine when a thread in this thread group stops because of an uncaught ...

This was posted under category: Java  |  Read Full Story  |  0 Comments

JavaFx is available now

Friday, December 19, 2008 8:19

JavaFX is an expressive rich client platform for creating and delivering rich Internet experiences across all the screens of your life. JavaFX offers users unparalleled freedom and flexibility to create rich Internet applications and content quickly and easily across multiple screens, including mobile phones, desktops, televisions, and other consumer ...

This was posted under category: IT Consultant, Java  |  Read Full Story  |  0 Comments

Java Quartz

Tuesday, December 2, 2008 23:22

<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"> <beans default-lazy-init="false"> <bean name="quartzScheduler" class="org.springframework.scheduling.quartz.SchedulerFactoryBean"> <property name="triggers"> <list> <ref bean="syncUpdatedUsersCronTrigger" /> <ref bean="syncLeaversCronTrigger" /> </list> </property> <property name="configLocation" value="classpath:quartz.properties" /> </bean> <bean id="syncUpdatedUsersCronTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean"> <property name="jobDetail" ref="syncUpdatedUsersJobDetail" /> <property name="cronExpression" value="${sync.updated_users_sync_cronExpression}" /> </bean> <bean id="syncLeaversCronTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean"> <property name="jobDetail" ref="syncLeaversJobDetail" /> <property name="cronExpression" value="${sync.leaver_sync_cronExpression}" /> </bean> <bean id="syncUpdatedUsersJobDetail" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean"> <property name="targetObject" ref="synchronizeUser" /> <property name="targetMethod" value="synchronizeUpdatedUsers" /> </bean> <bean id="syncLeaversJobDetail" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean"> <property name="targetObject" ref="synchronizeUser" /> <property name="targetMethod" value="synchronizeLeavers" /> </bean> <bean id="synchronizeUser" class="com.ukoom.Job" /> </beans> References: http://cse-mjmcl.cse.bris.ac.uk/blog/2007/06/20/1182370280435.html http://static.springframework.org/spring/docs/2.0.x/api/org/springframework/scheduling/quartz/MethodInvokingJobDetailFactoryBean.html http://www.springside.org.cn/docs/reference/Quartz.htm

This was posted under category: Team  |  Read Full Story  |  0 Comments

Quartz APIs and Objects

Tuesday, December 2, 2008 23:18

It is important to know some key objects of Quartz. org.quartz.Trigger The base abstract class to be extended by all Triggers including org.quartz.CronTrigger. Triggers s have a name and group associated with them, which should uniquely identify them within a single Scheduler. Triggers are the 'mechanism' by which Jobs are scheduled. ...

This was posted under category: Java  |  Read Full Story  |  0 Comments