- 浏览: 127243 次
- 性别:
- 来自: Singapore
最新评论
-
houzhe11:
<property name="proxyTa ...
AOP usage -- BeanNameAutoProxyCreator usage
文章列表
Random usage
- 博客分类:
- Java Basic
public class RandomTest
{
public static void main(String[] args)
{
Random rand1 = new
- 2009-04-14 17:23
- 浏览 1006
- 评论(0)
Timer typical usage
new Timer().schedule(new TimerTask() {
public void run() { System.err.println("Aborting");
System.exit(0);
}//end of run
}, 5000); //Terminate after 5 seconds
Create a infinite running timer, execute one every second
Timer timer = ...
- 2009-04-14 12:03
- 浏览 725
- 评论(0)
public class AllTests
{
public static Test suite()
{
- 2009-04-07 17:37
- 浏览 781
- 评论(0)
package xmldom;import java.io.FileInputStream;import java.io.FileNotFoundException;import java.io.FileOutputStream;import java.io.IOException;import java.io.InputStream;import java.util.Iterator;import java.util.LinkedList;import java.util.List;import org.jdom.Document;import org.jdom.Element;import ...
- 2009-04-03 12:49
- 浏览 1259
- 评论(0)
Method one:
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
//This part is to solve issue of unknown host url -- springframework.org
builder.setEntityResolver(new En ...
- 2009-04-03 11:57
- 浏览 581
- 评论(0)
Readonly file can't be changed, and can be deleted.
- 2009-04-03 11:18
- 浏览 821
- 评论(0)
How to load a properties?
Simply add the properties’ folder into the classpath, then load it in this way.
private static Properties prop = new Properties();
prop.load(Constants.class.getClassLoader().getResourceAsStream(
- 2009-04-03 10:46
- 浏览 1404
- 评论(0)
1.如何获得当前文件路径 常用: 字符串类型:System.getProperty("user.dir"); 综合:
- 2009-04-03 10:44
- 浏览 1334
- 评论(0)
==sending out message===============
factory = new TibjmsTopicConnectionFactory(Constants.url);
connection = factory.createTopicConnection(Constants.user, Constants.pass);
session = connection.createTopicSession(false
- 2009-03-30 16:31
- 浏览 925
- 评论(0)
hibernate logging
## print all generated SQL to the consolehibernate.show_sql true
## format SQL in log and consolehibernate.format_sql true
## add comments to the generated SQLhibernate.use_sql_comments true
- 2009-03-24 11:40
- 浏览 718
- 评论(0)
To see query plans, use:
set showplan on
To stop displaying query plans, use:
set showplan off
- 2009-03-20 16:28
- 浏览 987
- 评论(0)
1) Must use ApplicationContext, can't use BeanFactory.
Example:
ApplicationContext factory = new ClassPathXmlApplicationContext(new String[]{"spring.xml"});
2) BeanNameAutoProxyCreator bean must include property as below.
<property name="proxyTargetClass"
- 2009-03-17 15:44
- 浏览 1695
- 评论(1)
http://www.blogjava.net/Unmi
http://lijinjoseji.wordpress.com/
- 2009-03-17 12:28
- 浏览 837
- 评论(0)
generate env classpath from lib folder
for libfile in $(find lib/*)
do
classpath=$classpath:./$libfile
done
export classpath=$classpath
- 2009-03-13 15:24
- 浏览 738
- 评论(0)
Tag 35
35 = D New Order Single Request
35 = G Modification Request
35 = F Cancel Request
35 = 8 New Order Single Ack
New Order Single Reject
35 = 9 Modification Reject
- 2009-03-11 10:24
- 浏览 1056
- 评论(0)