Java Interview Questions-34
1.What do you mean by Bean wiring?
The act of creating associations between application components (beans) within the Spring container is reffered to as Bean wiring.
2.What kind of industry support exists for JavaBeans?
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.
3.Why a component architecture for the Java platform?
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.
4.What should SessionFactory be placed so that it can be easily accessed?
As far as it is compared to J2EE environment, if the SessionFactory is placed in JNDI then it can be easily accessed and shared between different threads and various components that are hibernate aware. You can set the SessionFactory to a JNDI by configuring a property hibernate.session_factory_name in the hibernate.properties file.
5.What are POJOs?
POJO stands for plain old java objects. These are just basic JavaBeans that have defined setter and getter methods for all the properties that are there in that bean. Besides they can also have some business logic related to that property. Hibernate applications works efficiently with POJOs rather then simple java classes.
6.What is object/relational mapping metadata?
ORM tools require a metadata format for the application to specify the mapping between classes and tables, properties and columns, associations and foreign keys, Java types and SQL types. This information is called the object/relational mapping metadata. It defines the transformation between the different data type systems and relationship representations.
7.What is a meant by light object mapping?
The entities are represented as classes that are mapped manually to the relational tables. The code is hidden from the business logic using specific design patterns. This approach is successful for applications with a less number of entities, or applications with common, metadata-driven data models. This approach is most known to all.
8.What is a meant by medium object mapping?
The application is designed around an object model. The SQL code is generated at build time. And the associations between objects are supported by the persistence mechanism, and queries are specified using an object-oriented expression language. This is best suited for medium-sized applications with some complex transactions. Used when the mapping exceeds 25 different database products at a time.
9.Why nobody at Sun wants to read the messages sent to [email protected]?
Because of the fact, that 99% of all messages is spam. It is recommended to post on JavaBeans forum, which is inspected by Sun engineers on a regular basis.
10.What is the relationship between Sun s JFCs and JavaBeans?
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.
11.What is DelegatingVariableResolver?
Spring provides a custom JavaServer Faces VariableResolver implementation that extends the standard Java Server Faces managed beans mechanism which lets you use JSF and Spring together. This variable resolver is called as DelegatingVariableResolver
12.What are the different modules in Spring framework?
1.The Core container module
2.Application context module
3.AOP module (Aspect Oriented Programming)
4.JDBC abstraction and DAO module
5.O/R mapping integration module (Object/Relational)
7.MVC framework module
13.What is the Core container module?
This module is provides the fundamental functionality of the spring framework. In this module BeanFactory is the heart of any spring-based application. The entire framework was built on the top of this module. This module makes the Spring container.
14.What is Application context module?
The Application context module makes spring a framework. This module extends the concept of BeanFactory, providing support for internationalization (I18N) messages, application lifecycle events, and validation. This module also supplies many enterprise services such JNDI access, EJB integration, remoting, and scheduling. It also provides support to other framework.
15.What is AOP module?
The AOP module is used for developing aspects for our Spring-enabled application. Much of the support has been provided by the AOP Alliance in order to ensure the interoperability between Spring and other AOP frameworks. This module also introduces metadata programming to Spring. Using Spring’s metadata support, we will be able to add annotations to our source code that instruct Spring on where and how to apply aspects.
16. What is JDBC abstraction and DAO module?
Using this module we can keep up the database code clean and simple, and prevent problems that result from a failure to close database resources. A new layer of meaningful exceptions on top of the error messages given by several database servers is bought in this module. In addition, this module uses Spring’s AOP module to provide transaction management services for objects in a Spring application.
17.What are object/relational mapping integration module?
Spring also supports for using of an object/relational mapping (ORM) tool over straight JDBC by providing the ORM module. Spring provide support to tie into several popular ORM frameworks, including Hibernate, JDO, and iBATIS SQL Maps. Spring’s transaction management supports each of these ORM frameworks as well as JDBC.
18.What do you mean by Auto Wiring?
The Spring container is able to autowire relationships between collaborating beans. This means that it is possible to automatically let Spring resolve collaborators (other beans) for your bean by inspecting the contents of the BeanFactory. The autowiring functionality has five modes.
19.What is web module?
This module is built on the application context module, providing a context that is appropriate for web-based applications. This module also contains support for several web-oriented tasks such as transparently handling multipart requests for file uploads and programmatic binding of request parameters to your business objects. It also contains integration support with Jakarta Struts.
20.What is AOP Alliance?
AOP Alliance is an open-source project whose goal is to promote adoption of AOP and interoperability among different AOP implementations by defining a common set of interfaces and components.
21.What is Spring configuration file?
Spring configuration file is an XML file. This file contains the classes information and describes how these classes are configured and introduced to each other.
22.What does a simple spring application contain?
These applications are like any Java application. They are made up of several classes, each performing a specific purpose within the application. But these classes are configured and introduced to each other through an XML file. This XML file describes how to configure the classes, known as theSpring configuration file.
23.What is XMLBeanFactory?
BeanFactory has many implementations in Spring. But one of the most useful one is org.springframework.beans.factory.xml.XmlBeanFactory, which loads its beans based on the definitions contained in an XML file. To create an XmlBeanFactory, pass a java.io.InputStream to the constructor. The InputStream will provide the XML to the factory. For example, the following code snippet uses a java.io.FileInputStream to provide a bean definition XML file to XmlBeanFactory.
24. Explain Bean lifecycle in Spring framework?
1. The spring container finds the bean’s definition from the XML file and instantiates the bean.
2. Using the dependency injection, spring populates all of the properties as specified in the bean definition.
3. If the bean implements the BeanNameAware interface, the factory calls setBeanName() passing the bean’s ID.
4. If the bean implements the BeanFactoryAware interface, the factory calls setBeanFactory(), passing an instance of itself.
5. If there are any BeanPostProcessors associated with the bean, their post- ProcessBeforeInitialization() methods will be called.
6. If an init-method is specified for the bean, it will be called.
7. Finally, if there are any BeanPostProcessors associated with the bean, their postProcessAfterInitialization() methods will be called.
25.What is Significance of JSF- Spring integration?
Spring – JSF integration is useful when an event handler wishes to explicitly invoke the bean factory to create beans on demand, such as a bean that encapsulates the business logic to be performed when a submit button is pressed.
26.How to integrate your Struts application with Spring?
To integrate your Struts application with Spring, we have two options:
Configure Spring to manage your Actions as beans, using the ContextLoaderPlugin, and set their dependencies in a Spring context file.
Subclass Spring’s ActionSupport classes and grab your Spring-managed beans explicitly using a getWebApplicationContext() method.
27.What are the important beans lifecycle methods?
There are two important bean lifecycle methods. The first one is setup which is called when the bean is loaded in to the container. The second method is the teardown method which is called when the bean is unloaded from the container.
28.What are Inner Beans?
When wiring beans, if a bean element is embedded to a property tag directly, then that bean is said to the Inner Bean. The drawback of this bean is that it cannot be reused anywhere else.
29.What are the different types of bean injections?
There are two types of bean injections.
1. By setter
2. By constructor
30.What is an Aspect?
An aspect is the cross-cutting functionality that you are implementing. It is the aspect of your application you are modularizing. An example of an aspect is logging. Logging is something that is required throughout an application. However, because applications tend to be broken down into layers based on functionality, reusing a logging module through inheritance does not make sense. However, you can create a logging aspect and apply it throughout your application using AOP.
31.What is a Jointpoint?
A joinpoint is a point in the execution of the application where an aspect can be plugged in. This point could be a method being called, an exception being thrown, or even a field being modified. These are the points where your aspect’s code can be inserted into the normal flow of your application to add new behavior.
32.What is a Target?
A target is the class that is being advised. The class can be a third party class or your own class to which you want to add your own custom behavior. By using the concepts of AOP, the target class is free to center on its major concern, unaware to anyadvice that is being applied.
33.What is a Proxy?
A proxy is an object that is created after applying advice to a target object. When you think of client objects the target object and the proxy object are the same.
34.What is meant by Weaving?
The process of applying aspects to a target object to create a new proxy object is called as Weaving. The aspects are woven into the target object at the specified joinpoints.
35. What are the different points where weaving can be applied?
2. Classload Time
36.What does ORM consists of?
An ORM solution consists of the followig four pieces:
* API for performing basic CRUD operations
* API to express queries refering to classes
* Facilities to specify metadata
* Optimization facilities : dirty checking,lazy associations fetching
37.What are the ORM level?
The ORM levels are:
* Pure relational (stored procedure.)
* Light objects mapping (JDBC)
* Medium object mapping
* Full object Mapping (composition,inheritance, polymorphism, persistence by reachability)
38. How does Hibernate distinguish between transient (i.e. newly instantiated) and detached objects?
” Hibernate uses the version property, if there is one.
” If not uses the identifier value. No identifier value means a new object. This does work only for Hibernate managed surrogate keys. Does not work for natural keys and assigned (i.e. not managed by Hibernate) surrogate keys.
” Write your own strategy with Interceptor.isUnsaved().
39.What is the difference between the session.get() method and the session.load() method?
Both the session.get(..) and session.load() methods create a persistent object by loading the required object from the database. But if there was not such object in the database then the method session.load(..) throws an exception whereas session.get(&) returns null.
40.What is the difference between the session.update() method and the session.lock() method?
Both of these methods and saveOrUpdate() method are intended for reattaching a detached object. The session.lock() method simply reattaches the object to the session without checking or updating the database on the assumption that the database in sync with the detached object. It is the best practice to use either session.update(..) or session.saveOrUpdate(). Use session.lock() only if you are absolutely sure that the detached object is in sync with your detached object or if it does not matter because you will be overwriting all the columns that would have changed later on within the same transaction.
41.How would you reatach detached objects to a session when the same object has already been loaded into the session?
You can use the session.merge() method call.
42.What are the general considerations or best practices for defining your Hibernate persistent classes?
1.You must have a default no-argument constructor for your persistent classes and there should be getXXX() (i.e accessor/getter) and setXXX( i.e. mutator/setter) methods for all your persistable instance variables.
2.You should implement the equals() and hashCode() methods based on your business key and it is important not to use the id field in your equals() and hashCode() definition if the id field is a surrogate key (i.e. Hibernate managed identifier). This is because the Hibernate only generates and sets the field when saving the object.
3. It is recommended to implement the Serializable interface. This is potentially useful if you want to migrate around a multi-processor cluster.
4.The persistent class should not be final because if it is final then lazy loading cannot be used by creating proxy objects.
5.Use XDoclet tags for generating your *.hbm.xml files or Annotations (JDK 1.5 onwards), which are less verbose than *.hbm.xml files.
43.How will you configure Hibernate?
The configuration files hibernate.cfg.xml (or hibernate.properties) and mapping files *.hbm.xml are used by the Configuration class to create (i.e. configure and bootstrap hibernate) the SessionFactory, which in turn creates the Session instances. Session instances are the primary interface for the persistence service.
” hibernate.cfg.xml (alternatively can use hibernate.properties): These two files are used to configure the hibernate sevice (connection driver class, connection URL, connection username, connection password, dialect etc). If both files are present in the classpath then hibernate.cfg.xml file overrides the settings found in the hibernate.properties file.
” Mapping files (*.hbm.xml): These files are used to map persistent objects to a relational database. It is the best practice to store each object in an individual mapping file (i.e mapping file per class) because storing large number of persistent classes into one mapping file can be difficult to manage and maintain. The naming convention is to use the same name as the persistent (POJO) class name. For example Account.class will have a mapping file named Account.hbm.xml. Alternatively hibernate annotations can be used as part of your persistent class code instead of the *.hbm.xml files.
44.What is a SessionFactory? Is it a thread-safe object?
SessionFactory is Hibernates concept of a single datastore and is threadsafe so that many threads can access it concurrently and request for sessions and immutable cache of compiled mappings for a single database. A SessionFactory is usually only built once at startup. SessionFactory should be wrapped in some kind of singleton so that it can be easily accessed in an application code.
45. What is a Session? Can you share a session object between different theads?
Session is a light weight and a non-threadsafe object (No, you cannot share it between threads) that represents a single unit-of-work with the database. Sessions are opened by a SessionFactory and then are closed when all work is complete. Session is the primary interface for the persistence service. A session obtains a database connection lazily (i.e. only when required). To avoid creating too many sessions ThreadLocal class can be used as shown below to get the current session no matter how many times you make call to the currentSession() method.
46. What is an Advice?
Advice is the implementation of an aspect. It is something like telling your application of a new behavior. Generally, and advice is inserted into an application at joinpoints.
47.What is a Pointcut?
A pointcut is something that defines at what joinpoints an advice should be applied. Advices can be applied at any joinpoint that is supported by the AOP framework. These Pointcuts allow you to specify where theadvice can be applied.
48.What is an Introduction in AOP?
An introduction allows the user to add new methods or attributes to an existing class. This can then be introduced to an existing class without having to change the structure of the class, but give them the new behavior and state.
49.What are the benefits of detached objects?
Detached objects can be passed across layers all the way up to the presentation layer without having to use any DTOs (Data Transfer Objects). You can later on re-attach the detached objects to another session.
50. How do you switch between relational databases without code changes?
Using Hibernate SQL Dialects , we can switch databases. Hibernate will generate appropriate hql queries based on the dialect defined.
51.If you want to see the Hibernate generated SQL statements on console, what should we do?
In Hibernate configuration file set as follows:
52. What are derived properties?
The properties that are not mapped to a column, but calculated at runtime by evaluation of an expression are called derived properties. The expression can be defined using the formula attribute of the element.
53.What is component mapping in Hibernate?
* A component is an object saved as a value, not as a reference
* A component can be saved directly without needing to declare interfaces or identifier properties
* Required to define an empty constructor
* Shared references not supported
54. What role does the SessionFactory interface play in Hibernate?
The application obtains Session instances from a SessionFactory. There is typically a single SessionFactory for the whole application—created during application initialization. The SessionFactory caches generate SQL statements and other mapping metadata that Hibernate uses at runtime. It also holds cached data that has been read in one unit of work and may be reused in a future unit of work
SessionFactory sessionFactory = configuration.buildSessionFactory();
55.What is the general flow of Hibernate communication with RDBMS?
The general flow of Hibernate communication with RDBMS is :
* Load the Hibernate configuration file and create configuration object. It will automatically load all hbm mapping files
* Create session factory from configuration object
* Get one session from this session factory
* Create HQL Query
* Execute query to get list containing Java objects
56.What is Hibernate Query Language (HQL)?
Hibernate offers a query language that embodies a very powerful and flexible mechanism to query, store, update, and retrieve objects from a database. This language, the Hibernate query Language (HQL), is an object-oriented extension to SQL.
57.What is HQL?
HQL stands for Hibernate Query Language. Hibernate allows the user to express queries in its own portable SQL extension and this is called as HQL. It also allows the user to express in native SQL.
58. What are the most common methods of Hibernate configuration?
The most common methods of Hibernate configuration are:
* Programmatic configuration
* XML configuration (hibernate.cfg.xml)
59.What are the important tags of hibernate.cfg.xml?
An Action Class is an adapter between the contents of an incoming HTTP rest and the corresponding business logic that should be executed to process this rest.
60.What are the Core interfaces are of Hibernate framework?
The five core interfaces are used in just about every Hibernate application. Using these interfaces, you can store and retrieve persistent objects and control transactions.
* Session interface
* SessionFactory interface
* Configuration interface
* Transaction interface
* Query and Criteria interfaces
61.What the Core interfaces are of hibernate framework?
There are many benefits from these. Out of which the following are the most important one.
Session Interface : This is the primary interface used by hibernate applications. The instances of this interface are lightweight and are inexpensive to create and destroy. Hibernate sessions are not thread safe.
SessionFactory Interface : This is a factory that delivers the session objects to hibernate application. Generally there will be a single SessionFactory for the whole application and it will be shared among all the application threads.
Configuration Interface : This interface is used to configure and bootstrap hibernate. The instance of this interface is used by the application in order to specify the location of hibernate specific mapping documents.
Transaction Interface : This is an optional interface but the above three interfaces are mandatory in each and every application. This interface abstracts the code from any kind of transaction implementations such as JDBC transaction, JTA transaction.
Query and Criteria Interface : This interface allows the user to perform queries and also control the flow of the query execution.
62.What are Callback interfaces?
These interfaces are used in the application to receive a notification when some object events occur. Like when an object is loaded, saved or deleted. There is no need to implement callbacks in hibernate applications, but they’re useful for implementing certain kinds of generic functionality.
63.What is meant by full object mapping?
Full object mapping supports sophisticated object modeling: composition, inheritance, polymorphism and persistence. The persistence layer implements transparent persistence; persistent classes do not inherit any special base class or have to implement a special interface. Efficient fetching strategies and caching strategies are implemented transparently to the application.
64.What is the JSF?
JavaServer Faces(JSF) is a framework for building web-based user interface in Java. Unlike Swing, JSF provides widgets like buttons, hyperlinks, checkboxes, etc. in different ways. It has extensible facilities for validating inputs and converting objects to and from strings for display.
JSF is the Java answer to Microsoft ASP.NET’s Web Forms. ASP.Net is roughly equivalent to the Servlet and JSP
65.What is JavaServer Faces event and listener model?
A mechanism for determining how events emitted by JavaServer Faces UI components are handled. This model is based on the JavaBeans component event and listener model.
66.What is JavaServer Faces conversion model?
A mechanism for converting between string-based markup generated by JavaServer Faces UI components and server-side Java objects.
67.What is JavaServer Faces UI component class?
A JavaServer Faces class that defines the behavior and properties of a JavaServer Faces UI component.
68.What is JavaServer Faces expression language?
A simple expression language used by a JavaServer Faces UI component tag attributes to bind the associated component to a bean property or to bind the associated component’s value to a method or an external data source, such as a bean property. Unlike JSP EL expressions, JavaServer Faces EL expressions are evaluated by the JavaServer Faces implementation rather than by the Web container.
69.What is JavaServer Faces navigation model?
A mechanism for defining the sequence in which pages in a JavaServer Faces application are displayed.
70.What is JavaServer Faces Technology?
A framework for building server-side user interfaces for Web applications written in the Java programming language.
71.What is JavaServer Faces UI component?
A user interface control that outputs data to a client or allows a user to input data to a JavaServer Faces application.
72.What is JavaServer Faces validation model?
A mechanism for validating the data a user inputs to a JavaServer Faces UI component.
73. What is the difference between JSP and JSF?
JSP simply provides a Page which may contain markup, embedded Java code, and tags which encapsulate more complicated logic / html. JSF may use JSP as its template, but provides much more. This includes validation, rich component model and lifecycle, more sophisticated EL, separation of data, navigation handling, different view technologies (instead of JSP), ability to provide more advanced features such as AJAX, etc.
74.What are Java Beans?
Java Beans are usual Java classes which adhere to certain coding conventions:
1. Implements java.io.Serializable interface
2.Provides no argument constructor
3.Provides getter and setter methods for accessing it’s properties.
75. Why do I get a NullPointerException when loading a JAR file into the BeanBox?
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).
? The MANIFEST file refers to classes in a package but the actual .class files are not really in that package.
76.What is bean persistance property?
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.
77.What are externizable interface?
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.
78.Is JavaBeans a complete component architecture?
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).
79. Are there JavaBeans components available that I can buy today?
Yes. A large number of companies, both large and small, have announced their plans to deliver JavaBeans-based products.
80. Why do I get a duplicate name error when loading a JAR file?
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.
Themost common causes for this problem are either forgetting to include a “package a;” statement or having a “package” statement with the wrong name.
81.What are the security implications for downloading Beans over the Internet?
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.
82. When will JavaBeans be supported on the [fill in the blank] platform/operating system?
The complete set of JavaBeans APIs are core to Java 2, hence any platform that is fully compatible with Java 2 implicitly supports JavaBeans. Thus, JavaBeans support will be available as soon as this platform/operating system vendor supports Java 2.
83.What is entity reference?
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.
84.What is an entity?
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.
85.What is enterprise bean provider?
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.
86.What is Enterprise JavaBeans Query Language?
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.
87.What is Enterprise JavaBeans?
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.
88.What is enterprise information system?
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.
89.What is EJB server?
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.
90.What is entity bean?
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.
91.What is EJB object?
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.
92.What is 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.
93.What is EJB context?
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.
94. What is the serializable class in java beans?
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.
95.How to create bound property in bean application?
To create the title property as a bound property for the MyBean component in the NetBeans GUI Builder, perform the following sequence of operations:
i Right-click the Bean Patterns node in the MyBean class hierarchy.
ii. Select Add|Property from the pop-up menu.
iii. Fill the New Property Pattern form as shown on the following figure and click OK.
96. What is Glasgow?
Glasgow – the code name for add-ins to the JavaBeans specification. It contains following specifications:
i. The Extensible Runtime Containment and Services Protocol
ii. The Drag and Drop Subsystem for the Java Foundation Classes
iii. The JavaBeans Activation Framework
97. How does the InfoBus relate to JavaBeans?
The InfoBus specification extends JavaBeans by providing a set of enhanced interfaces to share and exchange dynamic data.
98. Will the general public have access to the InfoBus API s?
Yes, under the usual terms of the JDK license. The specification and technology preview are available in our products archive.
99.What are/is Enterprise JavaBeans?
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.
100.Does the InfoBus compete with 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.
101.Is InfoBus easy to use?
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.