[WebLogic8.1 환경설정]

[WebLogic8.1 환경설정]
 - why? : EJB Container 사용

1. 웹로직 설치
2. configration wizard : mydomain 추가

[Web Context 추가 및 확인]
1. C:\bea8\user_projects\domains\mydomain\applications
   - webtest
        ㄴ WEB-INF
       ㄴ web.xml
       ㄴ weblogic.xml
        ㄴ index.html

2. console 에서 web application module 추가
   mydomain - deployments - web application modules
   Deploy a new Web Application Module...

   webtest target & deploy

3. http://localhost:7001/webtest/index.html 확인


[ejb deploy]
- java -> class
- 3개 java -> 3개 class (aaa.jar)
- web context -> 1개 war

html -> hello world
serlvet -> web.xml
jsp -> hello world
ejb -> hello world! -> 분산처리 -> ejb

by 치자씨 | 2008/03/20 14:09 | EJB | 트랙백

EJB 개발

1. J2EE API
   javax.ejb.*

2. EJB
   - Session Bean(비니지스 로직)
     - Stateless(무상태)
     - statefull(상태유지)
   - Entity Bean(디비 지속성)
     - BMP(Bean)
     - CMP(Container)
   - Message Driven Bean(메세지)


2. EJB 개발

   EJBHome, EJBLocalHome -> implements -> Home interface
   EJBObject, EJBLocalObject -> implemtns -> Remote interface
   SessionBean, EntityBean, MessageDrivenBean -> implemtns -> Bean class

   2-1. Home interface, Remote interface, Bean class 작성
   2-2. 3개의 컴파일
   2-3. 배치 디스크립터 작성(WebLogic Builder) -> xml(설정)
   2-4. 3개 class + DD -> XXX.jar (압축)
   2-5. deploy

   2-6. XXX.jar -> lookup -> jsp, java


3. 어떤 일을 하냐?
   Home interface -> Remote interface return
   Remote interface -> method()

   Bean class -> method()

by 치자씨 | 2008/03/20 14:08 | EJB | 트랙백

호출 시간 확인 하는 EJB

호출 시간 확인 하는 EJB

 EJBObject   -> CurrentTime
 EJBHome     -> CurrentTimeHome
 SessionBean -> CurrentTimeBean

   2-1. Home interface, Remote interface, Bean class 작성

   2-2. 환경 설정 추가 (jdk1.4)
        2-2-1 : CLASSPATH : C:\bea8\weblogic81\server\lib\weblogic.jar
 2-2-2 : JAVA_HOME : C:\j2sdk1.4
 2-2-3 : PATH : C:\j2sdk1.4\bin

   2-3. 3개의 컴파일

   2-4. 배치 디스크립터 작성(WebLogic Builder) -> xml(설정)
        2-3-1 : JNDI Name

   2-5. 3개 class + DD -> XXX.jar (압축)
        jar cvf helloworld.jar *.*
 kosta/sb/sample1/*.class
 META-INF/*.xml

   2-6. deploy
        2-6-1 : 컴파일 정상인데 deploy error 발생하면 ejb spec에 어긋난것임.
 2-6-2 : jdk1.4 버전 확인
 2-6-3 : remote object, bean class method 매핑 확인
 2-6-4 : home interface, bean class mehtod 매핑 확인
 2-6-5 : 컴파일시에 에러를 보여주지 않음.
         why? 서로 상속이나 구현관계가 아님.

   2-7. XXX.jar -> lookup -> jsp

        WEB-INF/lib/xxx.jar copy

        Context ctx = new InitialContext();
 Object o = ctx.lookup("jndi name");
 Home home = casting;
 Remote remote = home.create();

 remote.methodAAA();

by 치자씨 | 2008/03/20 14:07 | EJB | 트랙백

◀ 이전 페이지 다음 페이지 ▶