Sebuah) Using a Java project or Java Utility project What are the two packaging options available?Īnswer: Two available options are as follows Where do you provide user defined binding information?Īnswer: The user defined binding information is provided in a newly created file called META-INF/ibm-ejb-jar-bnd.xml.
![cara menggunakan jar of beans cara menggunakan jar of beans](https://ae01.alicdn.com/kf/HLB1f9ceRNTpK1RjSZR0q6zEwXXaB/6-Pack-Stainless-Steel-Sprouting-Lids-Curved-Mesh-Jar-Sprouting-Lid-Kit-For-Wide-Mouth-Mason.jpg)
What is the best practice for all EJB related bindings?Īnswer: The best practice is to group all the EJB-related bindings under the EJB context.
![cara menggunakan jar of beans cara menggunakan jar of beans](https://assets.jalantikus.com/assets/cache/560/262/userfiles/2019/09/23/15-6aad0.jpg)
Where do you bind the remote interfaces and why?Īnswer: All the remote interfaces are bound into the global-scoped name space so that they are accessible from anywhere in the Websphere product cell. What are the different parts of a component ID?Īnswer: The component ID for EJB is formed using the enterprise bean’s application name, module name and component name.Īnswer: All local interfaces are bound into the ejblocal: name space, which is accessible only within the same JVM. What are the two default bindings used by the container?Īnswer: In short binding, package-qualified Java class name of the interface is only used.Īnswer: In long binding, bean’s component ID is used as an extra qualifier along with the package-qualified interface class name. What is the name of the deployment descriptor used for deploying java enterprise application?Īnswer: The name of the deployment descriptor is ejb-jar.xml.
#CARA MENGGUNAKAN JAR OF BEANS ARCHIVE#
What is the name of the format used for packaging java enterprise applications?Īnswer: The name of the format is enterprise application archive (EAR).It contains all other modules like WAR, RAR etc. What are the two name spaces available in EJB 3.0 feature pack?Īnswer: Following are the two name spaces available But the same can be performed by using deployment descriptor. What is the usage of deployment descriptor?Īnswer: All the tasks in EJB 3.0 is done by annotations. The setter injection is used to serve this purpose.
#CARA MENGGUNAKAN JAR OF BEANS CODE#
The resources should be separated in a different component and it will make the code more flexible. What is the annotation used for resource injection?Īnswer: The annotation is used for injecting resources.Īnswer: The resources should not be directly injected into application code. What is the annotation used for EJB injection into a client code?Īnswer: The annotation’ is used to inject session beans into a client. It makes the application loosely coupled.
![cara menggunakan jar of beans cara menggunakan jar of beans](https://imag.malavida.com/mvimgbig/download-fs/jar-of-beans-21929-10.jpg)
What is dependency injection in EJB 3.0 specification?Īnswer: Dependency injection is a powerful way of obtaining Java EE resources without any JNDI look up. Is it possible to disable invocation of any interceptor?Īnswer: Yes, Annotations like and can be used to disable invocation. What is the order of execution of different interceptors?Īnswer: They are invoked in the following order It is not defined by any annotation rather it has to be written explicitly in the deployment descriptor of the EJB module. What is the usage of interceptors in session beans or MDBs?Īnswer: Interceptors are generally used to check validation, security checks before the invocation of business logic methods.Īnswer: Default interceptor is a concept provided by the EJB 3.0 specification. But it is always advisable to remove the bean after its use without relying on the time out mechanism. If the bean is not used during the time out value then it is deleted by the container itself. Is there any time out value for stateful session beans?Īnswer: Yes, there is a time out value for stateful session beans. What are the two other life cycle stages available for stateful session bean? So, this compiled list of questions and answers will definitely give you some idea on the related concepts. Tapi, some time, we find it difficult to answer the specific questions asked in the forum, interviews or discussions.
![cara menggunakan jar of beans cara menggunakan jar of beans](https://guernseydonkey.com/wp-content/uploads/2011/08/beanjar_beanjarpot.jpg)
EJBs are there for a long time in the market, and they are widely used in many large scale applications. Pengantar: In this EJB II series, our main objective is to take some of the most important features of EJB and answer the related concepts.