Invoking an EJB deployed in WAS using Java Client an ejb 배포를 호출은 자바 클라이언트를 사용하여
EJB’s popularly known as Enterprise Java Beans are one of the state-of-the-art feature of J2EE. 널리 알려진 ejb는 엔터 프라이즈 자바 콩이 중 하나의 상태 -에 - J2 쥶 E - 예술 기능을합니다. EJB’s are mainly used for handling transactions, security, providing remote services etc. Even though lot of Object Relational Mapping Frameworks like Hibernate has replaced EJB’s which is considered to be so heavy in any Enterprise Application. ejb의 거래를 처리하기위한 사용은 주로, 보안, 원격 서비스를 제공 등등에도 불구하고 최대 절전 모드로 같은 많은 객체 관계형 매핑 프레임 워크는 대체 ejb가있는 것으로 간주 모든 엔터 프라이즈 응용 프로그램에서 너무 무거운합니다. Invoking an EJB inside the Application Server Container is quite simple and process is not as tedious when you try to do the same from outside the Application Server. an ejb 내부의 애플 리케이션 서버 컨테이너를 호출은 아주 간단하고 지루한 과정이 아니라 외부에서하려고 할 때 응용 프로그램 서버에 동일한 기능을 수행할합니다. Today I am going to explain how to invoke an EJB service which is deployed in a remote machine using a plain java client. 오늘 내가가는 ejb 서비스를 호출하는 방법을 설명하는 일반 자바를 사용하여 원격 컴퓨터에 배포된 클라이언트합니다.
Who are qualified to be the clients? 사람이 자격을하는 클라이언트가?
EJB clients are those applications, components, systems, and services that try to access the EJB to fulfill a request or get a service. ejb 고객은 이러한 어플 리케이션, 구성 요소, 시스템 및 서비스를 요청에 액세스하려고하거나 좀 ejb 서비스를 실현합니다. The client can be a device client , applet client , stand-alone java clients, EJB clients, CORBA clients, Legacy clients, JMS clients, windows clients and clients from other plat forms. 클라이언트 수있는 장치 클라이언트, 애플릿을 클라이언트, 서 - 혼자 자바 클라이언트, ejb 클라이언트, CORBA 클라이언트, 레거시 클라이언트, jms 클라이언트, windows 클라이언트와 클라이언트가 다른 플랫폼 형태합니다. Here I am gonna talk about only stand-alone java clients… 여기에 나는 서 - 혼자서만 얘기할 자바 클라이언트…
How java stand- alone client works? 자바 스탠드 - 혼자 클라이언트 작동하는 방법?
Any java application can call an EJB service that is running on a remote application server using RMI calls. ejb 서비스를 호출하는 모든 자바 응용 프로그램을 실행하는 rmi에서 원격 애플 리케이션 서버를 사용하여 호출합니다. Since EJB’s internally uses RMI over IIOP. 이후 ejb 이상의 내부를 사용 rmi iiop합니다.
How to access the EJB? ejb에 액세스하는 방법?
To look up an EJB that is remotely deployed, the stand-alone java clients has to make a look-up call through JNDI service running at a part icular port . an ejb가 원격으로 배치를 조회할의 서 - 혼자 자바 클라이언트는 서비스를 만들어보세요 jndi - 전화를 통해 icular 포트를 한 부분에서 실행합니다. JNDI is nothing but a naming-service which holds all the “object to name bindings” that - 서비스를 jndi 이름은 아무것도 아니라는 모두 "개체의 이름 바인딩을"
exists in the server . 서버에 존재합니다. Once they get the proper handle they can start to invoke the methods from the remote reference obtained using those handle. 한 번 그들은 그들이 적절한 손잡이를 호출하는 방법을 시작할 수있습니다부터 그 손잡이를 사용하여 원격 참조 취득합니다. I am not here to explain the basics; just I have given an overview that ’s all. 기본 사항을 설명하기 위해 나온 나는 여기 없어, 그냥 뒀는데에 대한 개요 그런 것들은 다합니다.
How to create an EJB-Client.jar? ejb - client.jar를 작성하는 방법?
This is just to tell you how to create ejb-client .jar. 이건 그냥 말 - 클라이언트를 만드는 방법을 ejb합니다. 병. What needs to be there? 무엇이 필요가 있나요?
1. EJB Remote Interface ejb 원격 인터페이스
2. 이. EJB Home ejb 홈
3. 3합니다. Generated stubs 스텁 생성
4. 4있습니다. Necessary class files that can be used to invoke the remote methods. 필요한 클래스 파일은 원격 메소드를 호출하는 데 사용할 수있는합니다.
5. 오. Needed jars. 단지이 필요합니다.
Make the client JAR available to the remote client . 단지 사용할 수있는 클라이언트를 원격 클라이언트합니다. For Web applications, put the ejbclient.jar in the / lib directory. 웹 응용 프로그램을 위해, 그 ejbclient.jar에서 / 여성 해방 운동 전화 번호부합니다. For non-Web clients, include ejb-client .jar in the client’s classpath. - 웹 클라이언트가 아닌, 포함 ejb - 클라이언트합니다. 단지 클라이언트의 클래스합니다. All the above said information is as per EJB-specification and from now onwards I am gonna proceed with Websphere specific information. 위의 모든 정보는 말했다 지금부터 이후로 1 ejb - 사양 및 websphere을 진행 나는 특정 정보를 꺼야합니다.
Points to be noted for Websphere: 포인트가 유명하다 websphere :
1 . 1. Websphere JNDI Standalone client will only work with the IBM JRE. 독립 실행형 클라이언트가 websphere jndi, 아이비엠 jre에서만 작동합니다.
2 . 2. And IBM does not ship their JRE standalone. 그리고 그들의 jre 선박 아이비엠은 독립 실행형합니다. (at least their 1.4 JRE) (적어도 그들의 1.4 사이트)
Note: You will not face the above said problem in JBOSS and Weblogic. 참고 :이되지 않습니다 5 개의 응답 문제에 직면하고 weblogic 위의 말했다. You just have to include the necessary jar that ’s all. 병을 포함하는 데 필요한하기만하면 그런 것들은 다합니다.
Why things are troubling us? 상황이 왜 문제가 거죠?
That was related to differences in the information used in the IBM orb and others. 관련이있는 정보의 차이가에서 사용되는 ibm 측정치 및 기타합니다. Sun changed the spec to ensure such issues went away. 태양 변경과 같은 문제에 사양을 떠나게 수 있도록합니다. All complying implementations should interoperate out of the box now. 밖으로의 모든 상호 운용 상자는 현재 구현을 준수합니다.
Process for Accessing the EJB services from Websphere: ejb 서비스에 액세스하는 과정을 websphere :
This document provides the guidelines for accessing the Ejb services running in the Websphere Application server from any other external application servers or applications. 이 문서에 대한 지침을 제공합니다 websphere에서 실행되고있는 서비스에 액세스하는 애플 리케이션 서버에서 ejb 기타 외부 응용 프로그램 서버 또는 응용 프로그램을합니다.
JAR Collection 단지 컬렉션
To access the Ejb service some of the jar files have to include to the classpath of the application. ejb 서비스에 액세스하려면 단지의 일부 파일은 응용 프로그램의 클래스를 포함합니다. This has to be collected from the Websphere lib directory. 이것은 여성 해방 운동 전화 번호부에 websphere에서 수집합니다. They are, 그들은,
1 . 1. bootstrap.jar
2 . 2. ecutils.jar
3 . 3. ffdc.jar
4 . 4. idl.jar
5 . 5. iwsorb.jar
6 . 6. j2ee.jar
7 . 7. lmproxy.jar
8 . 8. naming.jar
9 . 9. namingclient .jar namingclient합니다. 병
10 . 10. ras.jar
11 . 11. sas.jar
12 . 12. utils.jar
JRE Collection jre 컬렉션
The compilation conflict occurs from the versions of the JRE used. 의 편집 버전의 jre 사용할에서 충돌이 발생합니다. As we access the IBM specific classes we need to have IBM jre collection. 특정 클래스에 액세스 ibm 우리가 우리 ibm jre 수집해야합니다. Create jre library from the java folder in the Websphere. 자바 폴더에있는 도서관을 만들 jre websphere합니다. And also it is must to use sun jre along with 그리고 또한 그것은 태양 jre와 함께 사용해야합니다
that , and then include the j2ee.jar from sun provided J2SDKEE ( this holds the except ions of Ejb) . 를 누른 다음을 포함 j2ee.jar 태양에서 제공 j2sdkee (이 보유하고 이온의 ejb를 제외).
1. IBM jre ( this library has to be created from the whole java directory) ibm jre (이 라이브러리는 전체가 만들어진 자바 디렉토리)
2. 이. SUN jre ( this library has to be created from jdk not jre) 태양 jre (이 라이브러리는 jdk 안에 만들어진 사이트)
3. 3합니다. j2ee.jar ( j2sdkee) j2ee.jar (j2sdkee)
Properties 등록 정보를
IBM maintains a property file for establishing connect ions with the iiop. 파일의 속성을 유지 ibm 이온을 수립 iiop에 연결합니다. So the application should include that property file. 이 속성 않으므로 응용 프로그램의 파일을 포함해야한다. It is named as implfactory.properties 그것의 이름으로 implfactory.properties
1. Implfactory.properties implfactory.properties
Context Parameters 문맥 매개 변수를
INITIAL_CONTEXT_FACTORY = com.ibm.websphere.naming.WsnInitialContextFactory initial_context_factory = com.ibm.websphere.naming.wsninitialcontextfactory
PROVIDER_URL = iiop: //hostname:2809 provider_url = iiop : / / 호스트 이름 : 2809




























