Explore topic-wise InterviewSolutions in Current Affairs.

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.

What Is Entity Reference?

Answer»

A reference to an entity that is substituted for the reference when the XML document is parsed. It can reference a predefined entity such as or reference ONE that is defined in the DTD. In the XML DATA, the reference could be to an entity that is defined in the local SUBSET of the DTD or to an external XML file (an external entity). The DTD can also carve out a segment of DTD specifications and give it a name so that it can be reused (included) at multiple points in the DTD by defining a parameter entity.

A reference to an entity that is substituted for the reference when the XML document is parsed. It can reference a predefined entity such as or reference one that is defined in the DTD. In the XML data, the reference could be to an entity that is defined in the local subset of the DTD or to an external XML file (an external entity). The DTD can also carve out a segment of DTD specifications and give it a name so that it can be reused (included) at multiple points in the DTD by defining a parameter entity.

2.

What Is An Entity?

Answer»

A distinct, individual item that can be INCLUDED in an XML DOCUMENT by referencing it. Such an entity reference can name an entity as small as a character (for example, <, which references the less-than symbol or left angle BRACKET, <). An entity reference can also reference an entire document, an external entity, or a collection of DTD definitions.

A distinct, individual item that can be included in an XML document by referencing it. Such an entity reference can name an entity as small as a character (for example, <, which references the less-than symbol or left angle bracket, <). An entity reference can also reference an entire document, an external entity, or a collection of DTD definitions.

3.

What Is Enterprise Bean Provider?

Answer»

An APPLICATION DEVELOPER who PRODUCES ENTERPRISE bean classes, REMOTE and Interview Questions - Home interfaces, and deployment descriptor files, and packages them in an EJB JAR file.

An application developer who produces enterprise bean classes, remote and Interview Questions - Home interfaces, and deployment descriptor files, and packages them in an EJB JAR file.

4.

What Is Enterprise Javabeans Query Language?

Answer»

Defines the queries for the finder and select methods of an ENTITY bean having container-managed persistence. A subset of SQL92, EJB QL has extensions that allow NAVIGATION over the RELATIONSHIPS defined in an entity bean's ABSTRACT schema.

Defines the queries for the finder and select methods of an entity bean having container-managed persistence. A subset of SQL92, EJB QL has extensions that allow navigation over the relationships defined in an entity bean's abstract schema.

5.

What Is Enterprise Javabeans?

Answer»

A COMPONENT architecture for the development and deployment of object-oriented, distributed, enterprise-level applications. Applications WRITTEN USING the Enterprise JAVABEANS architecture are scalable, transactional, and SECURE.

A component architecture for the development and deployment of object-oriented, distributed, enterprise-level applications. Applications written using the Enterprise JavaBeans architecture are scalable, transactional, and secure.

6.

What Is Enterprise Information System?

Answer»

The applications that CONSTITUTE an enterprise's existing system for handling companywide information. These applications provide an information infrastructure for an enterprise. An enterpriseinformation system offers a well-defined set of SERVICES to its clients. These services are EXPOSED to clients as local or remote interfaces or both. Examples of enterprise information SYSTEMS INCLUDE enterprise resource planning systems, mainframe transaction processing systems, and legacy database systems.

The applications that constitute an enterprise's existing system for handling companywide information. These applications provide an information infrastructure for an enterprise. An enterpriseinformation system offers a well-defined set of services to its clients. These services are exposed to clients as local or remote interfaces or both. Examples of enterprise information systems include enterprise resource planning systems, mainframe transaction processing systems, and legacy database systems.

7.

What Is Ejb Server?

Answer»

Software that provides services to an EJB container. For EXAMPLE, an EJB container TYPICALLY RELIES on a transaction manager that is part of the EJBserver to perform the two-phase commit across all the PARTICIPATING resource managers. The J2EE architecture assumes that an EJB container is hosted by an EJBserver from the same vendor, so it does not specify the contract between these two entities. An EJB server can host one or more EJB containers.

Software that provides services to an EJB container. For example, an EJB container typically relies on a transaction manager that is part of the EJBserver to perform the two-phase commit across all the participating resource managers. The J2EE architecture assumes that an EJB container is hosted by an EJBserver from the same vendor, so it does not specify the contract between these two entities. An EJB server can host one or more EJB containers.

8.

What Is Entity Bean?

Answer»

An enterprise bean that represents persistent data maintained in a database. An entity bean can MANAGE its own persistence or can delegate this function to its CONTAINER. An entity bean is identified by a primary key. If the container in which an entity bean is hosted crashes, the entity bean, its primary key, and any remote REFERENCES SURVIVE the crash.

An enterprise bean that represents persistent data maintained in a database. An entity bean can manage its own persistence or can delegate this function to its container. An entity bean is identified by a primary key. If the container in which an entity bean is hosted crashes, the entity bean, its primary key, and any remote references survive the crash.

9.

What Is Ejb Object?

Answer»

An object WHOSE CLASS implements the enterprise bean's remote interface. A client never references an enterprise bean instance directly. A client ALWAYS references an EJB object. The class of an EJB object is generated by a container's deployment TOOLS.

An object whose class implements the enterprise bean's remote interface. A client never references an enterprise bean instance directly. A client always references an EJB object. The class of an EJB object is generated by a container's deployment tools.

10.

What Is Ejb Home Object?

Answer»

An object that provides the life-cycle operations (create, REMOVE, find) for an enterprise bean. The CLASS for the EJB Home object is generated by the container's deployment tools. The EJB Home object implements the enterprise bean's Home interface. The client REFERENCES an EJB Home object to perform life-cycle operations on an EJB object. The client uses JNDI to LOCATE an EJB Home object.

An object that provides the life-cycle operations (create, remove, find) for an enterprise bean. The class for the EJB Home object is generated by the container's deployment tools. The EJB Home object implements the enterprise bean's Home interface. The client references an EJB Home object to perform life-cycle operations on an EJB object. The client uses JNDI to locate an EJB Home object.

11.

What Is Ejb Context?

Answer»

A vendor that supplies an EJB container. An object that allows an enterprise BEAN to invoke services provided by the container and to OBTAIN the INFORMATION about the CALLER of a client-invoked method.

A vendor that supplies an EJB container. An object that allows an enterprise bean to invoke services provided by the container and to obtain the information about the caller of a client-invoked method.

12.

What Is Ejb Container?

Answer»

A container that implements the EJB component contract of the J2EE ARCHITECTURE. This contract SPECIFIES a RUNTIME environment for enterprise beans that includes security, concurrency, life-cycle management, transactions, deployment, naming, and other SERVICES. An EJB container is provided by an EJB or J2EE server.

A container that implements the EJB component contract of the J2EE architecture. This contract specifies a runtime environment for enterprise beans that includes security, concurrency, life-cycle management, transactions, deployment, naming, and other services. An EJB container is provided by an EJB or J2EE server.

13.

What Is Bean Customization?

Answer»

Customization provides a MEANS for modifying the appearance and behavior of a bean within an application builder so it meets your specific needs. There are several levels of customization available for a bean developer to ALLOW other DEVELOPERS to get maximum benefit from a bean?s potential functionality.

1.By using a property editor. Each bean property has its own property editor. The NetBeans GUI Builder USUALLY displays a bean's property editors in the Properties window. The property editor that is associated with a particular property type EDITS that property type.
2. By using customizers. Customizers give you complete GUI control over bean customization. Customizers are used where property editors are not practical or applicable. Unlike a property editor, which is associated with a property, a customizer is associated with a bean.

Customization provides a means for modifying the appearance and behavior of a bean within an application builder so it meets your specific needs. There are several levels of customization available for a bean developer to allow other developers to get maximum benefit from a bean?s potential functionality.

1.By using a property editor. Each bean property has its own property editor. The NetBeans GUI Builder usually displays a bean's property editors in the Properties window. The property editor that is associated with a particular property type edits that property type.
2. By using customizers. Customizers give you complete GUI control over bean customization. Customizers are used where property editors are not practical or applicable. Unlike a property editor, which is associated with a property, a customizer is associated with a bean.

14.

What Are Introspection Api In Java Beans?

Answer»

The JavaBeans API architecture supplies a set of classes and interfaces to provide introspection. The BeanInfo (in the API reference documentation) interface of the java.beans package defines a set of METHODS that allow bean implementors to provide explicit information about their beans. By specifying BeanInfo for a bean component, a developer can hide methods, specify an icon for the TOOLBOX, provide descriptive NAMES for properties, define which properties are bound properties, and much more.

The getBeanInfo(beanName) (in the API reference documentation) of the Introspector (in the API reference documentation) class can be USED by builder tools and other automated environments to provide detailed information about a bean. The getBeanInfo method relies on the naming CONVENTIONS for the bean's properties, events, and methods. A call to getBeanInfo results in the introspection process analyzing the bean?s classes and superclasses.

The JavaBeans API architecture supplies a set of classes and interfaces to provide introspection. The BeanInfo (in the API reference documentation) interface of the java.beans package defines a set of methods that allow bean implementors to provide explicit information about their beans. By specifying BeanInfo for a bean component, a developer can hide methods, specify an icon for the toolbox, provide descriptive names for properties, define which properties are bound properties, and much more.

The getBeanInfo(beanName) (in the API reference documentation) of the Introspector (in the API reference documentation) class can be used by builder tools and other automated environments to provide detailed information about a bean. The getBeanInfo method relies on the naming conventions for the bean's properties, events, and methods. A call to getBeanInfo results in the introspection process analyzing the bean?s classes and superclasses.

15.

What Is Introspection Properties In Java Beans?

Answer»

INTROSPECTION is the automatic PROCESS of analyzing a bean's design patterns to reveal the bean's properties, EVENTS, and METHODS.

Introspection is the automatic process of analyzing a bean's design patterns to reveal the bean's properties, events, and methods.

16.

How To Control Serialization In Java Beans?

Answer»

Three ways to control serilization in java BEANS:
1.Automatic serialization, IMPLEMENTED by the Serializable interface. The Java serialization software serializes the entire object, except transient and static fields.
2.Customized serialization. SELECTIVELY exclude fields you do not want serialized by marking with the transient (or static) modifier.
3.Customized file format, implemented by the Externalizable interface and its two methods. Beans are written in a SPECIFIC file format.

Three ways to control serilization in java beans:
1.Automatic serialization, implemented by the Serializable interface. The Java serialization software serializes the entire object, except transient and static fields.
2.Customized serialization. Selectively exclude fields you do not want serialized by marking with the transient (or static) modifier.
3.Customized file format, implemented by the Externalizable interface and its two methods. Beans are written in a specific file format.

17.

What Is The Serializable Class In Java Beans?

Answer»

Any class is serializable as long as that class or a parent class implements the java.io.Serializable interface. EXAMPLES of serializable classes INCLUDE Component, STRING, DATE, Vector, and Hashtable.

Any class is serializable as long as that class or a parent class implements the java.io.Serializable interface. Examples of serializable classes include Component, String, Date, Vector, and Hashtable.

18.

How To Create Bound Property In Bean Application?

Answer»

To create the title property as a bound property for the MyBean COMPONENT in the NetBeans GUI Builder, perform the following sequence of operations:

  • Right-click the Bean Patterns node in the MyBean class hierarchy.
  • Select Add|Property from the pop-up menu.
  • FILL the New Property PATTERN form and click OK.

To create the title property as a bound property for the MyBean component in the NetBeans GUI Builder, perform the following sequence of operations:

19.

What Is Glasgow?

Answer»

Glasgow - the code name for add-ins to the JavaBeans SPECIFICATION. It contains following specifications:
► The Extensible RUNTIME Containment and Services Protocol.
► The Drag and DROP Subsystem for the JAVA Foundation Classes.
► The JavaBeans Activation FRAMEWORK.

Glasgow - the code name for add-ins to the JavaBeans specification. It contains following specifications:
► The Extensible Runtime Containment and Services Protocol.
► The Drag and Drop Subsystem for the Java Foundation Classes.
► The JavaBeans Activation Framework.

20.

How Does The Infobus Relate To Javabeans?

Answer»

The INFOBUS SPECIFICATION extends JAVABEANS by providing a set of ENHANCED interfaces to share and exchange dynamic data.

The InfoBus specification extends JavaBeans by providing a set of enhanced interfaces to share and exchange dynamic data.

21.

Will The General Public Have Access To The Infobus Apis?

Answer»

Yes, under the USUAL terms of the JDK license. The specification and technology PREVIEW are available in our products archive.

Yes, under the usual terms of the JDK license. The specification and technology preview are available in our products archive.

22.

Is The Infobus Client Side Only?

Answer»

Yes. InfoBus is typically used to communicate among BEANS at the client, and it can ALSO be useful for sharing INFORMATION among components at a single server site. The INITIAL version of InfoBus is not distributed, and is therefore not intended for transmission of data between clients and servers.

A variety of Java communication services, including JDBC, CORBA, and RMI can be used by InfoBus components for access to distributed data. For example, the ESuite Data Access component is a Bean that connects any JDBC compliant data SOURCE to the InfoBus. Once the data is on the bus, it can easily be imported by any InfoBus Data Consumer, such as a spreadsheet, chartingcomponent, word processor or data analysis tool.

Yes. InfoBus is typically used to communicate among Beans at the client, and it can also be useful for sharing information among components at a single server site. The initial version of InfoBus is not distributed, and is therefore not intended for transmission of data between clients and servers.

A variety of Java communication services, including JDBC, CORBA, and RMI can be used by InfoBus components for access to distributed data. For example, the ESuite Data Access component is a Bean that connects any JDBC compliant data source to the InfoBus. Once the data is on the bus, it can easily be imported by any InfoBus Data Consumer, such as a spreadsheet, chartingcomponent, word processor or data analysis tool.

23.

Difference Between Java Beans And Enterprise Java Beans?

Answer»
  • JavaBeans may be visible or nonvisible at runtime.For example, the visual GUI component may be a button,list box,graphic or a chart. An EJB is a nonvisual ,remote object.
  • JavaBeans are intended to be local to a single process and are primarly intended to RUN on the client side.Although one can develop server-side JavaBeans,it is far easier to develop them using the EJB specification instead. EJB's are remotely executable COMPONENTS or business objects that can be deployed only on the server.
  • JavaBeans is a component TECHNOLOGY to create generic Java components that can be composed together into applets and applications.
  • Even though EJB is a component technology,it neither builds upon nor extends the original JavaBean specification.
  • JavaBeans have an external interface called the properties interface, which allows a builder tool to interpret the FUNCTIONALITY of the bean. EJBs have a dployement descriptor that describes its functionality to an external builder tool or IDE
  • JavaBeans may have BeanInfo classes,property EDITORS or customizers.

24.

What Is The Relation Between The Infobus And Rmi?

Answer»

The InfoBus architecture addresses BEANS talking to one in a single JVM not across multiple JVMs; while RMI (Remote Method Invocation) is intended for COMMUNICATION across JVMs (different JAVA Virtual Machines across the network). As for IIOP, one can envision a JavaBeans component that uses RMI to talk to something on another JVM and then publishes the data on the InfoBus.

Additionally, RMI could be used to allow components in different security classes to communicate within the same JVM.

The InfoBus architecture addresses Beans talking to one in a single JVM not across multiple JVMs; while RMI (Remote Method Invocation) is intended for communication across JVMs (different Java Virtual Machines across the network). As for IIOP, one can envision a JavaBeans component that uses RMI to talk to something on another JVM and then publishes the data on the InfoBus.

Additionally, RMI could be used to allow components in different security classes to communicate within the same JVM.

25.

Why Is The Javabeans Bridge For Activex Only Available On Windows/x86?

Answer»

Sun's JavaBeans Bridge for ActiveX is platform specific due to the platform specific nature of ActiveX. CURRENTLY, ActiveX is essentially a Window/X86 platform specific component architecture.

If Microsoft DELIVERS ActiveX LIBRARIES and ActiveX APPLICATIONS on other platforms, Sun will evaluate CUSTOMER demand and respond accordingly.

Sun's JavaBeans Bridge for ActiveX is platform specific due to the platform specific nature of ActiveX. Currently, ActiveX is essentially a Window/X86 platform specific component architecture.

If Microsoft delivers ActiveX libraries and ActiveX applications on other platforms, Sun will evaluate customer demand and respond accordingly.

26.

Who Is Developing The Javabeans Migration Assistant To Activex?

Answer»

IBM and Taligent, its object oriented technology subsidiary, with support from JavaSoft, are developing a set of CONVERSION conventions, a porting guide and tool that will allow DEVELOPERS to EASILY CONVERT their Windows ACTIVEX components into JavaBeans.

IBM and Taligent, its object oriented technology subsidiary, with support from JavaSoft, are developing a set of conversion conventions, a porting guide and tool that will allow developers to easily convert their Windows ActiveX components into JavaBeans.

27.

What Are/is Enterprise Javabeans?

Answer»

Enterprise JavaBeans (EJB) is an API specification for building scalable, distributed, component-based, multi-tier APPLICATIONS. It leverages and extends the JavaBeans component model to provide a rich object-oriented transactional environment for developers building enterprise applications.

Enterprise JavaBeans (EJB) technology is the basis of Java 2 Platform, Enterprise Edition (J2EE). EJB technology PROVIDES the scalable architecture for executing business logic in a distributed computing environment. J2EE makes the life of an enterprise developer easier by COMBINING the EJB component architecture with other enterprise technologies to solutions on the Java platform for SEAMLESS development and deployment of server side applications.

Enterprise JavaBeans (EJB) is an API specification for building scalable, distributed, component-based, multi-tier applications. It leverages and extends the JavaBeans component model to provide a rich object-oriented transactional environment for developers building enterprise applications.

Enterprise JavaBeans (EJB) technology is the basis of Java 2 Platform, Enterprise Edition (J2EE). EJB technology provides the scalable architecture for executing business logic in a distributed computing environment. J2EE makes the life of an enterprise developer easier by combining the EJB component architecture with other enterprise technologies to solutions on the Java platform for seamless development and deployment of server side applications.

28.

What Is The Infobus?

Answer»

The InfoBus is a compact Java API which allows cooperating applets or Beans, on a Web page or in any other Java application, to communicate data to one another. The InfoBus architecture enables Beans to be CATEGORIZED as "data providers" and "data CONSUMERS". Data providers are Beans whose primary FUNCTION is to access data from their native store, such as a DBMS, spreadsheet, flat file, Lotus Notes database ETC., and to offer data onto the InfoBus.

Data consumers retrieve data from the bus, for analysis or visual display. This segregation of provider from consumer is extremely powerful in that it enables applications to be independent of their data; for example, a charting Bean need not understand SQL or JDBC in order to access DBMS data.

Of course, a Bean can be both a consumer and provider: for example a spreadsheet may accept data from a DBMS and provide data to a chart Bean.

The InfoBus is a compact Java API which allows cooperating applets or Beans, on a Web page or in any other Java application, to communicate data to one another. The InfoBus architecture enables Beans to be categorized as "data providers" and "data consumers". Data providers are Beans whose primary function is to access data from their native store, such as a DBMS, spreadsheet, flat file, Lotus Notes database etc., and to offer data onto the InfoBus.

Data consumers retrieve data from the bus, for analysis or visual display. This segregation of provider from consumer is extremely powerful in that it enables applications to be independent of their data; for example, a charting Bean need not understand SQL or JDBC in order to access DBMS data.

Of course, a Bean can be both a consumer and provider: for example a spreadsheet may accept data from a DBMS and provide data to a chart Bean.

29.

Does The Infobus Compete With Javabeans?

Answer»

On the contrary, InfoBus EXTENDS the POWER of JavaBeans to a new range of more DYNAMIC APPLICATIONS. InfoBus is FULLY compatible with JavaBeans, and Lotus enthusiastically supports JavaBeans as the component standard for Java. Wherever possible, InfoBus uses the existing mechanisms of JavaBeans.

On the contrary, InfoBus extends the power of JavaBeans to a new range of more dynamic applications. InfoBus is fully compatible with JavaBeans, and Lotus enthusiastically supports JavaBeans as the component standard for Java. Wherever possible, InfoBus uses the existing mechanisms of JavaBeans.

30.

Is Infobus Easy To Use?

Answer»

Using InfoBus aware components, such as the ESuite components from LOTUS, USERS can easily construct powerful data driven applications. No programming or scripting is REQUIRED: simple parameters are used to establish connections to DATABASES and to select data for processing. For DEVELOPERS creating InfoBus components, InfoBus offers a straightforward API compatible in style with other features of JavaBeans.

Using InfoBus aware components, such as the ESuite components from Lotus, users can easily construct powerful data driven applications. No programming or scripting is required: simple parameters are used to establish connections to databases and to select data for processing. For developers creating InfoBus components, InfoBus offers a straightforward API compatible in style with other features of JavaBeans.

31.

Javabeans Has Mechanisms Like Bound Properties For Data Transfer Between Components. Why Is The Infobus Necessary?

Answer»

JavaBeans mechanisms, such as bound properties, are very useful in cases where the type of data to be COMMUNICATED can be hard-coded into the source and target COMPONENTS. The InfoBus adds ADDITIONAL features REQUIRED for more dynamic data interchange. These can be cases where communication is driven by the CONTENT of the data and where the nature of the data to be exchanged is determined at runtime.

JavaBeans mechanisms, such as bound properties, are very useful in cases where the type of data to be communicated can be hard-coded into the source and target components. The InfoBus adds additional features required for more dynamic data interchange. These can be cases where communication is driven by the content of the data and where the nature of the data to be exchanged is determined at runtime.

32.

Can Both Java Applets And Javabeans Components Use The Infobus?

Answer»

Yes.

Yes.

33.

Can Javabeans Use Dcom As Its Network Model?

Answer»

JavaBeans works with any network model (i.e., to communicate between components across the network), including CORBA, DCOM, ETC. JavaBeans integrates WELL with CORBA IDL, which is an excellent solution for customers in a heterogeneous distributed computing environment with PLATFORM independent components. However, we recommend RMI for JAVA to Java inter-object communication.

JavaBeans works with any network model (i.e., to communicate between components across the network), including CORBA, DCOM, etc. JavaBeans integrates well with CORBA IDL, which is an excellent solution for customers in a heterogeneous distributed computing environment with platform independent components. However, we recommend RMI for Java to Java inter-object communication.

34.

Why Would A Developer Need The Javabeans Migration Assistant For Activex?

Answer»

Many of the capabilities that are so EXCITING to JavaBeans DEVELOPERS are not available on ActiveX, or are incomplete. There is, therefore, a need for a set of conversion conventions and tools designed to convert DESKTOP ActiveX components into JavaBeans components. The resulting Beans will be usable in both in new NETWORK savvy e-business applications as well as traditional desktop applications, includingActiveX containers. Developers and customers benefit from the advantages offered by JavaBeans by simply leveraging their current INVESTMENTS in ActiveX.

Many of the capabilities that are so exciting to JavaBeans developers are not available on ActiveX, or are incomplete. There is, therefore, a need for a set of conversion conventions and tools designed to convert desktop ActiveX components into JavaBeans components. The resulting Beans will be usable in both in new network savvy e-business applications as well as traditional desktop applications, includingActiveX containers. Developers and customers benefit from the advantages offered by JavaBeans by simply leveraging their current investments in ActiveX.

35.

How And When Will The Javabeans Migration Assistant To Activex Be Available?

Answer»

IBM plans to ship the JavaBeans Migration Assistant for ActiveX in Taligent's Visual Age, WebRunner Toolkit, and Visual Age for JAVA development TOOLS. This will allow developers to utilize a COMMON component MODEL that may be leveraged by a wide RANGE of tools, including the IBM Visual Age for Java family.

IBM plans to ship the JavaBeans Migration Assistant for ActiveX in Taligent's Visual Age, WebRunner Toolkit, and Visual Age for Java development tools. This will allow developers to utilize a common component model that may be leveraged by a wide range of tools, including the IBM Visual Age for Java family.

36.

How To Implement A Bound Property In Your Bean Application?

Answer»

To implement a BOUND property in the application, follow these steps:
► Import the java.beans package. This gives you access to the PropertyChangeSupport class.
► Instantiate a PropertyChangeSupport object. This object maintains the property change LISTENER LIST and fires property change events. You can also make your class a PropertyChangeSupport subclass.
► Implement methods to maintain the property change listener list. Since a PropertyChangeSupport subclass implements these methods, you merely wrap calls to the property-change support object's methods.
MODIFY a property's SET method to fire a property change event when the property is changed.

To implement a bound property in the application, follow these steps:
► Import the java.beans package. This gives you access to the PropertyChangeSupport class.
► Instantiate a PropertyChangeSupport object. This object maintains the property change listener list and fires property change events. You can also make your class a PropertyChangeSupport subclass.
► Implement methods to maintain the property change listener list. Since a PropertyChangeSupport subclass implements these methods, you merely wrap calls to the property-change support object's methods.
► Modify a property's set method to fire a property change event when the property is changed.

37.

What Is The Relationship Between Enterprise Javabeans And Javabeans?

Answer»

Enterprise JavaBeans extends the JavaBeans component model to handle the NEEDS of transactional business APPLICATIONS.

JavaBeans is a component model for visual construction of reusable components for the Java PLATFORM. Enterprise JavaBeans extends JavaBeans to middle-tier/server side business applications. The extensions that Enterprise JavaBeans adds to JavaBeans include support for transactions, state management, and deployment TIME attributes.

Although applications deploying the Enterprise JavaBeans architecture are independent from the underlying COMMUNICATION protocol, the Enterprise JavaBeans architecture specifies how communication among components maps into the underlying communication protocols, such as CORBA/IIOP.

Enterprise JavaBeans extends the JavaBeans component model to handle the needs of transactional business applications.

JavaBeans is a component model for visual construction of reusable components for the Java platform. Enterprise JavaBeans extends JavaBeans to middle-tier/server side business applications. The extensions that Enterprise JavaBeans adds to JavaBeans include support for transactions, state management, and deployment time attributes.

Although applications deploying the Enterprise JavaBeans architecture are independent from the underlying communication protocol, the Enterprise JavaBeans architecture specifies how communication among components maps into the underlying communication protocols, such as CORBA/IIOP.

38.

When You Will Chose Stateful Session Bean And Stateless Session Bean

Answer»

STATEFUL SESSION bean is used when we need to maintain the client STATE . Where stateless session bean will not have a client state it will be in pool. Example of statefull session is Shoping CART SITE where we need to maintain the client state .

stateful session bean is used when we need to maintain the client state . Where stateless session bean will not have a client state it will be in pool. Example of statefull session is Shoping cart site where we need to maintain the client state .

39.

What Are The Call Back Methods In Session Bean?

Answer»

SESSION bean CALLBACK methods differ whether it is Stateless or stateful Session bean they are.

Stateless Session Bean
1. setSessionContext()
2. ejbCreate()
3. ejbRemove()

Stateful Session Bean
1. setSessionContext()
2.ejbCreate()
3.ejbPassivate()
4.ejbActivate()
5.ejbRemove()

Session bean callback methods differ whether it is Stateless or stateful Session bean they are.

Stateless Session Bean
1. setSessionContext()
2. ejbCreate()
3. ejbRemove()

Stateful Session Bean
1. setSessionContext()
2.ejbCreate()
3.ejbPassivate()
4.ejbActivate()
5.ejbRemove()

40.

What Is The Difference Between Stateful Session Bean And Stateless Session Bean

Answer»

Stateful SESSION beans have the PASSIVATED and ACTIVE state which the Stateless BEAN does not have.

Stateful session beans have the passivated and Active state which the Stateless bean does not have.

41.

What Is Session Bean. What Are The Various Types Of Session Bean?

Answer»

SessionBeans typically are used to REPRESENT a client they are of two types:

Stateful Session BEANS : they maintain conversational state between subsequest calls by a client.
Stateless Session Bean : consider this as a servlet equivalent in EJB. It is just used to service CLIENTS regardless of state and does not maintain any state.

SessionBeans typically are used to represent a client they are of two types:

Stateful Session Beans : they maintain conversational state between subsequest calls by a client.
Stateless Session Bean : consider this as a servlet equivalent in EJB. It is just used to service clients regardless of state and does not maintain any state.

42.

What Is Message Driven Beam?

Answer»

An ENTERPRISE bean that is an asynchronous message consumer. A message-driven bean has no state for a specific CLIENT, but its instance variables can CONTAIN state across the handling of client MESSAGES, including an open database connection and an object reference to an EJB object. A client accesses a message-driven bean by sending messages to the destination for which the bean is a message listener.

An enterprise bean that is an asynchronous message consumer. A message-driven bean has no state for a specific client, but its instance variables can contain state across the handling of client messages, including an open database connection and an object reference to an EJB object. A client accesses a message-driven bean by sending messages to the destination for which the bean is a message listener.

43.

What Is The Difference Between Message Driven Beans And Stateless Session Beans?

Answer»

In several WAYS, the dynamic creation and allocation of message-driven bean instances mimics the behavior of stateless session EJB instances, which exist only for the duration of a particular method call. However, message-driven beans are different from stateless session EJBs (and other types of EJBs) in several significant ways: Message-driven beans process multiple JMS messages asynchronously, rather than processing a serialized SEQUENCE of method calls. Message-driven beans have no HOME or remote interface, and therefore cannot be directly accessed by internal or external clients. Clients interact with message-driven beans only indirectly, by sending a message to a JMS Queue or TOPIC.

Only the container directly interacts with a message-driven bean by creating bean instances and passing JMS messages to those instances as necessary. The Container maintains the entire lifecycle of a message-driven bean; instances cannot be created or removed as a result of client requests or other API calls.

In several ways, the dynamic creation and allocation of message-driven bean instances mimics the behavior of stateless session EJB instances, which exist only for the duration of a particular method call. However, message-driven beans are different from stateless session EJBs (and other types of EJBs) in several significant ways: Message-driven beans process multiple JMS messages asynchronously, rather than processing a serialized sequence of method calls. Message-driven beans have no home or remote interface, and therefore cannot be directly accessed by internal or external clients. Clients interact with message-driven beans only indirectly, by sending a message to a JMS Queue or Topic.

Only the container directly interacts with a message-driven bean by creating bean instances and passing JMS messages to those instances as necessary. The Container maintains the entire lifecycle of a message-driven bean; instances cannot be created or removed as a result of client requests or other API calls.

44.

How Does Concurrency Work For Message-driven Beans?

Answer»

The way concurrency is achieved for Queues is by spawning one JMSSession per MDB instance in the POOL. Since JMSSessions are processed in parallel by JMS, concurrency is obtained naturally this way and JMS takes care of delivering the message to, at most, one listener. If an MDB is deployed to multiple servers in a cluster, JMSSessions are created for each MDB instance on each server and load balancing will be done across them. For Topics in WebLogic JMS 6.1, there is one JMSSession per bean instance in the pool. Because of the way Topics work, the session, and thus every bean instance, receives a copy of each message published on that Topic. (There was ALSO a problem that caused parallel processing not to work correctly. This has been fixed for WLS 6.0 Service Pack 1.) Within a single server, one topic consumer is used to pass out messages to multiple threads to GET the concurrency while producing only a single copy of each message. You can CONFIGURE multiple MDBs to listen on the same topic and each MDB will receive a copy of every message. When using multiple servers, each server gets its own consumer and therefore its own copy of each message. It is not currently possible to share a consumer across multiple servers. If you want a message to be processed by exactly one MDB, use a queue. One customer had an example where topic MDBs are NEEDED in which there will be multiple implementations of the MDBs listening on the same topic. In other words, more than one MDB with a different implementation may be subscribing to the same topic. The client has no advanced way of knowing how many different kinds of MDBs may be listening on the same topic, but it is possible for there to be more than one listener, therefore topics, not queues. For each kind of MDB listening on the topic, the message is delivered exactly once (i.e., the message will be delivered exactly once to an instance in each named MDB pool listening on the topic).

The way concurrency is achieved for Queues is by spawning one JMSSession per MDB instance in the pool. Since JMSSessions are processed in parallel by JMS, concurrency is obtained naturally this way and JMS takes care of delivering the message to, at most, one listener. If an MDB is deployed to multiple servers in a cluster, JMSSessions are created for each MDB instance on each server and load balancing will be done across them. For Topics in WebLogic JMS 6.1, there is one JMSSession per bean instance in the pool. Because of the way Topics work, the session, and thus every bean instance, receives a copy of each message published on that Topic. (There was also a problem that caused parallel processing not to work correctly. This has been fixed for WLS 6.0 Service Pack 1.) Within a single server, one topic consumer is used to pass out messages to multiple threads to get the concurrency while producing only a single copy of each message. You can configure multiple MDBs to listen on the same topic and each MDB will receive a copy of every message. When using multiple servers, each server gets its own consumer and therefore its own copy of each message. It is not currently possible to share a consumer across multiple servers. If you want a message to be processed by exactly one MDB, use a queue. One customer had an example where topic MDBs are needed in which there will be multiple implementations of the MDBs listening on the same topic. In other words, more than one MDB with a different implementation may be subscribing to the same topic. The client has no advanced way of knowing how many different kinds of MDBs may be listening on the same topic, but it is possible for there to be more than one listener, therefore topics, not queues. For each kind of MDB listening on the topic, the message is delivered exactly once (i.e., the message will be delivered exactly once to an instance in each named MDB pool listening on the topic).

45.

What Is A Message Driven Bean, What Functions Does A Message Driven Bean Have And How Do They Work In Collaboration With Jms?

Answer»

Message driven beans are the latest addition to the family of component bean types defined by the EJB specification. The original bean types include session beans, which contain business logic and maintain a state associated with client sessions, and entity beans, which map objects to persistent DATA. Message driven beans will provide asynchrony to EJB based applications by acting as JMS message consumers. A message bean is associated with a JMS topic or queue and receives JMS messages sent by EJB clients or other beans. Unlike entity beans and session beans, message beans do not have home or remote interfaces. Instead, message driven beans are instantiated by the container as required. Like stateless session beans, message beans maintain no client-specific state, allowing the container to optimally manage a pool of message-bean instances. Clients send JMS messages to message beans in exactly the same manner as they would send messages to any other JMS destination. This similarity is a fundamental design GOAL of the JMS capabilities of the new specification. To receive JMS messages, message driven beans implement the javax.jms.MessageListener interface, which defines a single onMessage() method. When a message arrives, the container ensures that a message bean corresponding to the message topic/queue exists (instantiating it if necessary), and CALLS its onMessage method PASSING the client’s message as the single argument. The message bean’s implementation of this method contains the business logic required to process the message. Note that session beans and entity beans are not allowed to function as message beans.

Message driven beans are the latest addition to the family of component bean types defined by the EJB specification. The original bean types include session beans, which contain business logic and maintain a state associated with client sessions, and entity beans, which map objects to persistent data. Message driven beans will provide asynchrony to EJB based applications by acting as JMS message consumers. A message bean is associated with a JMS topic or queue and receives JMS messages sent by EJB clients or other beans. Unlike entity beans and session beans, message beans do not have home or remote interfaces. Instead, message driven beans are instantiated by the container as required. Like stateless session beans, message beans maintain no client-specific state, allowing the container to optimally manage a pool of message-bean instances. Clients send JMS messages to message beans in exactly the same manner as they would send messages to any other JMS destination. This similarity is a fundamental design goal of the JMS capabilities of the new specification. To receive JMS messages, message driven beans implement the javax.jms.MessageListener interface, which defines a single onMessage() method. When a message arrives, the container ensures that a message bean corresponding to the message topic/queue exists (instantiating it if necessary), and calls its onMessage method passing the client’s message as the single argument. The message bean’s implementation of this method contains the business logic required to process the message. Note that session beans and entity beans are not allowed to function as message beans.

46.

When Is Update Method Called?

Answer»

Whenever a SCREEN needs redrawing (e.g., upon creation, resizing, validating) the UPDATE METHOD is called. By default, the update method clears the screen and then calls the paint method, which normally contains all the drawing CODE.

Whenever a screen needs redrawing (e.g., upon creation, resizing, validating) the update method is called. By default, the update method clears the screen and then calls the paint method, which normally contains all the drawing code.

47.

Which Method Is Used To Output A String To An Applet? Which Function Is This Method Included In?

Answer»

DRAWSTRING( ) method is USED to output a STRING to an applet. This method is included in the paint method of the Applet.

drawString( ) method is used to output a string to an applet. This method is included in the paint method of the Applet.

48.

What Are The Steps Involved In Applet Development?

Answer»

Following are the steps involved in Applet development:
► Create/Edit a Java source file. This file must contain a class which extends Applet class.
COMPILE your program using javac
► Execute the APPLETVIEWER, specifying the name of your APPLETS source file or html file. In case the applet information is STORED in html file then Applet can be invoked using java enabled web BROWSER.

Following are the steps involved in Applet development:
► Create/Edit a Java source file. This file must contain a class which extends Applet class.
► Compile your program using javac
► Execute the appletviewer, specifying the name of your applets source file or html file. In case the applet information is stored in html file then Applet can be invoked using java enabled web browser.

49.

What Are The Applets Information Methods?

Answer»

The following are the Applets information METHODS: getAppletInfo() method: RETURNS a string describing the applet, its AUTHOR, COPYRIGHT information, etc. getParameterInfo() method: Returns an array of string describing the applets parameters.

The following are the Applets information methods: getAppletInfo() method: Returns a string describing the applet, its author, copyright information, etc. getParameterInfo() method: Returns an array of string describing the applets parameters.

50.

What Is Appletstub Interface?

Answer»

The APPLET stub interface provides the MEANS by which an applet and the browser COMMUNICATE. Your CODE will not typically implement this interface.

The applet stub interface provides the means by which an applet and the browser communicate. Your code will not typically implement this interface.