This section includes 7 InterviewSolutions, each offering curated multiple-choice questions to sharpen your Current Affairs knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
How Can I Access Ejb From Asp? |
|
Answer» We can USE the Java 2 PLATFORM, Enterprise EDITION Client ACCESS Services (J2EETM CAS) COM Bridge 1.0, CURRENTLY downloadable from Sun. We can use the Java 2 Platform, Enterprise Edition Client Access Services (J2EETM CAS) COM Bridge 1.0, currently downloadable from Sun. |
|
| 2. |
What's New In The Ejb 2.0 Specification? |
|
Answer» Following are some of the main features SUPPORTED in EJB 2.0: Following are some of the main features supported in EJB 2.0: |
|
| 3. |
What Is The New Basic Requirement For A Cmp Entity Bean Class In 2.0 From That Of Ejb 1.1? |
|
Answer» It MUST be abstract CLASS. The CONTAINER extends it and implements METHODS which are required for managing the relationships. It must be abstract class. The container extends it and implements methods which are required for managing the relationships. |
|
| 4. |
What Is A Server Group? |
|
Answer» A server group is a TEMPLATE of an Application Server(and its contents) i.e, it is a logical representation of the application server. It has the same structure and attributes as the REAL Application Server, but it is not associated with any NODE, and does not CORRESPOND to any real server PROCESS running on any node. A server group is a template of an Application Server(and its contents) i.e, it is a logical representation of the application server. It has the same structure and attributes as the real Application Server, but it is not associated with any node, and does not correspond to any real server process running on any node. |
|
| 5. |
What Are The Types Of Scaling? |
|
Answer» There are two types of scaling: Vertical Scaling and HORIZONTAL Scaling. Vertical Scaling - When multiple SERVER clones of an application server are defined on the same PHYSICAL m/c, it is called Vertical Scaling. The objective is to use the processing power of that m/c more efficiently. Horizontal Scaling - When Clones of an application server are defined on multiple physical m/c, it is called Horizontal Scaling. The objective is to use more than one LESS powerful m/c more efficiently. There are two types of scaling: Vertical Scaling and Horizontal Scaling. Vertical Scaling - When multiple server clones of an application server are defined on the same physical m/c, it is called Vertical Scaling. The objective is to use the processing power of that m/c more efficiently. Horizontal Scaling - When Clones of an application server are defined on multiple physical m/c, it is called Horizontal Scaling. The objective is to use more than one less powerful m/c more efficiently. |
|
| 6. |
What Is A Clone? |
|
Answer» The COPIES of a server GROUP are called Clones. But unlike a Server Group Clones are ASSOCIATED with a node and are REAL server process RUNNING in that node. The copies of a server group are called Clones. But unlike a Server Group Clones are associated with a node and are real server process running in that node. |
|
| 7. |
What Is Ripple Effect? |
|
Answer» The process of PROPAGATING the changes in the PROPERTIES of a server group during RUNTIME to all the ASSOCIATED clones is called Ripple Effect. The process of propagating the changes in the properties of a server group during runtime to all the associated clones is called Ripple Effect. |
|
| 8. |
What Is In-memory Replication? |
|
Answer» The PROCESS by which the contents in the memory of ONE PHYSICAL m/c are REPLICATED in all the m/c in the cluster is CALLED in-memory replication. The process by which the contents in the memory of one physical m/c are replicated in all the m/c in the cluster is called in-memory replication. |
|
| 9. |
What Is Enterprise Javabeans (ejb) Container? |
|
Answer» It MANAGES the EXECUTION of ENTERPRISE beans for J2EE applications. Enterprise beans and their container RUN on the J2EE server. It manages the execution of enterprise beans for J2EE applications. Enterprise beans and their container run on the J2EE server. |
|
| 10. |
Tell Me Something About Local Interfaces. |
|
Answer» EJB was originally designed around remote invocation using the Java Remote METHOD Invocation (RMI) mechanism, and LATER extended to support to standard CORBA transport for these calls using RMI/IIOP. This design allowed for maximum flexibility in developing applications without consideration for the deployment scenario, and was a strong feature in support of a goal of component reuse in J2EE. Many developers are using EJBs locally, that is, some or all of their EJB calls are between beans in a single container. With this feedback in mind, the EJB 2.0 expert group has created a LOCAL interface mechanism. The local interface may be defined for a BEAN during development, to allow streamlined calls to the bean if a caller is in the same container. This does not involve the overhead involved with RMI like marshalling etc. This facility will thus improve the performance of applications in which co-location is planned. Local interfaces also provide the foundation for container-managed relationships among entity beans with container-managed persistence. EJB was originally designed around remote invocation using the Java Remote Method Invocation (RMI) mechanism, and later extended to support to standard CORBA transport for these calls using RMI/IIOP. This design allowed for maximum flexibility in developing applications without consideration for the deployment scenario, and was a strong feature in support of a goal of component reuse in J2EE. Many developers are using EJBs locally, that is, some or all of their EJB calls are between beans in a single container. With this feedback in mind, the EJB 2.0 expert group has created a local interface mechanism. The local interface may be defined for a bean during development, to allow streamlined calls to the bean if a caller is in the same container. This does not involve the overhead involved with RMI like marshalling etc. This facility will thus improve the performance of applications in which co-location is planned. Local interfaces also provide the foundation for container-managed relationships among entity beans with container-managed persistence. |
|
| 11. |
What Is Ejb Role In J2ee? |
|
Answer» EJB technology is the CORE of J2EE. It enables developers to write REUSABLE and PORTABLE server-side business logic for the J2EE platform. EJB technology is the core of J2EE. It enables developers to write reusable and portable server-side business logic for the J2EE platform. |
|
| 12. |
What Is The Difference Between Ejb And Java Beans? |
|
Answer» EJB is a specification for J2EE server, not a product; JAVA beans MAY be a GRAPHICAL COMPONENT in IDE. EJB is a specification for J2EE server, not a product; Java beans may be a graphical component in IDE. |
|
| 13. |
What Technologies Are Included In J2ee? |
|
Answer» The MAIN technologies in J2EE are: ENTERPRISE JavaBeansTM (EJBsTM), JavaServer PagesTM (JSPsTM), Java Servlets, the Java NAMING and Directory InterfaceTM (JNDITM), the Java Transaction API (JTA), CORBA, and the JDBCTM data ACCESS API. The main technologies in J2EE are: Enterprise JavaBeansTM (EJBsTM), JavaServer PagesTM (JSPsTM), Java Servlets, the Java Naming and Directory InterfaceTM (JNDITM), the Java Transaction API (JTA), CORBA, and the JDBCTM data access API. |
|
| 14. |
What Are The Two Important Tcp Socket Classes? |
|
Answer» Socket and ServerSocket. Socket and ServerSocket. |
|
| 15. |
What Is An Ejb Context? |
|
Answer» EJBCONTEXT is an interface that is implemented by the container, and it is also a PART of the bean-container contract. Entity beans use a subclass of EJBContext called EntityContext. Session beans use a subclass called SessionContext. These EJBContext objects provide the bean class with information about its container, the CLIENT using the bean and the bean itself. They also provide other functions. See the API docs and the spec for more DETAILS. EJBContext is an interface that is implemented by the container, and it is also a part of the bean-container contract. Entity beans use a subclass of EJBContext called EntityContext. Session beans use a subclass called SessionContext. These EJBContext objects provide the bean class with information about its container, the client using the bean and the bean itself. They also provide other functions. See the API docs and the spec for more details. |
|
| 16. |
How Can I Call One Ejb From Inside Of Another Ejb? |
|
Answer» EJBs can be clients of other EJBs. It just WORKS. Use JNDI to locate the HOME INTERFACE of the other bean, then ACQUIRE an instance reference, and so forth. EJBs can be clients of other EJBs. It just works. Use JNDI to locate the Home Interface of the other bean, then acquire an instance reference, and so forth. |
|
| 17. |
What Happens If Remove( ) Is Never Invoked On A Session Bean? |
|
Answer» In CASE of a stateless SESSION bean it may not matter if we call or not as in both cases nothing is done. The number of beans in cache is managed by the container. In case of STATEFUL session bean, the bean may be kept in cache till either the session times out, in which case the bean is removed or when there is a requirement for memory in which case the data is cached and the bean is sent to free POOL. In case of a stateless session bean it may not matter if we call or not as in both cases nothing is done. The number of beans in cache is managed by the container. In case of stateful session bean, the bean may be kept in cache till either the session times out, in which case the bean is removed or when there is a requirement for memory in which case the data is cached and the bean is sent to free pool. |
|
| 18. |
What Are The Special Design Care That Must Be Taken When You Work With Local Interfaces? |
|
Answer» EIt is important to UNDERSTAND that the calling semantics of local interfaces are different from those of remote interfaces. For example, remote interfaces pass parameters using call-by-value semantics, while local interfaces use call-by-reference. This means that in order to use local interfaces safely, application developers NEED to CAREFULLY consider potential deployment scenarios up front, then decide which interfaces can be local and which remote, and finally, develop the application code with these choices in mind. While EJB 2.0 local interfaces are extremely useful in some situations, the long-term costs of these choices, ESPECIALLY when changing requirements and component REUSE are taken into account, need to be factored into the design decision. EIt is important to understand that the calling semantics of local interfaces are different from those of remote interfaces. For example, remote interfaces pass parameters using call-by-value semantics, while local interfaces use call-by-reference. This means that in order to use local interfaces safely, application developers need to carefully consider potential deployment scenarios up front, then decide which interfaces can be local and which remote, and finally, develop the application code with these choices in mind. While EJB 2.0 local interfaces are extremely useful in some situations, the long-term costs of these choices, especially when changing requirements and component reuse are taken into account, need to be factored into the design decision. |
|
| 19. |
Brief Description About Local Interfaces? |
|
Answer» EEJB was originally designed around remote invocation using the Java Remote Method Invocation (RMI) mechanism, and later extended to support to standard CORBA transport for these calls using RMI/IIOP. This design ALLOWED for maximum flexibility in developing applications without consideration for the deployment SCENARIO, and was a strong feature in support of a goal of component reuse in J2EE. Many developers are using EJBs locally -- that is, some or all of their EJB calls are between beans in a single container. With this feedback in mind, the EJB 2.0 expert group has created a local interface mechanism. The local interface may be defined for a bean during development, to allow STREAMLINED calls to the bean if a caller is in the same container. This does not involve the overhead involved with RMI like marshalling etc. This facility will thus IMPROVE the performance of applications in which co-location is planned. Local interfaces also PROVIDE the foundation for container-managed relationships among entity beans with container-managed persistence. EEJB was originally designed around remote invocation using the Java Remote Method Invocation (RMI) mechanism, and later extended to support to standard CORBA transport for these calls using RMI/IIOP. This design allowed for maximum flexibility in developing applications without consideration for the deployment scenario, and was a strong feature in support of a goal of component reuse in J2EE. Many developers are using EJBs locally -- that is, some or all of their EJB calls are between beans in a single container. With this feedback in mind, the EJB 2.0 expert group has created a local interface mechanism. The local interface may be defined for a bean during development, to allow streamlined calls to the bean if a caller is in the same container. This does not involve the overhead involved with RMI like marshalling etc. This facility will thus improve the performance of applications in which co-location is planned. Local interfaces also provide the foundation for container-managed relationships among entity beans with container-managed persistence. |
|
| 20. |
What Is Ejb Ql? |
|
Answer» EJB QL is a Query Language provided for navigation across a network of enterprise beans and DEPENDENT objects defined by means of container managed persistence. EJB QL is introduced in the EJB 2.0 SPECIFICATION. The EJB QL query language defines finder methods for entity beans with container managed persistenceand is portable across containers and persistence managers. EJB QL is used for queries of two types of finder methods: Finder methods that are defined in the home interface of an entity bean and which return entity objects. Select methods, which are not EXPOSED to the client, but which are used by the Bean Provider to select persistent values that are maintained by the Persistence MANAGER or to select entity objects that are related to the entity bean on which the query is defined. EJB QL is a Query Language provided for navigation across a network of enterprise beans and dependent objects defined by means of container managed persistence. EJB QL is introduced in the EJB 2.0 specification. The EJB QL query language defines finder methods for entity beans with container managed persistenceand is portable across containers and persistence managers. EJB QL is used for queries of two types of finder methods: Finder methods that are defined in the home interface of an entity bean and which return entity objects. Select methods, which are not exposed to the client, but which are used by the Bean Provider to select persistent values that are maintained by the Persistence Manager or to select entity objects that are related to the entity bean on which the query is defined. |
|
| 21. |
What Is The Advantage Of Using Entity Bean For Database Operations, Over Directly Using Jdbc Api To Do Database Operations? When Would I Use One Over The Other? |
|
Answer» Entity BEANS actually represents the data in a database. It is not that Entity Beans replaces JDBC API. There are two types of Entity Beans Container Managed and Bean Mananged. In Container Managed Entity Bean - Whenever the instance of the bean is created the container automatically retrieves the data from the DB/Persistance storage and assigns to the object variables in bean for user to manipulate or use them. For this the developer needs to map the fields in the database to the variables in deployment descriptor files (which varies for each vendor). In the Bean Managed Entity Bean - The developer has to specifically make connection, retrive values, assign them to the objects in the ejbLoad() which will be called by the container when it instatiates a bean object. Similarly in the ejbStore() the container SAVES the object values back the the persistance storage. ejbLoad and ejbStore are callback methods and can be only invoked by the container. Apart from this, when you use Entity beans you dont NEED to worry about database TRANSACTION handling, database connection pooling etc. which are taken care by the ejb container. But in case of JDBC you have to explicitly do the above features. what suresh told is exactly perfect. ofcourse, this comes under the database transations, but i want to add this. the great thing about the entity beans of container managed, whenever the connection is failed during the transaction processing, the database CONSISTANCY is mantained automatically. the container writes the data stored at persistant storage of the entity beans to the database again to provide the database consistancy. where as in jdbc api, we, developers has to do manually. Entity Beans actually represents the data in a database. It is not that Entity Beans replaces JDBC API. There are two types of Entity Beans Container Managed and Bean Mananged. In Container Managed Entity Bean - Whenever the instance of the bean is created the container automatically retrieves the data from the DB/Persistance storage and assigns to the object variables in bean for user to manipulate or use them. For this the developer needs to map the fields in the database to the variables in deployment descriptor files (which varies for each vendor). In the Bean Managed Entity Bean - The developer has to specifically make connection, retrive values, assign them to the objects in the ejbLoad() which will be called by the container when it instatiates a bean object. Similarly in the ejbStore() the container saves the object values back the the persistance storage. ejbLoad and ejbStore are callback methods and can be only invoked by the container. Apart from this, when you use Entity beans you dont need to worry about database transaction handling, database connection pooling etc. which are taken care by the ejb container. But in case of JDBC you have to explicitly do the above features. what suresh told is exactly perfect. ofcourse, this comes under the database transations, but i want to add this. the great thing about the entity beans of container managed, whenever the connection is failed during the transaction processing, the database consistancy is mantained automatically. the container writes the data stored at persistant storage of the entity beans to the database again to provide the database consistancy. where as in jdbc api, we, developers has to do manually. |
|
| 22. |
Can You Control When Passivation Occurs? |
|
Answer» The developer, according to the specification, cannot directly control when passivation occurs. Although for Stateful Session Beans, the container cannot passivate an instance that is inside a transaction. So using transactions can be a a STRATEGY to control passivation. The ejbPassivate() METHOD is called during passivation, so the developer has control over what to do during this exercise and can implement the require optimized logic. Some EJB containers, such as BEA WebLogic, provide the ability to TUNE the container to minimize passivation CALLS. Taken from the WebLogic 6.0 DTD -"The passivation-strategy can be either "default" or "transaction". With the default setting the container will attempt to keep a WORKING set of beans in the cache. With the "transaction" setting, the container will passivate the bean after every transaction (or method call for a non-transactional invocation). The developer, according to the specification, cannot directly control when passivation occurs. Although for Stateful Session Beans, the container cannot passivate an instance that is inside a transaction. So using transactions can be a a strategy to control passivation. The ejbPassivate() method is called during passivation, so the developer has control over what to do during this exercise and can implement the require optimized logic. Some EJB containers, such as BEA WebLogic, provide the ability to tune the container to minimize passivation calls. Taken from the WebLogic 6.0 DTD -"The passivation-strategy can be either "default" or "transaction". With the default setting the container will attempt to keep a working set of beans in the cache. With the "transaction" setting, the container will passivate the bean after every transaction (or method call for a non-transactional invocation). |
|
| 23. |
Can The Primary Key In The Entity Bean Be A Java Primitive Type Such As Int? |
|
Answer» The primary key can't be a primitive type--use the primitive wrapper CLASSES, INSTEAD. For EXAMPLE, you can use java.lang.Integer as the primary key class, but not INT (it has to be a class, not a primitive) The primary key can't be a primitive type--use the primitive wrapper classes, instead. For example, you can use java.lang.Integer as the primary key class, but not int (it has to be a class, not a primitive) |
|
| 24. |
The Ejb Container Implements The Ejbhome And Ejbobject Classes. For Every Request From A Unique Client, Does The Container Create A Separate Instance Of The Generated Ejbhome And Ejbobject Classes? |
|
Answer» The EJB container maintains an instance pool. The container uses these INSTANCES for the EJB HOME reference IRRESPECTIVE of the client request. while refering the EJB Object classes the container creates a SEPARATE instance for each client request. The instance pool maintainence is up to the implementation of the container. If the container provides one, it is available otherwise it is not mandatory for the provider to implement it. Having said that, yes most of the container providers implement the pooling functionality to increase the performance of the application server. The way it is implemented is again up to the IMPLEMENTER. The EJB container maintains an instance pool. The container uses these instances for the EJB Home reference irrespective of the client request. while refering the EJB Object classes the container creates a separate instance for each client request. The instance pool maintainence is up to the implementation of the container. If the container provides one, it is available otherwise it is not mandatory for the provider to implement it. Having said that, yes most of the container providers implement the pooling functionality to increase the performance of the application server. The way it is implemented is again up to the implementer. |
|
| 25. |
Is It Possible To Share An Httpsession Between A Jsp And Ejb? What Happens When I Change A Value In The Httpsession From Inside An Ejb? |
|
Answer» You can pass the HttpSession as parameter to an EJB method, only if all objects in session are serializable.This has to be consider as passed-by-value", that means that its read-only in the EJB. If ANYTHING is altered from inside the EJB, it wont be reflected back to the HttpSession of the Servlet Container.The pass-by-reference can be used between EJBs Remote INTERFACES, as they are remote references. While it IS possible to pass an HttpSession as a parameter to an EJB object, it is CONSIDERED to be bad practice in terms of object oriented design. This is because you are CREATING an unnecessary coupling between back-end objects (ejbs) and front-end objects (HttpSession). Create a higher-level of abstraction for your ejbs api. Rather than passing the WHOLE, fat, HttpSession (which carries with it a bunch of http semantics), create a class that acts as a value object (or structure) that holds all the data you need to pass back and forth between front-end/back-end. Consider the case where your ejb needs to support a non-http-based client. This higher level of abstraction will be flexible enough to support it. You can pass the HttpSession as parameter to an EJB method, only if all objects in session are serializable.This has to be consider as passed-by-value", that means that its read-only in the EJB. If anything is altered from inside the EJB, it wont be reflected back to the HttpSession of the Servlet Container.The pass-by-reference can be used between EJBs Remote Interfaces, as they are remote references. While it IS possible to pass an HttpSession as a parameter to an EJB object, it is considered to be bad practice in terms of object oriented design. This is because you are creating an unnecessary coupling between back-end objects (ejbs) and front-end objects (HttpSession). Create a higher-level of abstraction for your ejbs api. Rather than passing the whole, fat, HttpSession (which carries with it a bunch of http semantics), create a class that acts as a value object (or structure) that holds all the data you need to pass back and forth between front-end/back-end. Consider the case where your ejb needs to support a non-http-based client. This higher level of abstraction will be flexible enough to support it. |
|
| 26. |
How Ejb Invocation Happens? |
Answer»
|
|
| 27. |
What Are Transaction Isolation Levels In Ejb? |
|
Answer» 1. Transaction_read_uncommitted- Allows a METHOD to read uncommitted data from a DB(fast but not wise). 1. Transaction_read_uncommitted- Allows a method to read uncommitted data from a DB(fast but not wise). |
|
| 28. |
What Are Transaction Attributes? |
|
Answer» The transaction attribute specifies how the Container must manage transactions for a method when a client invokes the method via the enterprise bean’s home or component interface or when the method is invoked as the result of the arrival of a JMS message. (Sun's EJB Specification) Below is a list of transactional attributes: The transaction attribute specifies how the Container must manage transactions for a method when a client invokes the method via the enterprise bean’s home or component interface or when the method is invoked as the result of the arrival of a JMS message. (Sun's EJB Specification) Below is a list of transactional attributes: |
|
| 29. |
What Is Bean Managed Transaction? |
|
Answer» If a developer doesn't want a Container to manage transactions, it's possible to implement all database operations manually by writing the appropriate JDBC CODE. This often leads to productivity INCREASE, but it makes an ENTITY Bean incompatible with some databases and it enlarges the amount of code to be WRITTEN. All transaction MANAGEMENT is explicitly performed by a developer. If a developer doesn't want a Container to manage transactions, it's possible to implement all database operations manually by writing the appropriate JDBC code. This often leads to productivity increase, but it makes an Entity Bean incompatible with some databases and it enlarges the amount of code to be written. All transaction management is explicitly performed by a developer. |
|
| 30. |
Can Entity Beans Have No Create() Methods? |
|
Answer» Yes. In some cases the data is inserted NOT using JAVA APPLICATION, so you may only need to retrieve the information, PERFORM its processing, but not create your own information of this kind. Yes. In some cases the data is inserted NOT using Java application, so you may only need to retrieve the information, perform its processing, but not create your own information of this kind. |
|
| 31. |
What Is Software Architecture Of Ejb? |
|
Answer» Session and Entity EJBs consist of 4 and 5 parts respetively: Session and Entity EJBs consist of 4 and 5 parts respetively: |
|
| 32. |
What Are The Methods Of Entity Bean?what Is The Difference Between Container-managed Persistent (cmp) Bean And Bean-managed Persistent(bmp) ? |
|
Answer» Container-managed PERSISTENCE beans are the simplest for the bean developer to create and the most difficult for the EJB server to support. This is because all the LOGIC for synchronizing the bean's state with the database is handled automatically by the container. This means that the bean developer doesn't need to write any data access logic, while the EJB server is supposed to take care of all the persistence needs automatically. With CMP, the container manages the persistence of the entity bean. A CMP bean developer doesn't need to worry about JDBC code and transactions, because the Container performs database calls and transaction management instead of the programmer. Vendor tools are used to map the entity fields to the database and absolutely no database access code is written in the bean class. All table mapping is SPECIFIED in the deployment descriptor. OTHERWISE, a BMP bean developer takes the load of linking an application and a database on his shoulders. The bean-managed persistence (BMP) enterprise bean manages synchronizing its state with the database as directed by the container. The bean uses a database API to read and write its fields to the database, but the container tells it when to do each synchronization operation and manages the transactions for the bean automatically. Bean-managed persistence gives the bean developer the flexibility to perform persistence operations that are too complicated for the container or to use a data source that is not supported by the container.BMP beans are not 100% database-independent, because they may contain database-specific code, but CMP beans are UNABLE to perform complicated DML (data manipulation language) statements. EJB 2.0 specification introduced some new ways of querying database (by using the EJB QL - query language). Container-managed persistence beans are the simplest for the bean developer to create and the most difficult for the EJB server to support. This is because all the logic for synchronizing the bean's state with the database is handled automatically by the container. This means that the bean developer doesn't need to write any data access logic, while the EJB server is supposed to take care of all the persistence needs automatically. With CMP, the container manages the persistence of the entity bean. A CMP bean developer doesn't need to worry about JDBC code and transactions, because the Container performs database calls and transaction management instead of the programmer. Vendor tools are used to map the entity fields to the database and absolutely no database access code is written in the bean class. All table mapping is specified in the deployment descriptor. Otherwise, a BMP bean developer takes the load of linking an application and a database on his shoulders. The bean-managed persistence (BMP) enterprise bean manages synchronizing its state with the database as directed by the container. The bean uses a database API to read and write its fields to the database, but the container tells it when to do each synchronization operation and manages the transactions for the bean automatically. Bean-managed persistence gives the bean developer the flexibility to perform persistence operations that are too complicated for the container or to use a data source that is not supported by the container.BMP beans are not 100% database-independent, because they may contain database-specific code, but CMP beans are unable to perform complicated DML (data manipulation language) statements. EJB 2.0 specification introduced some new ways of querying database (by using the EJB QL - query language). |
|
| 33. |
What Are The Different Kinds Of Enterprise Beans? |
|
Answer» Stateless session bean- An instance of these non-persistent EJBS provides a service without storing an interaction or conversation state between methods. Any instance can be used for any client. Stateless session bean- An instance of these non-persistent EJBs provides a service without storing an interaction or conversation state between methods. Any instance can be used for any client. |
|
| 34. |
What Are Java Beans? |
|
Answer» Java Beans are usual Java classes which adhere to certain CODING conventions: Java Beans are usual Java classes which adhere to certain coding conventions: |
|
| 35. |
Why Do I Get A Nullpointerexception When Loading A Jar File Into The Beanbox? |
|
Answer» Usually this is because of a mistake in the JAR file being LOADED. In the meantime, typical ERRORS include: ► The MANIFEST file uses classes USING the wrong file separator ("/" should be used in all platforms). Usually this is because of a mistake in the JAR file being loaded. In the meantime, typical errors include: ► The MANIFEST file uses classes using the wrong file separator ("/" should be used in all platforms). |
|
| 36. |
What Is Bean Persistance Property? |
|
Answer» A bean has the property of PERSISTENCE when its PROPERTIES, fields, and STATE information are saved to and retrieved from storage. Component MODELS provide a mechanism for persistence that enables the state of components to be STORED in a non-volatile place for later retrieval. A bean has the property of persistence when its properties, fields, and state information are saved to and retrieved from storage. Component models provide a mechanism for persistence that enables the state of components to be stored in a non-volatile place for later retrieval. |
|
| 37. |
What Are Externizable Interface? |
|
Answer» Use the Externalizable interface when you need complete control over your BEAN's serialization (for example, when WRITING and reading a specific FILE format). To use the Externalizable interface you need to implement two methods: readExternal and writeExternal. Classes that implement Externalizable must have a no-argument CONSTRUCTOR. Use the Externalizable interface when you need complete control over your bean's serialization (for example, when writing and reading a specific file format). To use the Externalizable interface you need to implement two methods: readExternal and writeExternal. Classes that implement Externalizable must have a no-argument constructor. |
|
| 38. |
What Are The Purpose Of Introspection? |
|
Answer» A growing NUMBER of Java object repository sites exist on the Internet in ANSWER to the demand for centralized deployment of applets, classes, and source code in general. Any developer who has spent time hunting through these sites for licensable Java code to incorporate into a program has UNDOUBTEDLY struggled with issues of how to quickly and cleanly integrate code from one particular source into an APPLICATION. The way in which introspection is implemented provides great advantages, including: A growing number of Java object repository sites exist on the Internet in answer to the demand for centralized deployment of applets, classes, and source code in general. Any developer who has spent time hunting through these sites for licensable Java code to incorporate into a program has undoubtedly struggled with issues of how to quickly and cleanly integrate code from one particular source into an application. The way in which introspection is implemented provides great advantages, including: |
|
| 39. |
What Is Property Editor In Java Beans? |
|
Answer» A property editor is a tool for customizing a particular property TYPE. Property editors are activated in the Properties WINDOW. This window determines a property's type, SEARCHES for a relevant property editor, and DISPLAYS the property's CURRENT value in a relevant way. A property editor is a tool for customizing a particular property type. Property editors are activated in the Properties window. This window determines a property's type, searches for a relevant property editor, and displays the property's current value in a relevant way. |
|
| 40. |
Write A Simple Bean Program? |
|
Answer» Write the SimpleBean code. Put it in a file NAMED SimpleBean.java, in the directory of your CHOICE. Here's the code: Write the SimpleBean code. Put it in a file named SimpleBean.java, in the directory of your choice. Here's the code: |
|
| 41. |
Difference Between Java Bean And Bean? |
|
Answer» A Java Bean is a software component WRITTEN in the Java programming language that conforms to the JavaBeans component specification. The JavaBeans APIs became part of the "core" Java APIs as of the 1.1 RELEASE of the JDK. The JavaBeans specification defines a Java-based software component model that ADDS a number of FEATURES to the Java programming language. Some of these features include: ► introspection Enterprise JavaBeans (EJBs) are Java-based software components that are built to comply with Java's EJB specification and run inside of an EJB container supplied by a J2EE provider. An EJB container PROVIDES distributed application functionality such as transaction support, persistence and lifecycle management for the EJBs. A Java Bean is a software component written in the Java programming language that conforms to the JavaBeans component specification. The JavaBeans APIs became part of the "core" Java APIs as of the 1.1 release of the JDK. The JavaBeans specification defines a Java-based software component model that adds a number of features to the Java programming language. Some of these features include: ► introspection Enterprise JavaBeans (EJBs) are Java-based software components that are built to comply with Java's EJB specification and run inside of an EJB container supplied by a J2EE provider. An EJB container provides distributed application functionality such as transaction support, persistence and lifecycle management for the EJBs. |
|
| 42. |
What Is A Bean? Why Is Not A Bean An Applet? |
|
Answer» JavaBeans components, or Beans, are reusable SOFTWARE components that can be manipulated visually in a builder tool. Beans can be combined to CREATE traditional applications, or their smaller web-oriented brethren, applets. In addition, applets can be designed to work as reusable Beans. INDIVIDUAL Beans will function quite differently, but typical unifying features that distinguish a Bean are: JavaBeans components, or Beans, are reusable software components that can be manipulated visually in a builder tool. Beans can be combined to create traditional applications, or their smaller web-oriented brethren, applets. In addition, applets can be designed to work as reusable Beans. Individual Beans will function quite differently, but typical unifying features that distinguish a Bean are: |
|
| 43. |
Why Are Component Architectures Useful? |
|
Answer» Developers are turning to CREATING components RATHER than monolithic applications to free themselves from slow, expensive application development, and to build up a portable, reusable code base. This enables developers to quickly attack new market OPPORTUNITIES, new JOINT development opportunities, and new ways to sell smaller packages of software. Developers are turning to creating components rather than monolithic applications to free themselves from slow, expensive application development, and to build up a portable, reusable code base. This enables developers to quickly attack new market opportunities, new joint development opportunities, and new ways to sell smaller packages of software. |
|
| 44. |
Is Javabeans A Complete Component Architecture? |
|
Answer» JavaBeans is a complete component model. It supports the standard component architecture features of PROPERTIES, events, METHODS, and persistence. In ADDITION, JavaBeans provides support for introspection (to allow AUTOMATIC ANALYSIS of a JavaBeanscomponent) and customization (to make it easy to configure a JavaBeans component). JavaBeans is a complete component model. It supports the standard component architecture features of properties, events, methods, and persistence. In addition, JavaBeans provides support for introspection (to allow automatic analysis of a JavaBeanscomponent) and customization (to make it easy to configure a JavaBeans component). |
|
| 45. |
Why A Component Architecture For The Java Platform? |
|
Answer» JavaBeans BRINGS the extraordinary POWER of the Java PLATFORM to component DEVELOPMENT, OFFERING the ideal environment for a developer who wants to extend the concept of reusable component development beyond one platform and one architecture to embrace every platform and every architecture in the industry. JavaBeans brings the extraordinary power of the Java platform to component development, offering the ideal environment for a developer who wants to extend the concept of reusable component development beyond one platform and one architecture to embrace every platform and every architecture in the industry. |
|
| 46. |
What Kind Of Industry Support Exists For Javabeans? |
|
Answer» A coalition of industry leaders in component development worked with JavaSoft to create the JavaBeans SPECIFICATION, which was released to the Internet for public comments on September 4, 1996. The "FROZEN" JavaBeans specification combines the work of Apple, Borland, IBM, JustSystem, Microsoft, Netscape, Rogue WAVE, SunSoft and Symantec and many, many others... We're very PLEASED to see the tools community swiftly embracing JavaBeans by announcing support for JavaBeans in their visual application builder tools. A coalition of industry leaders in component development worked with JavaSoft to create the JavaBeans specification, which was released to the Internet for public comments on September 4, 1996. The "frozen" JavaBeans specification combines the work of Apple, Borland, IBM, JustSystem, Microsoft, Netscape, Rogue Wave, SunSoft and Symantec and many, many others... We're very pleased to see the tools community swiftly embracing JavaBeans by announcing support for JavaBeans in their visual application builder tools. |
|
| 47. |
Are There Javabeans Components Available That I Can Buy Today? |
|
Answer» YES. A large number of COMPANIES, both large and small, have announced their PLANS to DELIVER JavaBeans-based products. Yes. A large number of companies, both large and small, have announced their plans to deliver JavaBeans-based products. |
|
| 48. |
What Is The Relationship Between Sun S Jfcs And Javabeans? |
|
Answer» The JFC (Java Foundation CLASSES) is based UPON the AWT (Abstract WINDOWING Toolkit), which has been part of the Java platform from the beginning. JFC effectively adds a richer SET of visual elements for building JavaBeans COMPONENTS and applications. See the JFC web site for more information. The JFC (Java Foundation Classes) is based upon the AWT (Abstract Windowing Toolkit), which has been part of the Java platform from the beginning. JFC effectively adds a richer set of visual elements for building JavaBeans components and applications. See the JFC web site for more information. |
|
| 49. |
Why Do I Get A Duplicate Name Error When Loading A Jar File? |
|
Answer» The most common reason for a "java.lang.ClassFormatError: DUPLICATE name" error is that a .class FILE in the JAR CONTAINS a class whose class name is different from the EXPECTED name. So for example if you have a file called "a/B.class" and it contains a class called "B" or "a.X" instead of the class "a.B" then you will get this error. The most common causes for this PROBLEM are either forgetting to include a "package a;" statement or having a "package" statement with the wrong name. The most common reason for a "java.lang.ClassFormatError: Duplicate name" error is that a .class file in the JAR contains a class whose class name is different from the expected name. So for example if you have a file called "a/B.class" and it contains a class called "B" or "a.X" instead of the class "a.B" then you will get this error. The most common causes for this problem are either forgetting to include a "package a;" statement or having a "package" statement with the wrong name. |
|
| 50. |
What Are The Security Implications For Downloading Beans Over The Internet? |
|
Answer» JavaBeans does not ADD any security features to the JAVA platform. Rather, JavaBeans components have full access to the broad range of security features that are part of the Java platform. JavaBeans components can be used to build a range of different KINDS of SOLUTIONS from full-fledged Java desktop APPLICATIONS to web-based Applets. JavaBeans does not add any security features to the Java platform. Rather, JavaBeans components have full access to the broad range of security features that are part of the Java platform. JavaBeans components can be used to build a range of different kinds of solutions from full-fledged Java desktop applications to web-based Applets. |
|