참조 : http://blog.springsource.com/2009/02/27/spring-integration-on-dm-server/

  1. Download and install the SpringSource Tool Suite and dm Server (this is as easy as unzipping the files). You can also use Eclipse with the dm Server tools and Spring IDE if you prefer.
  2. Configure a dm Server under the default name and start it
    1. open the Server view, right click in it and select new
    2. type Spring in the search window and select SpringSource dm Server 1.0
    3. point to the unzipped dm Server directory
  3. Update your bundle repository and install Spring Integration Core 1.0.1 and Commons Logging 1.1.1
    1. double click the newly created server a server management console opens
    2. select the repository tab and click 'Update local bundle and library repository index'
    3. search for Spring Integration and download the core bundle
    4. start the server
  4. Import the projects from the Spring Integration sandbox
    1. check out the projects to a local working directory
    2. From STS select File->Import->Existing projects into workspace and point to the working directory

본문에서 윗 부분을 보고 그대로 따라했더니 됐습니다. 흠.. 간략히 요약하자면

1. STS는 어제 2.0 소식을 접하고 한 번 설치해본터라 쉽게 했고 dm Server는 최신 버전 1.0.2를 새로 받아서 설치했습니다.

2. dm Server를 서버 창에 추가해줍니다.

3. dm Server를 더블클릭하고 Repository 탭에서 spring integration로 검색한 다음 spring integration core 1.0.1 번들을 다운로드 합니다.

4. 서버를 실행합니다.

5. 스프링 인티그레이션 sandbox 예제 소스를 받아옵니다.

svn co https://src.springframework.org/svn/spring-integration/sandbox/si-osgi

6. 위에서 받아온 예제를 이클립스에서 import 합니다.
- 이 때 scribe 프로젝트의 MANIFEST.MF에서 에러가 발생할 수 있는데 스프링 2.5.6 라이브러리가 필요해서 그렇습니다. 그 떄는 에러가 발생한 지점을 클릭하고 퀵픽스를 이용해서 필요한 라이브러리를 다운받으면 됩니다.

7. com.springsource.samples.integration.osgi 프로젝트를 드래그 앤 드랍으로 dm server에 추가해줍니다.

8. 서버 콘솔에서 ss로 설치된 번들을 확인합니다.

사용자 삽입 이미지
자 이렇게 번들이 잘 설치됐는지 확인합니다. 끝났습니다. 이제 스프링 인티그레이션 예제가 잘 돌고 있나 확인해봐야겠죠?? 참고로 이 예제 애플리케이션은 콘솔에 뭔가 출력하는게 없고 전부 로깅을 하기 때문에 콘솔로는 이 애플리케이션이 제대로 돌고 있는지 확인하기 어렵습니다.

town crier가 주기적으로 소리를 지르면 scribe는 그때 그때 메시지를 받아가고 goverment는 주기적으로 메시지를 가져갑니다. 자세한 건 소스 코드를 참조해 보시구요. 이렇게 동작하는지 일단 눈으로 보고 싶다면 dm server를 설치한 곳으로 이동하여 trace.log 파일을 열어봐야 합니다.

사용자 삽입 이미지
저 위치의 파일을 열어 보면 다음과 같이 주요 메시지가 정기적으로 출력되는 걸 볼 수 있습니다.

사용자 삽입 이미지
자~~ 이제 가지고 놀 장난감이 준비 됐네요. 이 녀석하고 놀면서 스프링 인티그레이션, 스프링 dm 서버, 스프링 dm + OSGi 등과 친해져야겠네요. +_+

차후에 프로젝트도 좀 더 분석해서 스크린캐스팅을 제공하겠습니다. 캬캬