|
|
|
ibatis에 log4j 바인딩하기
프로그래밍/Java |
2009/10/06 10:13
|
|
|
1. 목적 : iBatis 로그에 남는 쿼리문의 '?' 를 바인딩된 값을 포함해서 보기위함(디버깅할때 좋것다) 2. 할 수 있는 방법 비교
2.1. log4sql 사용 - 장점
- 설정하기 쉽다. - 사용하기 쉽다.
- 단점
버그존재 1. 에러코드 반환값 불일치 2. 트랜젝션(Transaction) 모드의 경우 반복되는 쿼리 실행 불가 (오라클 oracle)
- 참고
http://log4sql.sourceforge.net/log4sql stable 7.8 Release Date : 2009.09.03 Fixed List : 1. Fixed some bugs(INSERT USE SAME STATEMENT). 2. CUBRID Driver Added. 일부 버그가 수정되었음.
2.2. 변경된 ibatis 라이브러리 사용 - 장점
- 설정하기 쉽다. - 사용하기 쉽다.
- 단점
- 약간에 소스 수정을 해야 한다. - ibatis 원본 소스를 수정했기 때문에 ibatis Library Upgrade 시 문제 발생할 수 있다.
- 참고
파이의 생각 : 위 조사 내용으로 볼때 Opensource 이긴허나 log4sql 을 사용하는것이 사용에 있어서도 더 안정적이고 결과 값도 잘 볼수 있을 듯 하다. |
|
|
| 이 글의 관련글(트랙백) 주소 :: http://www.pioneer.pe.kr/trackback/92 |
|
|
|
|
|
Unix 에서 JSP 나 Servlet 으로 구현된 Chart 생성 않될때
프로그래밍/Java |
2006/08/25 11:34
|
|
|
JSP 나 Servlet 에서 차트가 생성이 않될때 주는 옵션입니다.
tomcat 과 같은 WAS 실행할때 아래를 참고하셔서 옵션으로 주시면 됩니다.
J2SE v1.4 -- Java Platform Graphics Without X
The original Java platform graphics API was written to use peer components from a native window system:
on Solaris, the peers are provided by the X Window System.
In J2SE SDK v1.4, a command-line option can remove the need for the X Window System.
This feature, called headless support, is discussed in AWT Enhancements
in the Java 2 SDK, v1.4. Headless operation doesn't allow use of GUI classes such as Java Foundation Classes (Swing),
but does allow the use of graphics rendering APIs such as Java2D, Java3D, or JAI.
The command-line option is: -Djava.awt.headless=true.
For more information, see the section called Setting Up Java Platform for Headless Operation Without an X Server. |
|
|
| 이 글의 관련글(트랙백) 주소 :: http://www.pioneer.pe.kr/trackback/41 |
|
|
|
|
|
JNI 테스트 소스 자료 입니다.
프로그래밍/Java |
2006/08/25 11:32
|
|
|
목적 : C, C++ 과 연동 하기 위한 java interface
테스트 환경 - VM: jdk1.4
- C compiler : gcc
- Hello.java source
package test;
import java.io.*;
public class Hello
{
public native String helloworld(String name); // C 프로그램으로 부터 호출할 메소드명
static {
System.loadLibrary("hello");
}
public static void main(String args[])
{
Hello h = new Hello();
System.out.println(h.helloworld("파이 짱"));
}
} 컴파일 하기
[sun:/export/home/pioneer/jni/HelloJni]javac -d . Hello.java
c 와 interface 할 Header 파일 만들기
[sun:/export/home/pioneer/jni/HelloJni]javah -jni Hello
[sun:/export/home/pioneer/jni/HelloJni]ls *.h
NativeStringUtil.h - 한글처리를 위한 파일
test_Hello.h - Jni 를 위한 Header 파일 package명_클래스명
[sun:/export/home/pioneer/jni/HelloJni]
Header 파일
[sun:/export/home/pioneer/jni/HelloJni]more test_Hello.h
/* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
/* Header for class test_Hello */
#ifndef _Included_test_Hello
#define _Included_test_Hello
#ifdef __cplusplus
extern "C" {
#endif
/*
* Class: test_Hello
* Method: helloworld
* Signature: (Ljava/lang/String;)Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL Java_test_Hello_helloworld
(JNIEnv *, jobject, jstring);
#ifdef __cplusplus
}
#endif
#endif
C source hello.c 파일
#include <jni.h>
#include "test_Hello.h"
#include "NativeStringUtil.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
JNIEXPORT jstring JNICALL
Java_test_Hello_helloworld(JNIEnv *env, jobject obj, jstring str)
{
char buf[1024];
char *cstr;
cstr = jbyteArray2cstr( env, javaGetBytes(env, str) );
sprintf(buf, "%s:%s", cstr, "반가워요 이건 C함수에서 넘겨준 겁니다.");
return javaNewString( env, cstr2jbyteArray(env, buf));
}
C 파일 compile 하기
gcc -I/usr/j2se/include -I/usr/j2se/include/solaris -G -o libhello.so hello.c NativeStringUtil.c
실행하기
[sun:/export/home/pioneer/jni/HelloJni]java -Djava.library.path=./ test.Hello
반가워요 이건 C함수에서 넘겨준 겁니다.
[sun:/export/home/pioneer/jni/HelloJni]
|
|
|
| 이 글의 관련글(트랙백) 주소 :: http://www.pioneer.pe.kr/trackback/40 |
Tracked from Wicked Weasel Bikini Archive 2008/07/02 16:16 x
제목 : Wicked Weasel Bikini Archive
Girls Bravo Second Season Rapidshare <a href="http://yuadouahityk6362008.blogspot.com/">Girls Bravo Second Season Rapidshare</a> Teens Beach Girls <a href="http://xuvoua6272008.blogspot.com/">Teens Beach Girls</a> |
|
|
|
|
|
루비공부 참고사이트
프로그래밍/Ruby |
2006/03/03 12:36
|
|
|
요즘 루비에 심취해 있다. 시간 날때마다 조금씩 찾아 보고 있는데 그중에서 참고할만한 사이트를 정리해서 올려 봤다.
Ruby Resources
On the Web
- http://www.rubycentral.com -- Ruby Central
- The Pragmatics Programmers site for Ruby
- Lots of goodies here, including a nice Windows installer for Ruby.
|
|
|
| 이 글의 관련글(트랙백) 주소 :: http://www.pioneer.pe.kr/trackback/10 |
|
|
|
|
«
2010/07
»
| 일 |
월 |
화 |
수 |
목 |
금 |
토 |
| |
|
|
|
1 |
2 |
3 |
| 4 |
5 |
6 |
7 |
8 |
9 |
10 |
| 11 |
12 |
13 |
14 |
15 |
16 |
17 |
| 18 |
19 |
20 |
21 |
22 |
23 |
24 |
| 25 |
26 |
27 |
28 |
29 |
30 |
31 |
|
|
Total : 41506
Today : 22
Yesterday : 20 |
|
|