<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet href="http://rss.egloos.com/style/blog.xsl" type="text/xsl" media="screen"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
	<title>제다</title>
	<link>http://jaeda.egloos.com</link>
	<description>내가 산 흔적일랑 
남겨둬야지 ^^</description>
	<language>ko</language>
	<pubDate>Fri, 20 Nov 2009 06:02:57 GMT</pubDate>
	<generator>Egloos</generator>
	<image>
		<title>제다</title>
		<url>http://md.egloos.com/img/samplelogo2.gif</url>
		<link>http://jaeda.egloos.com</link>
		<width>80</width>
		<height>80</height>
		<description>내가 산 흔적일랑 
남겨둬야지 ^^</description>
	</image>
  	<item>
		<title><![CDATA[ 화면캡쳐 프로그램 Jing ]]> </title>
		<link>http://jaeda.egloos.com/2757547</link>
		<guid>http://jaeda.egloos.com/2757547</guid>
		<description>
			<![CDATA[ 
  문서작업을 위해서 맥에서 쓸만한 화면캡쳐 프로그램을 찾다가 JING이라는 프로그램을 알게되었다.<br />
이 프로그램도 snagit을 만든 회사서 만든 것이다.<br />
현재 개발중이라서 그런지 공짜로 배포되고 있다. 써보니 괜찮다. 다만 캡쳐방식이 영역을 선택하는 방식이지만 UI 괜찮고 동영상 켭쳐되는등 나름 좋다.<br />
			 ]]> 
		</description>
		<category>맥</category>

		<comments>http://jaeda.egloos.com/2757547#comments</comments>
		<pubDate>Fri, 20 Nov 2009 06:02:57 GMT</pubDate>
		<dc:creator>제다</dc:creator>
	</item>
	<item>
		<title><![CDATA[ OSX에서 vbox의 브릿지 네트웤 문제 잡아냄 ]]> </title>
		<link>http://jaeda.egloos.com/2744351</link>
		<guid>http://jaeda.egloos.com/2744351</guid>
		<description>
			<![CDATA[ 
  vbox에 XP를 깔아서 돌리는데, 브릿지 네트웤이 동작이 잘 되지 않는 문제가 있었다. 현상은 ping은 되는데 웹페이지 여는데 한참 걸리거나 열지 못하는 것이었다. 물론 NAT방식을 쓰면 되지만 이 방식은 몇가지 한계가 있다. <br />
<br />
웹서핑으로 알아낸 것이 설정의 문제가 아니라 MTU의 문제였다. 2.x대는 또다른 문제가 있겠지만, 3.0.10에서는 XP의 MTU설정을 1472 (혹은 그 이하)로 설정하니까.. 잘된다.<br />
<br/><br/>tag : <a href="/tag/osx" rel="tag">osx</a>,&nbsp;<a href="/tag/vbox" rel="tag">vbox</a>			 ]]> 
		</description>
		<category>맥</category>
		<category>osx</category>
		<category>vbox</category>

		<comments>http://jaeda.egloos.com/2744351#comments</comments>
		<pubDate>Tue, 10 Nov 2009 01:34:54 GMT</pubDate>
		<dc:creator>제다</dc:creator>
	</item>
	<item>
		<title><![CDATA[ 맥을 깔다 ]]> </title>
		<link>http://jaeda.egloos.com/2735599</link>
		<guid>http://jaeda.egloos.com/2735599</guid>
		<description>
			<![CDATA[ 
  맥을 깔고 사용한지 한달 가까이 되간다.<br />
설치는 운이 좋아서 별다른 어려움이 없었다. 10.5.6을 깔고 10.5.8로 성공적으로 업그레이드.<br />
<br />
아직 짧은 시간이지만 맥을 사용하면서 리눅스보다 좋은 점, 나쁜점이 몇가지 느꼈다. 그 느낌을 말하기 전에 웹개발시 필요한 프로그램들이 어느정도 도는지 보면 이클립스,파폭,open office 모두 잘돈다. 자바는 썬사랑 아웅다웅하지만 현재 1.6.0은 돌릴 수 있다. 원격연결은 CoRD라는 프로그램을 써보니 괜찮다. TOAD라던지 ms-office는 virtualbox에서 돌리면 충분할 듯...&nbsp; 우리나라에서는 아직도 windows환경이 편한점이 있지만, 웹개발만을 놓고 본다면 맥도 리눅스 못지 않게 작업을 할 수 있다. 하지만 open source쪽 라이브러리 및 프로그램을 많이 사용해야 된다면 당근 리눅스...<br />
<br />
일단 맥의 좋은 점음 무엇보다도 뽀대와 정리된 느낌이라고 하겠다. 리눅스의 콤피즈등은 맥보다 훨씬 좋은 뽀대지만 개개의 프로그램들이 정리된 UI를 통해서 동작하는 모습은 아무래도 상용인 맥이 낫지 않은가 싶다. <br />
<br />
리눅스(우분투)보다 나쁜점은 아무래도 오픈소스진영과 덜 친하다는 것이고, 한글과 관련된 환경이 좀..., 게다가 해킨토시라서 그런지 장비를 지원하는게 리눅스보다 약하다. 은근히 불편한게 윈도즈,리눅스의 Control키 기능이 맥에서는&nbsp; Command키가 많은 부분을 대체하기 때문에 키보드가 아직은 헷갈린다. 다행히 코딩속도가 느린편이라서... 불헹증디헹<br />
<br />
현재 해킨토시 설정이 안되고 있는 것은 <br />
&nbsp;virtualbox의 브릿지어댑터랑 키보드중에서 한영키등 몇개의 키들이 인식되지 않고 있다. 쩝.<br />
<br/><br/>tag : <a href="/tag/leopard" rel="tag">leopard</a>,&nbsp;<a href="/tag/osx" rel="tag">osx</a>			 ]]> 
		</description>
		<category>맥</category>
		<category>leopard</category>
		<category>osx</category>

		<comments>http://jaeda.egloos.com/2735599#comments</comments>
		<pubDate>Tue, 03 Nov 2009 04:01:39 GMT</pubDate>
		<dc:creator>제다</dc:creator>
	</item>
	<item>
		<title><![CDATA[ 우분투에서 eclipse + xdebug ]]> </title>
		<link>http://jaeda.egloos.com/2275982</link>
		<guid>http://jaeda.egloos.com/2275982</guid>
		<description>
			<![CDATA[ 
  근 한달반만이다. <br />
<br />
이클립스서 PHP디버깅작업을 위한 설정을 검토해봤다. 우분투8.04에 맞춰졌다.<br />
zender와 xdebug중 xdebug를 선택했다. 첫째이유는 라이센스문제이고 두번째는 xdebug는 꾸러미관리자로 설치가 가능하기 때문이다.<br />
<br />
이클립스에는 물론 PDT가 깔려있다고 가정한다.<br />
우분투 꾸러미관리자로 xdebug를 검색해서 설치한다. 설치후 /etc/php5/cond.d 디렉토리에 가면 xdebug.ini파일이 생겼을 것이다.<br />
<br />
여기에 아래 내용을 추가한다.<br />
<code>xdebug.remote_enable=On<br />
<br />
물론 아래의 추가내용이 필요한데. 이미 기본값으로 설정된 값들이다. 그 값이 다르다거나, 하다면 추가한다.<br />
같다면 생략해도 무방하다.<br />
</code><code>xdebug.remote_host=”localhost”<br />
xdebug.remote_port=9000<br />
xdebug.remote_handler=”dbgp”</code><br />
<br />
아파치를 구동한 후 &lt;?php phpinfo(); ?&gt;로 확인하면 xdebug설정내용이 있을 것이다.<br />
다시 이클립스로 와서 Window&gt;Prefereces의 PHP탭에서 디버거를 xdebug로 바꾼다.<br />
<br />
마지막으로 내가 원하는 파일을 디버깅하면 된다.<br />
<br />
<br/><br/>tag : <a href="/tag/이클립스" rel="tag">이클립스</a>			 ]]> 
		</description>
		<category>리눅스</category>
		<category>이클립스</category>

		<comments>http://jaeda.egloos.com/2275982#comments</comments>
		<pubDate>Mon, 02 Feb 2009 05:31:54 GMT</pubDate>
		<dc:creator>제다</dc:creator>
	</item>
	<item>
		<title><![CDATA[ 웹워크 form에서 객체배열 제출하기 삽질중 ]]> </title>
		<link>http://jaeda.egloos.com/2224669</link>
		<guid>http://jaeda.egloos.com/2224669</guid>
		<description>
			<![CDATA[ 
  웹워크에서 Collection을 폼문으로 제출할 때 아래의 HTML코드는 제대로 작동하지 않는다.<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;input type="hidden" name="item.medias.pk.itemId" value="1"/&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;input type="hidden" name="item.medias.pk.dispOrder" value="0"/&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;input type="hidden" name="item.medias.title" value="123"/&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;input type="hidden" name="item.medias.pk.itemId" value="1"/&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;input type="hidden" name="item.medias.pk.dispOrder" value="1"/&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;input type="hidden" name="item.medias.title" value="1234567"/&gt;<br />
<br />
item.medias가 Collecton으로 선언되었다. item.medias객체는 JPA를 사용한 빈인데, pk속성은 2개의 주키를 묶는 객체이다. 위의 코드로 폼문을 제출하면 'title'속성은 제대로 값이 들어가지만 pk속성은 null이 된다. 그런데, 이 코드를 아래와 같이 바꾸면 된다. <br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;input type="hidden" name="item.medias[0].pk.itemId" value="1"/&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;input type="hidden" name="item.medias[0].pk.dispOrder" value="0"/&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;input type="hidden" name="item.medias[0].title" value="123"/&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;input type="hidden" name="item.medias[1].pk.itemId" value="1"/&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;input type="hidden" name="item.medias[1].pk.dispOrder" value="1"/&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;input type="hidden" name="item.medias[1].title" value="1234567"/&gt;<br />
<br />
물론 바로 위의 방식을 사용하면 된다. 하지만 위의 코드는 테스트 코드일뿐이고 실제 구현하고자 하는 것은 동적으로 폼데이타를 구성하는 것이다. 그래서 하나하나의 항목(item.medias)이 더해지기도 하고, 빼지기도 하고, 순서가 바뀌기도&nbsp; 한다. 자바스크립트에서 첫번째 방식이 두번째 방식보다 훨씬 편하다. <br />
<br />
그래서 찾아봤다. 첫번쨰 방식으로 할 수 있는지. 결론은 실패했다. 쩝.<br />
<br />
OGNL문서를 아무리 보고 또 봐도 답을 찾지 못했다. 그렇다고 자바스크립트 구현시 깔끔함을 포기하기 뭐해서 item.medias의 빈객체에 @Transient속성을 추가했다. itemId와 dispOrder 그리고 폼문에 들어가는 것은 아래와 같이 고쳐졌다.<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;input type="hidden" name="item.medias.itemId" value="1"/&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;input type="hidden" name="item.medias.dispOrder" value="0"/&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;input type="hidden" name="item.medias.title" value="123"/&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;input type="hidden" name="item.medias.itemId" value="1"/&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;input type="hidden" name="item.medias.dispOrder" value="1"/&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;input type="hidden" name="item.medias.title" value="1234567"/&gt;<br />
<br />
그러나. 안된다. OTL&nbsp; (TT) 결국 두번째 방법을 써야 하는가? 마감일은 다가오는데, 함 오기 부려봐?<br />
<br />
내 실력으로는 여기까지...<br />
<br />
<br/><br/>tag : <a href="/tag/webwork" rel="tag">webwork</a>			 ]]> 
		</description>
		<category>일</category>
		<category>webwork</category>

		<comments>http://jaeda.egloos.com/2224669#comments</comments>
		<pubDate>Thu, 18 Dec 2008 00:52:37 GMT</pubDate>
		<dc:creator>제다</dc:creator>
	</item>
	<item>
		<title><![CDATA[ 여러개의 DB를 사용할 때 스프링프레임웤의 @Transactional의 사용 ]]> </title>
		<link>http://jaeda.egloos.com/2208673</link>
		<guid>http://jaeda.egloos.com/2208673</guid>
		<description>
			<![CDATA[ 
  하나의 웹어플리케이션에서 여러개의 DB와 같이 동작을 할 때, @Transactional의 사용에는 문제가 발생한다. 물론 돌게는 만들 수 있지만, 여러개의 DB중 순서상 앞에 있는 DB와 통신이 되지 않으면 뒤에 있는 DB와도 먹통이 된다. aop의 트랜잭션설정을 이용해도 되지만 이 때는 함수이름의 제약등이 따르고 설정의 귀차니즘이... 코드상에서 직접제어하는 것은 말 그대로 이전의 방식으로 되돌아 가는 것이다. JTA의 사용은 여러개의 DB를 동시에 하나의 트랜잭션으로 묶을 때 필요한 것이지 서로 독립된 여러개의 DB를 다루는 위의 상황에서는 전혀 도움이 되지 않는다.<br />
<br />
자 어찌 할 것인가. 당근 만들기로 했다. 개발에서는 이런 재미가 쏠쏠...<br />
<br />
우선 aspectj를 이용하기로 했다. 그리고 @Transactional에 대응하는 어노테이션을 새로이 정의하기로 했다.<br />
아래 코드는 새로 만든 어노테이션이다.<br />
@Retention(RetentionPolicy.RUNTIME)<br />
@Target({ElementType.METHOD, ElementType.TYPE})<br />
public @interface TemplateTransactional<br />
{<br />
&nbsp;&nbsp;&nbsp; Propagation propagation() default Propagation.REQUIRED;<br />
&nbsp;&nbsp;&nbsp; Isolation isolation() default Isolation.DEFAULT;&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp; boolean readOnly() default false;<br />
&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp; /** 트랜잭션을 걸 테플릿 이름을 설정한다 */<br />
&nbsp;&nbsp;&nbsp; String&nbsp;&nbsp;&nbsp; template();<br />
}<br />
<br />
그리고 aspectj용 프락찌 객체를 만들었다 코드는 아래와 같다.<br />
@Aspect<br />
public class TransacionalAspect implements Ordered<br />
{<br />
&nbsp;&nbsp;&nbsp; private int order;<br />
&nbsp;&nbsp;&nbsp; private Map&lt;String, TransactionTemplate&gt;&nbsp;&nbsp;&nbsp; templateMap;<br />
<br />
&nbsp;&nbsp;&nbsp; @Around("@annotation(com.goorm.annotation.TemplateTransactional)")<br />
&nbsp;&nbsp;&nbsp; public Object transaction(ProceedingJoinPoint pjp) throws Throwable<br />
&nbsp;&nbsp;&nbsp; {<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; MethodSignature&nbsp;&nbsp;&nbsp; signature = (MethodSignature)pjp.getSignature();<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; TemplateTransactional&nbsp;&nbsp;&nbsp; annotation = signature.getMethod().getAnnotation(TemplateTransactional.class);<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if ( annotation.readOnly() )<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return signature.getMethod().invoke(pjp.getTarget(), pjp.getArgs());<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; else<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; // TODO propagation하고 isolation에 대한 코드필요<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; TransactionTemplate&nbsp;&nbsp;&nbsp; template = this.templateMap.get(annotation.template());<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return template.execute(new TransactionalAspectCallback(pjp));<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp; }<br />
<br />
&nbsp;&nbsp;&nbsp; // GETTER/SETTER methods ///////////////////////////////////////////////////<br />
&nbsp;&nbsp;&nbsp; public int getOrder() {<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return order;<br />
&nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp; public void setOrder(int order) {<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; this.order = order;<br />
&nbsp;&nbsp;&nbsp; }<br />
<br />
&nbsp;&nbsp;&nbsp; public Map&lt;String, TransactionTemplate&gt; getTemplateMap() {<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return templateMap;<br />
&nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp; public void setTemplateMap(Map&lt;String, TransactionTemplate&gt; templateMap) {<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; this.templateMap = templateMap;<br />
&nbsp;&nbsp;&nbsp; }<br />
}<br />
<br />
transaction함수가 중요하다. apectj에 의해서 위에서 만든 어노테이션이 붙은 함수가 호출되면 이 함수가 먼저 호출된다.<br />
함수안에서는 어노테이션을 분석해서 적당한 트랜잭션템플릿을 구하고 실제함수를 템플릿을 통해 호출하면 된다.<br />
테플릿에 사용할 callback객체 코드는 아래와 같다.<br />
<br />
&nbsp;&nbsp;&nbsp; public Object doInTransaction(TransactionStatus status)<br />
&nbsp;&nbsp;&nbsp; {<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; try<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; MethodSignature&nbsp;&nbsp;&nbsp; signature = (MethodSignature)joinPoint.getSignature();<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return signature.getMethod().invoke(this.joinPoint.getTarget(), this.joinPoint.getArgs());<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; //return this.joinPoint.proceed(this.joinPoint.getArgs());<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; catch(Throwable err)<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; throw new Error();<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp; }<br />
<br />
위의 코드를 보면 주석처리된 곳이 있는데, 주석처리된 코드를 사용하면 맴돌게 된다. 그래서 예외가 발생하게 된다. 추가로 결과를 Object를 통해서 반환하는데, 실제 함수반환형이 void를 포함해서 모든 것에 작동한다.<br />
<br />
스프링 설정은 아래와 같다.<br />
&nbsp;&nbsp;&nbsp; &lt;aop:aspectj-autoproxy/&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;bean class="org.springframework.aop.aspectj.annotation.AnnotationAwareAspectJAutoProxyCreator" /&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;bean id="myAspect" class="com.goorm.aop.TransacionalAspect"&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;property name="templateMap"&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;map&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;entry key="bbs"&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;bean class="org.springframework.transaction.support.TransactionTemplate"&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;property name="transactionManager" ref="bbsTxManager"/&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/bean&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/entry&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/map&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/property&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;/bean&gt;<br />
<br />
templateMap속성에 사용할 트랜잭션템플릿을 두고 트랜잭션을 걸 함수 앞에 @TemplateTransactional(template="bbs")와 같이 쓰면 해당 템플릿을 통해서 트랜잭션이 걸리게 된다. 물론 이 방법이 약이 될 수도 독이 될 수동 있다.<br />
<br />
<br/><br/>tag : <a href="/tag/Springframework" rel="tag">Springframework</a>			 ]]> 
		</description>
		<category>개발</category>
		<category>Springframework</category>

		<comments>http://jaeda.egloos.com/2208673#comments</comments>
		<pubDate>Thu, 04 Dec 2008 08:54:54 GMT</pubDate>
		<dc:creator>제다</dc:creator>
	</item>
	<item>
		<title><![CDATA[ IE 인코딩 자동선택의 문제 ]]> </title>
		<link>http://jaeda.egloos.com/2196906</link>
		<guid>http://jaeda.egloos.com/2196906</guid>
		<description>
			<![CDATA[ 
  웹코딩 10년이면 웬만한 것은 다 겪었다고 했는데, 엊그제 첨 겪는 황당한 일이 일어났다. 기존 사이트를 유지보수작업중의 하나로 html파일을 떨구는 작업을 하다가 어떤 파일에 16진수로 &lt;FEFF&gt;인 문자가 있어서 이것을 제거했는데, 이런, 모든 페이지가 난리다. IE의 인코딩을 자동선택을 해놓으면 페이지의 정확인 인코딩을 못찾고, 그결과 휜페이지 뜨고, 한글은 깨지고... 쩝.<br />
<br />
반나절을 씨름했다. unix의 LANG설정 및 i18n설정 확인, 아파치 다국어설정 확인, 파일의 인코딩 확인, telnet으로 직접 수신문자열 분석을 했는데, 어떤 단서도 못찾았다. 근데 html의 Content-type에 대한 메타정의를 &lt;title&gt;앞에 놓은니까. IE가 제대로 인코딩을 해석하는 것이다. 정확히 말하면 한글이 나오기 전에 Content-type에 대한 메타정의를 두면된다.<br />
<br />
무슨 이유인지는 모르지만, IE가 응답되어진&nbsp; html코드를 ISO-8859-1로 해석을 하기 때문에 발생된 문제인데, 나로서는 IE버그 아니면, 아파치빌드시 LANG값 설정에 의심을 두지만 근거는 없다.쩝.			 ]]> 
		</description>
		<category>일</category>

		<comments>http://jaeda.egloos.com/2196906#comments</comments>
		<pubDate>Fri, 28 Nov 2008 04:51:24 GMT</pubDate>
		<dc:creator>제다</dc:creator>
	</item>
	<item>
		<title><![CDATA[ 하이버네이트에서  WrongClassException !!! ]]> </title>
		<link>http://jaeda.egloos.com/2163904</link>
		<guid>http://jaeda.egloos.com/2163904</guid>
		<description>
			<![CDATA[ 
  아래 어노테이션을 이번에 사용을 하였는데, WrongClassException이 발생했다.<br />
@Inheritance(strategy=InheritanceType.SINGLE_TABLE)<br />
@DiscriminatorColumn<br />
<br />
왜 그럴까? 일단 하이버네이트 소스를 봤다. org.hibernate.loader.Loader객체의 getInstanceClass함수에서 발생을 하는데, 이 함수가 하는일은 조회된 결과(ResultSet)을 담을 객체가 누구인지 결정하는 작업을 한다. 근데, 이녀석은 하위클래스가 선언이 되었다면 DiscriminatorColumn어노테이션에 대한 확인작업이 들어간다. 예를 들면.<br />
<br />
@Entity<br />
class Aaa<br />
....<br />
<br />
위의 엔터티에 대해서 "from Aaa"라는 SQL문을 돌렸다면, 그 결과를 담을 객체를 결정할 때 Aaa(자신)으로 부터 상속받은 자식넘들이 있는지 확인하고, 있다면 DiscriminatorColumn에 정의된 필드값을 가지고 해당 객체를 찾는다. 문제는 이곳에 있다. 만약 해당객체가 정의되지 않았다면 WrongClassException이 발생한다.<br />
<br />
예를 들면 DiscriminatorColumn에 사용할 필드를 'type'필드라 하고 그 값은 0,1,2 3가지 중에 하나의 값을 갖는다. 그런데, 이 값들에 대해서 각각 Aaa의 자식넘들을 정의하지 않고, DBMS로부터 조회한 결과의 'type'필드값이 정의하지 않은 값이라면 WrongClassException 이 발생한다.<br />
<br />
쩝. 이게 JPA규약에 있었던가? 못본거 같은데... 내상각으로 정의된 객체가 없다면, 그냥 자신으로 하던가 하지...<br />
<br />
			 ]]> 
		</description>
		<category>일</category>

		<comments>http://jaeda.egloos.com/2163904#comments</comments>
		<pubDate>Thu, 13 Nov 2008 05:40:33 GMT</pubDate>
		<dc:creator>제다</dc:creator>
	</item>
	<item>
		<title><![CDATA[ IE쪽이 맞는걸까? 파폭쪽이 맞는걸까? ]]> </title>
		<link>http://jaeda.egloos.com/2117522</link>
		<guid>http://jaeda.egloos.com/2117522</guid>
		<description>
			<![CDATA[ 
  오늘 디버깅도중 황당한 경우가 발생하였다. 파폭에서는 멀쩡하게 도는 페이지가 IE에서는 먹통이다. 왠만해서는 양쪽 다 잘돌게 만든다고 생각했는데 왜 이러지 하면 원인을 찾다보니 이럴수가....<br />
<br />
일단 아래의 자바스크립트 코드를 보자.<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; var CHIP_TIMES_OPTIONS = <br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; [<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; new Option("비노출", "0")<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; , new Option("10회", "10")<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; , new Option("30회", "30")<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; , new Option("50회", "50")<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; , new Option("100회", "100")<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; , new Option("무제한", "9999"),<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ];<br />
<br />
파폭에서는 CHIP_TIMES_OPTIONS.length는 6이다 그러나 IE쪽은 7이다 왜그럴까... 그것은 맨뒤에 쉽표때문이다.<br />
오타로 들어간 이 쉼표때문에, IE는 배열에 null인 7번째 항목이 있다고 보는 것이다. 즉, 극단적으로 정리를 하면 아래 코드를 보면 되겠다.<br />
<br />
var A = [,,,];<br />
<br />
위의 코드를 파폭은 A.length가 0으로 IE는 4가 되겠구나라고 생각이 되겠지만 테스트 결과는 IE는 예측대로 나왔지만 파폭은 A.length가 3이다. <br />
<br />
따라서 결론은 파폭이 틀린것 같고, 스크립트 파싱오류가 있는것으로 생각된다. 그리고, 자바스크립트에서 배열선언에서 특별한 방법또한 배웠다. ㅋ<br />
			 ]]> 
		</description>
		<category>일</category>

		<comments>http://jaeda.egloos.com/2117522#comments</comments>
		<pubDate>Fri, 24 Oct 2008 00:52:38 GMT</pubDate>
		<dc:creator>제다</dc:creator>
	</item>
	<item>
		<title><![CDATA[ 우분투 2개의 네트워크카드 쓰기 ]]> </title>
		<link>http://jaeda.egloos.com/2098555</link>
		<guid>http://jaeda.egloos.com/2098555</guid>
		<description>
			<![CDATA[ 
  우분투 하디에서 네트워크 설정은 /etc/network에 들어간다. 그곳에 interfaces라는 파일이 있는데, 이파일에서 카드설정을 해주면 된다. man interfaces하면 유용한 정보를 구할 수 있다.<br />
<br />
그러나, 몇가지 문제가 있다.<br />
<br />
1. default 라우팅 중복: 모든 주소에 대한 기본라우팅이 2개 모두 설정된다. interfaces에 auto 명령을 빼고 수동으로 잡아줘도 되지만, auto명령이 어떤일들을 하는지 모르는 상태이기 때문에, 거꾸로 중복된 것중에 하나를 빼는 것으로 했다. <br />
# ip route show&nbsp; &lt;== 이 명령으로 현재 설정된 라우팅테이블을 볼 수 있다.<br />
<br />
2. 방화벽: 방화벽으로 firestarter를 쓰고 있는데, 이 것이 돌고 있으면 두번째 네트워크카드가 통신을 하지 못한다. firestarter프로그램에 대해서 자세히 모르는 나로서는 일단 firestarter를 내렸다. <br />
<br />
3. 라우팅정보 수동설정필요: 예를 들어서 2번째 카드의 네트워크가 1.1.1.0/24이고 이 카드를 통해서 2.2.2.0/24망에 있는 컴터에 붙고자 한다면 라우팅정보를 수동으로 설정해줄 필요가 있다.<br />
# route add .... &lt;== 잘 아는 명령어<br />
<br />
위의 작업들은 대부분 /etc/network디렉토리에서 이루어진다. man interfaces하면 거기에 모든 정보가 있다.<br />
<br />
마지막으로 설정적용은 <br />
# sudo /etc/init.d/networking restart<br />
			 ]]> 
		</description>
		<category>리눅스</category>

		<comments>http://jaeda.egloos.com/2098555#comments</comments>
		<pubDate>Thu, 16 Oct 2008 01:34:49 GMT</pubDate>
		<dc:creator>제다</dc:creator>
	</item>
</channel>
</rss>
