Question Answers Related to Enterprise Application Development or Enterprise Java Beans (EJB).

Question Answers Related to Enterprise Application Development or Enterprise Java Beans (EJB).

Q What you mean by platform independence?
Ans: Platform independence means that the same program works on any platform (operating system) without needing any modification.Software that can run on any hardware platform (PC, Mac, Sun Sparc, etc.) or software platform (Linux, Mac OS, UNIX, Windows, etc.) has a platform independence behavior. In general, programs written in Java language can be executed on practically every platform.

Q What is the purpose of HTML?
Ans: The Hypertext Markup Language (HTML) is a standard for describing the structure and presentation of information via the Internet.
OR
HTML is simply a markup language that instructs the browser how to "paint" the page to the screen. It contains the information to be displayed and instructions about the appearance of the display.

Q Why there is need to use XML in enterprise application?
Ans: The disparate distributed applications need a common platform to communicate with one another. Because XML is not specific to any proprietary platform, it can very well fit in that. XML is not tied to a limited set of tags defined by proprietary vendors. In other words, it contains metadata. It allows each specific industry to develop its own tag sets to meet its unique needs.
XML handles both forward and backward data compatibilities. It is good at describing hierarchical data in a standard way. The data can be specified separately from the structure. The data structure can be defined by using either DTD or XML schema.
XSL is powerful enough for the transformation of data between different applications. It is a language that can transform, filter, and sort XML data, define parts of an XML document, format XML data based on the data value, and output XML data to different forms such as screens, paper, or voice.
XML can be leveraged in many areas of enterprise application development. It can be used for data aggregation and management such as indexing, metadata, and so forth. It also can be used to exchange data among the distributed applications. XML schema provides the necessary elements for describing any kind of structured data.

Q Differentiate between State-full and Stateless Server?
Ans: A state-full server remembers client data (state) from one request to the next. Using a state-full file server, the client can send less data with each request. A state-full server is simpler.

A stateless server keeps no state information. Using a stateless file server, the client must specify complete file names in each request specify location for reading or writing re-authenticate for each request.
On the other hand a stateless server is more robust lost connections can't leave a file in an invalid state rebooting the server does not lose state information rebooting the client does not confuse a stateless server.

Q Define MVC?
Ans: The Model-View-Controller (MVC) pattern separates the modeling of the domain, the presentation, and the actions based on user input into three separate classes.
Model: The model manages the behavior and data of the application domain, responds to requests for information about its state (usually from the view), and responds to instructions to change state (usually from the controller).
View: The view manages the display of information.
Controller: The controller interprets the mouse and keyboard inputs from the user, informing the model and/or the view to change as appropriate.

Q What is the purpose of SOA?
Ans: Service-oriented architecture (SOA) is an approach used to create an architecture based upon the use of services. Services (such as Restful Web services) carry out some small function, such as producing data, validating a customer, or providing simple analytical services.
SOA makes it easier for software components on computers connected over a network to cooperate. Every computer can run any number of services, and each service is built in a way that ensures that the service can exchange information with any other service in the network without human interaction and without the need to make changes to the underlying program itself.

Q Define CMP bean?
Ans: A CMP bean is an entity bean whose state is synchronized with the database automatically. In other words, the bean developer doesn't need to write any explicit database calls into the bean code; the container will automatically synchronize the persistent fields with the database as dictated by the deployer at deployment time.
 
Q For what purpose application variables are used?
Ans: Application variables are the variables which remain common for the whole application. Their value can be used across the whole application… And they die only when the application stops or probably when they are killed forcibly. The ideal example for these kinds of variables is site counter. We can find out how many people accessed a particular site since the time it went live via application variables and incrementing the same on ever session start.


Q Write the names of all important components of EJB?
Ans: Name of important components of EJB.
  • EJB server(s)
  • EJB container(s)
  • Enterprise Beans
  • EJB clients
  • Other auxiliary systems (e.g. Java Naming and Directory Interface (JNDI) server, Java Transaction Service (JTS) ).

Q Differentiate between XSL and CSS?
Ans: XSL stands for Extensible Style sheet Language. The World Wide Web Consortium (W3C) started to develop XSL because there was a need for an XML-based Style sheet Language. XSL uses XML syntax, i.e., XSL is an XML vocabulary. Unlike CSS, XSL rules do not just apply styles to elements. XSL is a language for transforming an input document to an output document.
XSL = Style Sheets for XML
XSL originally consisted of three parts:
  • XSLT - a language for transforming XML documents
  • XPath - a language for navigating in XML documents
  • XSL-FO - a language for formatting XML documents
CSS stands for Cascading Style Sheets. CSS defines how HTML elements are to be displayed. CSS rules apply style only to html elements. CSS = Style Sheets for HTML.

Q What is RMI? Explain the purpose of its each component with the help of example.
Ans: The RMI (Remote Method Invocation) is an API that provides a mechanism to create distributed application in java. The RMI allows an object to invoke methods on an object running in another JVM. The RMI  provides remote communication between the applications using two objects stub and skeleton.
(1) RMI Server:
RMI Server contains objects whose methods are to be called remotely. It creates remote objects and applies the reference to these objects in the Registry, after that the Registry registers these objects who are going to be called by client remotely.
(2) RMI Client:
The RMI Client gets the reference of one or more remote objects from Registry with the help of object name. Now, it can be invokes the methods on the remote object to access the services of the objects as per the requirement of logic in RMI application. Once the client gets the reference of remote object, the methods in the remote object are invoked just like as the methods of a local object.
(3) RMI Registry:
In the Server side the reference of the object (which is invoked remotely) is applied and after that this reference is set in the RMI registry. When  the Client call the method on this object, it’s not directly call but it call by the reference which is already set in the Registry so first get the object from this reference which is available at RMI Registry then after calls the methods as per the requirement of logic in RMI application.

Q What do you mean by CORBA? Explain its life cycle by giving the name and purpose of each function that it is called in it.
Ans: The Common Object Request Broker Architecture (CORBA) is a standard defined by the Object Management Group (OMG) designed to facilitate the communication of systems that are deployed on diverse platforms. CORBA enables collaboration between systems on different operating systems, programming languages, and computing hardware. CORBA has many of the same design goals as object-oriented programming: encapsulation and reuse. CORBA uses an object-oriented model although the systems that utilize CORBA do not have to be object-oriented. CORBA is an example of the distributed object paradigm.
Life Cycle Service defines services and conventions for creating, deleting, copying and moving objects. Because CORBA-based environments support distributed objects, the Life Cycle Service defines conventions that allow clients to perform life cycle operations on objects in different locations.
Creation:
A client that wishes to create an object issues a create request on an object supporting the LifeCycleObject interface. The object receiving the request is called the target.
Deletion:
A client that wishes to delete an object, issues a remove request on an object supporting the LifeCycleObject interface. The object receiving the request is called the target.
Move or copy:
A client that wishes to move or copy an object, issues a move/copy request on an object supporting the LifeCycleObject interface. The object receiving the request is called the target.

Q What do you mean by Java Mail API? What advantages are provided by this component in this website development over existing ones?
Ans: The JavaMail API provides a platform-independent and protocol-independent framework to build mail and messaging applications. The JavaMail API provides a set of abstract classes defining objects that comprise a mail system. It is an optional package (standard extension) for reading, composing, and sending electronic messages.
JavaMail provides elements that are used to construct an interface to a messaging system, including system
components and interfaces. While this specification does not define any specific implementation, JavaMail
does include several classes that implement RFC822 and MIME Internet messaging standards. These classes are delivered as part of the JavaMail class package.

Potential advantages include - Java mail is used to create personal mail filter, simple mailing lists and personal mail applications. Java mail also includes the capabilities to add the emailing process to an enterprise application or even to create a full-fledged e-mail client. Many companies in the industry have written new e-mail clients using Java Mail.

Written By: Asad Hussain


4 Comments

Post a Comment

Previous Post Next Post