Data Warehousing (1107) Databases (3004) JAVA Related 2673) MainFrames (975) Microsoft Related (2296) Networking (553)
Operating Systems (919) Programming (3254) SAP (2318) Testing FAQS (1674) Testing Material (252) Web Related (994)

what is '1000 projects'?

'fullinterview.com' is a educational content website dedicated to finding and realizing final year projects for btech, be, mtech, mca students, here you can search, find your projects and get guidance from experts the below are the different technological projects.
visual Studio projects .net projects, asp projects, c & ds projects, c++ projects (all), cold fusion projects, delphi projects, java projects, perl projects, php projects, sql projects, vc++ projects, visual basic projects.

how it works?

well, everything on this site is submitted by the student and professional community. after you submit your project, it is being verified and approved by our administrator. after approval, other people can read/discuss it, save to favorites.

more number of projects?

here you can find morethan 1000 projects on different technologies, if u want to get more projects please visit our sister sites www.fullinterview.com & Chetanasprojects.com


Category Articles
Is it legal to have static initializer blocks in EJB?
Added on Sat, Dec 26, 2009
Although technically it is legal, static initializer blocks are used to execute some piece of code before executing any constructor or method while instantiating a class. Static initializer blocks are also typically used to initialize static fields -... Read More
What is the difference between JNDI context, Initial context, session context and ejb context?
Added on Sat, Dec 26, 2009
JNDI Context Provides a mechanism to lookup resources on the network Initial Context constructor provides the initial context. Session Context has all the information a session bean would require from the container Entity Context has all the... Read More
EJB Interview Questions and Answers,EJB Faqs,EJB Interview FAQs and EJB Books,EJB interview ebook,EJB technical interview questions,EJB Quiz,EJB Interview Paper,EJB Placement Papers,EJBInterview Procedure,EJB Aptitude Questions,EJB Technical Question
Added on Sat, Dec 26, 2009
SB2's transaction attribute should be either "Requires New" or "Not Supported". SB1 can be run in any transaction. It doesn't matter. Read More
What is the difference between sessioncontext and entitycontext?
Added on Sat, Dec 26, 2009
Since EnterpriseBeans live in a managed container,the container is free to call your EJB components methods at its leisure. The container houses the information like current status of bean,security credentials of the user currently accessing the... Read More
What is Instance pooling?
Added on Sat, Dec 26, 2009
For SingleThreadModel servlets, containers may follow one of the following approaches to ensure that each sevlet instance is invoked in a separate thread: Instance Pooling : in this approach, the container maintains a pool of servlet instances.... Read More
What is the difference between JNDI context, Initial context, session context and ejb context
Added on Sat, Dec 26, 2009
JNDI Context Provides a mechanism to lookup resources on the network Initial Context constructor provides the initial context. Session Context has all the information a session bean would require from the container Entity Context has all the... Read More
When you will chose CMP and BMP?
Added on Sat, Dec 26, 2009
BMP - Bean managed persistence - Developer has to write persistence code for ejbLoad(),ejbStore() for entity beans - Should follow this approach only when its bare necessity to write your own persistence logic.Usually container managed... Read More
What is the difference between EAR, JAR and WAR file
Added on Sat, Dec 26, 2009
In J2EE application modules are packaged as EAR, JAR and WAR based on their functionality JAR: EJB modules which contains enterprise java beans class files and EJB deployment descriptor are packed as JAR files with .jar extenstion WAR Web... Read More
What is business delicate Use and session faced use?
Added on Sat, Dec 26, 2009
Business delicate is a small java bean object which is used for make loose coupling b/w controller to model.Session facade design pattern in which palce session bean b/w model to contriller.why beacuse sesssion bean process the business logic . if... Read More
What is the difference between ejbStore() and ejbLoad()
Added on Sat, Dec 26, 2009
When the EJB container needs to synchronize the instance variables of an entity bean with the corresponding values stored in a database, it invokes the ejbLoad and ejbStore methods. The ejbLoad method refreshes the instance variables from the... Read More
What is meant by Serialization and Externalization
Added on Sat, Dec 26, 2009
Question : What is meant by Serialization and Externalization? Serialization is a Marker interface,so what is the use of WriteObject() anf ReadObject(), Where it is actually used? Give me some real time examples         ... Read More
Can a Session Bean be defined without ejbCreate() method?
Added on Sat, Dec 26, 2009
The ejbCreate() methods is part of the bean's lifecycle, so, the compiler will not return an error because there is no ejbCreate() method. However, the J2EE spec is explicit: ? the home interface of a Stateless Session Bean must have a... Read More
What is the difference between CMP and BMP? s
Added on Sat, Dec 26, 2009
CMP -- Container-managed persistence beans are the simplest for the bean developer to create and the most difficult for the EJB server to support. This is because all the logic for synchronizing the bean's state with the database is handled... Read More
What is EJB architecture(components)?
Added on Sat, Dec 26, 2009
Enterprise beans An enterprise bean is a non-visual component of a distributed, transaction-oriented enterprise application. Enterprise beans are typically deployed in EJB containers and run on EJB servers. There are three types of enterprise... Read More
Can I develop an Entity Bean without implementing the create() method in the home interface?
Added on Sat, Dec 26, 2009
As per the specifications, there can be 'ZERO' or 'MORE' create() methods defined in an Entity Bean. In cases where create() method is not provided, the only way to access the bean is by knowing its primary key, and by acquiring a... Read More
How is Stateful Session bean maintain their states with client?
Added on Sat, Dec 26, 2009
When a client refers to a Stateful Session object reference, all calls are directed to the same object on the EJB container. The container does not require client identity information or any cookie object to use the correct object. This means that... Read More
What are advantages and disadvantages of CMP and BMP
Added on Sat, Dec 26, 2009
CMP:: Advantages: 1)Easy to develop and maintain. 2)Relationships can be maintained between different entities. 3) Optimization of SQL code will be done. 4)Larger and more performance applications can be done. Disadvantages: 1... Read More
What is the difference between optimistic locking and pessim
Added on Sat, Dec 26, 2009
Optimistic locking : One is working on the data with the assumption that it has not been manipulated by any body and will only get to know about the data changes when trying to commit the transaction.if the data is unaltered for the time frame he is... Read More
What is the life cycle of MDB?
Added on Sat, Dec 26, 2009
The lifetime of an MDB instance is controlled by the container. Only two states exist: Does not exist and Ready , as illustrated in the following figure: The life of an MDB instance starts when the container invokes newInstance() on the MDB... Read More
What is the difference between Stateful session bean and Stateless session bean?
Added on Sat, Dec 26, 2009
1) A stateful session beans can keep data between client accesses. wheras a stateless session bean cannot. 2) A stateful seesion bean contain the state of client after seesion is expired. whereas a stateless bwan cnanot. 3) A stateful session... Read More
What is the difference b/w sendRedirect() and <jsp: forward>?
Added on Sat, Dec 26, 2009
we can use when we want to forward a page with in the context. using sendRedirect() method we can forward to jsp which is in another context also. And in there will be only one request procesed between client and server whereas in sendRedirect()... Read More
Can I invoke Runtime.gc() in an EJB?
Added on Sat, Dec 26, 2009
We can call Runtime.gc() explicitly as you (all) described. But some time May be usefull . Otherwise No Use . When ?. Note that If we call garbage collection explicitly this WILL NOT GARBAGE COLLECT ANY ONE EJB OBJECT or TYPE of EJB bean object These... Read More
Which are features in EJB 2.0 ? and which are features in EJB 3.0?
Added on Sat, Dec 26, 2009
POJO - Plain old Java Objects.. Look for article on EJB3.0 on javaworld 1) EJB2.0 has Deployment descriptors but in EJB3.0 has no Deployment Descriptors. 2) EJB2.0 we have to write Home and Remote Interfaces But in EJB3.0 No need to... Read More
Why does EJB needs two interfaces(Home and Remote Interface)
Added on Sat, Dec 26, 2009
There is a pure division of roles between the two . Home Interface is the way to communicate with the container which is responsible for creating , locating and removing beans and Remote Interface is the link to the bean that allows acces to all... Read More
What is the difference between ejbStore() and ejbLoad()?
Added on Sat, Dec 26, 2009
ejbStore() will be called before ejbPassivate() and is used to store the object to persistent database. ejbLoad() will be called before ejbActivate() and is used to retrieve the object from persistence datastore. Submitted by Balasubramanyam... Read More
What are the services provided by container?
Added on Sat, Dec 26, 2009
Container services are totally depends upon the "vendor implementation". But more or less most of the vendors suppots the basic services like, LifeCycle Management - It is Automatic... Session Management - it is used by Developer coded... Read More
Why an onMessage call in Message-driven bean is always a seperate transaction
Added on Sat, Dec 26, 2009
EJB 2.0 specification: "An onMessage call is always a separate transaction, because there is never a transaction in progress when the method is called." When a message arrives, it is passed to the Message Driven Bean through the onMessage() method,... Read More
Why are ejbActivate() and ejb Passivate() included for stateless session bean even though they are never required as it is nonconversational bean?
Added on Sat, Dec 26, 2009
To have a consistent interface, so that there is no different interface that you need to implement for Stateful Session Bean and Stateless Session Bean. Both Stateless and Stateful Session Bean implement javax.ejb.SessionBean and this would not be... Read More
What is the difference between EAR, JAR and WAR file?
Added on Sat, Dec 26, 2009
J2EE defines three types of archives: 1. Java Archives (JAR)—A JAR file encapsulates one or more Java classes, a manifest, and a descriptor. JAR files are the lowest level of archive. JAR files are used in J2EE for packaging EJBs and client... Read More
What is re-entrant. Is session beans reentrant. Is entity beans reentrant
Added on Sat, Dec 26, 2009
Re-entrant means where Bean A calls methods of Bean B and then Bean B turns around and calls methods of Bean A. The above all within a single thread of control. This is also called as loopback. Entity beans are the only one bean that is reentrant.... Read More
Is there a way to get the original exception object from inside a nested or wrapped Exception (for example an EJBException or RemoteException
Added on Sat, Dec 26, 2009
Yes. The way to get, depends on the Exception, since there are no standards. Some examples: * When we have an javax. ejb.EJBException, we can use the getCausedByException() that returns a java. lang.Exception. * A java.rmi.RemoteException there is... Read More
If my session bean with single method insert record into 2 entity beans, how can I know that the process is done in same transaction (the attributes for these beans are Required)
Added on Sat, Dec 26, 2009
It depends on the transaction attribute of the session bean also. You have to set the transaction attribute of the session bean either to Required or RequiresNew Read More
How Non Java Client access EJB.
Added on Sat, Dec 26, 2009
You can use RMI/IIOP skeletons and use CORBA from client side. Read More
What is the lifecycle of Entity Bean?
Added on Sat, Dec 26, 2009
The following steps describe the life cycle of an entity bean instance An entity bean instances life starts when the container creates the instance using newInstance and then initialises it using setEntityContext. The instance enters the pool... Read More
How to insert new row and link like Edit and Delete
Added on Sat, Dec 26, 2009
You can use two methods like insertRow() and deleteRow() of ejbCreate() for insert and delete the data from the data base in entity Bean. Read More
How to implement an entity bean which the PrimaryKey is an autonumeric?
Added on Sat, Dec 26, 2009
The EJB 2 Spec (10.8.3 - Special case: Unknown primary key class) says that in cases where the PrimaryKeys are generated automatically by the underlying database, the bean provider must declare the findByPrimaryKey method to return java.lang.Object... Read More
Does Stateful Session bean support instance pooling?
Added on Sat, Dec 26, 2009
Stateful Session Bean conceptually doesn't have instance pooling. Read More
What is the difference between ejbCreate() and ejbPostCreate
Added on Sat, Dec 26, 2009
The purpose of ejbPostCreate() is to perform clean-up database operations after SQL INSERTs (which occur when ejbCreate() is called) when working with CMP entity beans. ejbCreate() is called before database INSERT operations. You need to use... Read More
Can i map more than one table in a CMP?
Added on Sat, Dec 26, 2009
No, you cannot map more than one table to a single CMP Entity Bean. CMP has been, in fact, designed to map a single table. Read More
Is Decorator an EJB design pattern?
Added on Sat, Dec 26, 2009
No. Decorator design pattern, is the one which exhibits very low level runtime polymorphism, for the specific and single object (Instance of the class), but not for atleast for a class. It is the stuff to add specific functionality to a single &... Read More
Can I develop an Entity Bean without implementing the create() method in the home interface
Added on Sat, Dec 26, 2009
Yes, you can create entity bean without impelementing the create() method. The ejbs will be instantiated by findByPK or any finder methods Read More
How many EJB Objects are created for a Bean?
Added on Sat, Dec 26, 2009
For a Session bean - one EJB object for one bean instance. For entity bean it depends , if 2 users are accessing one row at time then one EJB object is used for both the beans other wise for each bean one EJB object. Read More
What is the difference between CMP 1.1 and CMP 2.0?
Added on Sat, Dec 26, 2009
If you have the better answer, then send it to us. We will display your answer after the approval. Read More
What is Message Driven Bean?
Added on Sat, Dec 26, 2009
An MDB is essentially a message consumer that can listen to a message destination or a message endpoint and gets activated when a message arrives. By design, MDBs are anonymous in nature and hence cannot be directly invoked by a client. The only way... Read More
What is lazy loading?
Added on Sat, Dec 26, 2009
Lazy loading means not creating an object until the first time it is accessed. Lazy loading typically looks like this: public class Example { private Vector data = null; public Vector getData() { if (this.data == null) { this.data = new Vector(); /... Read More
What is ACID?
Added on Sat, Dec 26, 2009
Database transactions must be Atomic, Consistent, Isolated, and Durable (ACID). These ACID properties keep the database in a stable state. The following list details these ACID properties: * Atomicity: All changes are committed or all changes are... Read More
What is the difference between stateless session and state full session bean? give example?
Added on Sat, Dec 26, 2009
Stateless session bean does not maintain any client conversational state between bean method calls while state full session bean maintains conversational state. Read More
What is re-entrant. Is session beans reentrant. Is entity beans reentrant?
Added on Sat, Dec 26, 2009
If we define the entity bean as being reentrant, multiple clients can connect to the Entity bean & execute methods within the entity bean concurrently. Container takes care of synchronization. If we define the entity bean as non-reentrant and... Read More
What are the various isolation levels in a transaction and differences between them?
Added on Sat, Dec 26, 2009
There are three isolation levels in Transaction. They are 1. Dirty reads 2.Non repeatable reads 3. Phantom reads. Dirrty Reads If transaction A updates a record in database followed by the transaction B reading the record then the transaction A... Read More
Does stateless Session bean create() method contain any parameters?
Added on Sat, Dec 26, 2009
Stateless SessionBean create() method doesnot contain any parameters and the syntax is as follows: public interface XSessionEJBHome extends EJBHome { XSessionEJB create() throws RemoteException, CreateException; } Read More
Is it possible to share an HttpSession between a JSP and EJB. What happens when I change a value in the HttpSession from inside an EJB?
Added on Sat, Dec 26, 2009
You can pass the HttpSession as parameter to an EJB method, only if all objects in session are serializable.This has to be consider as “passed-by-value”, that means that it’s read-only in the EJB. If anything is altered from inside the EJB... Read More
What are webservices?
Added on Sat, Dec 26, 2009
A web service is a collection of protocols and standards used for exchanging data between applications or systems. Software applications written in various programming languages and running on various platforms can use web services to exchange data... Read More
What is the difference between local interface and remote interface
Added on Sat, Dec 26, 2009
We can describe the following common rules for choosing whether to use remote client view or local client view: When you will potentially use a distributed environment (if your enterprise bean should be independent of its deployment place), you... Read More
What is the difference between JavaBean and EJB?
Added on Sat, Dec 26, 2009
A Java Bean is a software component written in the Java programming language that conforms to the JavaBeans component specification. The JavaBeans APIs became part of the "core" Java APIs as of the 1.1 release of the JDK. The JavaBeans... Read More
Write a basic structure of an EJB session bean class
Added on Sat, Dec 26, 2009
//import statements public class SampleSessionBean implements SessionBean { public SampleSessionBean() { super(); // TODO } public void setSessionContext(SessionContext ctx) throws EJBException, RemoteException { // TODO } public... Read More
What is CMR?
Added on Sat, Dec 26, 2009
CMR is an acronym for Container Managed Relation-ships. CMR, represented by the cmr fields in the deployment descriptor, which represents the relationship exists between different entities (entity beans), which are in turn exhibiting the database... Read More
How to transfer a bulk amount of tabular data from a jsp page to an ejb thru a servlet and viceversa
Added on Sat, Dec 26, 2009
First of all, I don't quite get what you mean by tabular data.Please explain in detail. Anyway, if you want to send huge amount of data from the jsp to an ejb via servlet what you can do is write a data-object class where you declare a... Read More
How will you propagate exception thrown inside session bean to JSP or Servlet client
Added on Sat, Dec 26, 2009
2 Types of exceptions can occur 1.System Exception - We can define some error codes the in the property file and show it to the JSP 2.Application Exception.. - We can customise the exception and show the appropriate error Read More
What is the lifecycle of Entity Bean
Added on Sat, Dec 26, 2009
The following steps describe the life cycle of an entity bean instance An entity bean instances life starts when the container creates the instance using newInstance and then initialises it using setEntityContext. The instance enters the pool... Read More
If session has thrown ApplicaitonException would you use EJBContext.setRollBackOnly method?
Added on Sat, Dec 26, 2009
According to the EJB specification, when the ApplicationException is thrown, the EJBContext.setRollBackOnly method is not called. Typically, an enterprise bean marks a transaction for rollback to protect data integrity before throwing an... Read More
How will you propagate exception thrown inside session bean to JSP or Servlet client?
Added on Sat, Dec 26, 2009
2 types of exceptions can occur 1.System Exception - We can define some error codes the in the property file and show it to the JSP 2.Application Exception.. - We can customise the exception and show the appropriate error Read More
Can I use session beans and hibernate (instead of entity beans) for persitance?
Added on Sat, Dec 26, 2009
Yes, we can. It's same as BMP. Read More
What is the difference between activation and passivation?
Added on Sat, Dec 26, 2009
This would be the difference between Activation and Passivation: While the bean is in the ready stage, the EJB container may decide to deactivate, or passivate, the bean by moving it from memory to secondary storage. (Typically, the EJB container... Read More
What is the difference between EJB and RMI
Added on Sat, Dec 26, 2009
Both of them are java solution for distributed computing. RMI offers remote access to an object running in another JVM and no other services. But EJB offers far more services than RMI apart from remote method calling. EJB leverages... Read More
What is ejbdoc?
Added on Sat, Dec 26, 2009
Question : What is ejbdoc? difference between connector, server,container? Answers: The thing is that a server can contain n number of containers.Whenever a client initiates for a request, it ll go to the server first , and then... Read More
How do you check whether the session is active in Stateful session bean
Added on Sat, Dec 26, 2009
In Stateful session bean session is not itself a separate entity. it is contained in the bean it self. So in order to check tht we need the check whether the Stateful session bean is present or not which is done by just invoking the home interface... Read More
What are the various isolation levels in a transaction and differences between them
Added on Sat, Dec 26, 2009
There are three isolation levels in Transaction. They are 1. Dirty reads 2.Non repeatable reads 3. Phantom reads. Dirrty Reads If transaction A updates a record in database followed by the transaction B reading the record then the transaction A... Read More
What is the difference between ejbCreate() and ejbPostCreate()
Added on Sat, Dec 26, 2009
Session and Message Driven Bean will have only ejbCreate() method and no ejbPostCreate() method. Entity bean will have both ejbCreate() and ejbPostCreate() methods. The ejbPostCreate method returns void, and it has the same input parameters as the... Read More
What is CMR
Added on Sat, Dec 26, 2009
CMR - Container Managed Relationships allows the developer to declare various types of relationships between the entity beans Read More
What is local interface. How values will be passed?
Added on Sat, Dec 26, 2009
An EJB can use local client view only if it is really guaranteed that other enterprise beans or clients will only address the bean within a single JVM. With local client view, you can do pass-by-reference, which means your bean, as well as the... Read More
What is difference between EJB 1.1 and EJB 2.0?
Added on Sat, Dec 26, 2009
The bulk of the changes in EJB 2.0 are found in the definition of a new CMP component model. It's radically different from the old CMP model because it introduces an entirely new participant, the persistence manager, and a completely new way of... Read More
What are the call back methods in Entity bean?
Added on Sat, Dec 26, 2009
Callback methods allows the container to notify the bean of events in its life cycle. The callback methods are defined in the javax. ejb.EntityBean interface. Read More
What is return type of create method of an entity bean
Added on Sat, Dec 26, 2009
For CMP Bean, it return NULL and BMP Entity bean, it returns Primary Key Class Object. Read More
Just by seeing the signature of the bean how can you specify whether it is a Stateful or Stateless Session Bean?
Added on Sat, Dec 26, 2009
The create method in a stateless session bean cannot have arguments, and can only have a single method called create(). While create in Stateful bean can have arguments and could be any method starting with create string eg. create<method>(arg1... Read More
What is the life cycle of MDB
Added on Sat, Dec 26, 2009
The lifetime of an MDB instance is controlled by the container. Only two states exist: Does not exist and Ready , as illustrated in the following figure: The life of an MDB instance starts when the container invokes newInstance() on the... Read More
What is deployment descriptor?
Added on Sat, Dec 26, 2009
Deployment descriptor is a XML file.which is used to locate the web applicatio n by container.it includes the details of respective bean. Submitted by Devarathnam.C (devarathnam@yahoo.co.in) Read More
What is the difference between find and select methods in EJB?
Added on Sat, Dec 26, 2009
# A select method can return a persistent field (or a collection thereof) of a related entity bean. A finder method can return only a local or remote interface (or a collection of interfaces). # Because it is not exposed in any of the local or... Read More
Why CMP beans are abstract classes?
Added on Sat, Dec 26, 2009
We have to provide abstract data to object mapping that maps the fields in our bean to a batabase, and abstract methods methods that corelate these fields. Read More
What is the difference between normal Java object and EJB?
Added on Sat, Dec 26, 2009
Java Object: is a reusable component. EJB : is a distributed component used to develop business applications. Container provides runtime environment for EJBs. Read More
What is the difference between sessioncontext and entitycontext
Added on Sat, Dec 26, 2009
Entity beans use a subclass of EJBContext called EntityContext. Session beans use a subclass called SessionContext Read More
What is lazy loading
Added on Sat, Dec 26, 2009
Lazy loading is a characteristic of an application when the actual loading and instantiation of a class is delayed until the point just before the instance is actually used. The goal is to only dedicate memory resources when necessary by only loading... Read More
Is stateless Sessiob bean create() method contains any parameters
Added on Sat, Dec 26, 2009
No. This method must not contain any input parameters and cannot be overloaded as well. Read More
What are the various transaction attributes and differences between them
Added on Sat, Dec 26, 2009
There are six transaction attributes that are supported in EJB. 1. NotSupported 2. Supports 3. Required 4. RequiresNew 5. Mandatory 6. Never Read More
What is deployment descriptor
Added on Sat, Dec 26, 2009
Deployment Descriptor is a XML document with .xml extension. It basically describes the deployment settings of an application or module or the component. At runtime J2EE server reads the deployment descriptor and understands it and then acts upon... Read More
What is Message Driven Bean
Added on Sat, Dec 26, 2009
Message Driven Bean (MDB) is an enterprise bean which runs inside the EJB container and it acts as Listener for the JMS asynchronous message . It does not have Home and Remote interface as Session or Entity bean. It is called by container when... Read More
What is the difference between activation and passivation
Added on Sat, Dec 26, 2009
Activation and Passivation is appilicable for only Stateful session bean and Entity bean. When Bean instance is not used for a while by client then EJB Container removes it from memory and puts it in secondary storage (often disk) so that... Read More
What is EJB architecture(components)
Added on Sat, Dec 26, 2009
EJB Architecture consists of : a) EJB Server b) EJB containers that run on these servers, c) Home Objects, Remote EJB Objects and Enterprise Beans that run within these containers, d) EJB Clients and e) Auxillary systems like JNDI (Java... Read More
How can i retrieve from inside my Bean(Stateless session and Entity CMP) the user name which i am serving (the user name of user just logged in my web application)?
Added on Sat, Dec 26, 2009
If you have the better answer, then send it to us. We will display your answer after the approval Read More
With EJB 1.1 specs, why is unsetSessionContext() not provided in Session Beans, like unsetEntityContext() in Entity Beans?
Added on Sat, Dec 26, 2009
ejbRemove() is used in session bean to accomplish the same.So there wouldn't be unsetsessioncontext() in session bean Read More
What is abstract schema?
Added on Sat, Dec 26, 2009
Abstract schema is part of an entity bean's deployment descriptor which defines the bean's persistent fields and their relationship. Abstract schema is specifed for entity beans with container managed persistence. We specify the name of the... Read More
What is clustering. What are the different algorithms used for clustering?
Added on Sat, Dec 26, 2009
Clustering is the use of multiple computers and storage devices to create what seems to be a single system. Clustering is often used to increase a system's availability and for load balancing on highly-trafficked Web sites. Clustering... Read More
Is it possible to invoke multiple Session beans from one Session bean using Reflection?
Added on Sat, Dec 26, 2009
If you have the better answer, then send it to us. We will display your answer after the approval. Read More
What are simple rules that a Primary key class has to follow?
Added on Sat, Dec 26, 2009
Every entity bean has a primary key that represents a unique identity. This primary key must be represented by a primary key class, which the bean developer defines or specifies. This class contains theinformation necessary to find that entity in the... Read More
If i throw a custom ApplicationException from a business method in Entity bean which is participating in a transaction, would the transaction be rolled back by container. Does container rolls back transaction only in case of SystemExceptions
Added on Sat, Dec 26, 2009
EJB Transaction is automatically rolled back only when a SystemException (or a subtype of it) is thrown. Your ApplicationExceptions can extend from javax.ejb.EJBException, which is a sub class of RuntimeException. When a EJBException is... Read More
. Why is there no polymorphic-type response from a create() or find() method?
Added on Sat, Dec 26, 2009
A. The EJB Specification prohibits this behavior, and the weblogic.appc compiler checks for this behavior and prohibits any polymorphic type of response from a create() or find() method. The reason the create() and find() methods are not... Read More
Must EJBs be homogeneously deployed across a cluster? Why?
Added on Sat, Dec 26, 2009
A. Yes. In WebLogic Server 6.0 and later, EJBs must be homogeneously deployed across a cluster for the following reasons: * To keep clustering EJBs simple * To improve performance by avoiding cross-server calls. If EJBs are not deployed on all... Read More
What is the free pool?
Added on Sat, Dec 26, 2009
 The free pool is a data structure the EJB container uses to cache anonymous instances of a given bean type. The free pool improves performance by reusing objects and skipping container callbacks when it can. Read More
Where can I get a copy of the EJB specification?
Added on Sat, Dec 26, 2009
A. You can download it from Sun's EJB site. Read More
What is handle in EJB?
Added on Sat, Dec 26, 2009
A handle is an abstraction of a network reference to an EJB object. A handle is intended to be used as a "robust" persistent reference to an EJB object. Read More
Without home and remote interfaces cant we implement ejb?
Added on Sat, Dec 26, 2009
Was just reading about EJB 3.0. I suppose with EJB 3.0, Home interface is absolutely gone and implementing Business Interface is not mandatory. All enterprise beans in EJB 3.0 are just POJO (Plain Old Java Object) with appropriate annotations. Read More
What is the need of two Objects i.e EJBHome object and EJBobject to access a bean??
Added on Sat, Dec 26, 2009
EJBHomeObject is an interface, which is used as a parent interface for home interface in EJB. EJBObject is an interface and used as a parent interface in Remote methods. Read More
Which versions of the EJB specification are supported by WebLogic Server?
Added on Sat, Dec 26, 2009
The following table summarizeds EJB specification support by WebLogic Server version: WebLogic Server Version EJB Version 4.5.x 1.0 5.1 1.1 6.0 1.1 and 2.0 (PFDI) 6.01 1.1 and 2.0 7.0 1.1 and 2.0 8.1 1.1 and 2.0 Read More
Why we are not keeping Ejb class file in war
Added on Sat, Dec 26, 2009
EJB runs on the application server, and war runs on your web server, that the main reason we do not put ejb classes in war file. Read More
How should I set max-beans-in-free-pool for stateless beans?
Added on Sat, Dec 26, 2009
A. This is explained in Pooling for Stateless Session EJBs in Programming WebLogic Enterprise JavaBeans. Read More
How should I set initial-beans-in-free-pool for stateless beans?
Added on Sat, Dec 26, 2009
 This is explained in Pooling for Stateless Session EJBs in Programming WebLogic Enterprise JavaBeans. Read More
What is the difference between HTTPSession and Stateful Session Bean?
Added on Sat, Dec 26, 2009
From a logical point of view, a Servlet/JSP session is similar to an EJB session. Using a session, in fact, a client can connect to a server and maintain his state. But, is important to understand, that the session is maintained in different ways... Read More
When are stateless EJBs passivated?
Added on Sat, Dec 26, 2009
. Stateless ejbs are never passivated. Since stateless ejbs do not have state, there is no need to passivate them. They are put back into the free pool after each method call so they will be available to service other requests. Read More
Can I call remove() on a stateless session bean?
Added on Sat, Dec 26, 2009
A. Yes. Currently, calling remove() on a stateless session bean is a noop. Read More
When are ejbCreate and ejbRemove called on stateless EJBs?
Added on Sat, Dec 26, 2009
 When the stateless beans are created and removed by the EJB container. Note that this does not correspond to calls to create and remove on the stateless home. Depending on your initial-beans-in-free-pool setting, beans may be created by the... Read More
What is EJB Query Language?
Added on Sat, Dec 26, 2009
EJB QL is a query language provided for navigation across a network of enterprise beans and dependent objects defined by means of container managed persistence EJB QL is introduced in the EJB 2.0 specification. The EJB QL query language define finder... Read More
Can you explain passivation / activation?
Added on Sat, Dec 26, 2009
Passivation and activation are a standard part of a stateful session bean's lifecycle. For details, see Stateful Session EJB Life Cycle in Programming WebLogic Enterprise JavaBeans. Read More
Why did I get a LockTimedOutException?
Added on Sat, Dec 26, 2009
When you get a LockTimedOutException while invoking a stateful session EJB, one of two things has occurred: * You have <allow-concurrent-calls> set to true in your weblogic-ejb-jar. xml descriptor and your call timed out while waiting to be... Read More
What is the difference between the NRU and LRU cache?
Added on Sat, Dec 26, 2009
. NRU cache works by avoiding passivation as much as possible. Stateful session instances are only passivated when there is memory pressure (your # of beans in the cache approaches the max-beans-in-cache size). This is the 'NRU' option in... Read More
When should I use a Stateful session bean and when should I use a servlet session?
Added on Sat, Dec 26, 2009
A. The answer to this question is very application-specific and there are situations in which either approach will work. A stateful session bean provides declaritive transaction and security checking as well as failover to a secondary in a cluster. Read More
What are advantages and disadvantages of CMP and BMP?
Added on Sat, Dec 26, 2009
CMP:: Advantages: 1)Easy to develop and maintain. 2)Relationships can be maintained between different entities. 3) Optimization of SQL code will be done. 4)Larger and more performance applications can be done. Disadvantages: 1... Read More
How big should I make the cache for a stateful session bean?
Added on Sat, Dec 26, 2009
 The cache for a stateful session bean should usually be equal to the maximum number of concurrent clients of the bean. This is generally a much larger value than the number of execute threads in the server, therefore, stateful session beans... Read More
Can an entity bean be a listener for JMS messages?
Added on Sat, Dec 26, 2009
No. Message driven beans should be used to consume JMS messages. Read More
What's the purpose of the delay-database-insert-until deployment descriptor element?
Added on Sat, Dec 26, 2009
. This setting allows you to specify at what point the database insert occurs when creating a CMP bean. Non-null foreign key constaints in your database can make creating CMP beans with relationships tricky. We offer this setting to give developers... Read More
What is Entity Bean. What are the various types of Entity Bean?
Added on Sat, Dec 26, 2009
Entity bean represents the real data which is stored in the persistent storage like Database or file system. For example, There is a table in Database called Credit_card. This table contains credit_card_no,first_name, last_name, ssn as colums and... Read More
What is Session Bean. What are the various types of Session Bean?
Added on Sat, Dec 26, 2009
SessionBeans typically are used to represent a client they are of two typse Stateful Session Beans : they maintain conversational state between subsequest calls by a client Stateless Session Bean : consider this as a servlet equivalent in EJB... Read More
What is EJB?
Added on Sat, Dec 26, 2009
Enterprise Java Bean is a specification for server-side scalable,transactional and multi-user secure enterprise-level applications. It provides a consistant component architecture for creating distributed n-tier middleware. Read More
Why can't I call the setXXX method for a cmr-field during ejbCreate?
Added on Sat, Dec 26, 2009
 This is disallowed by the EJB 2.0 specification because the primary-key of the current bean isn't necessarily known during ejbCreate and it may be needed depending on how the relationship is mapped to the underlying DBMS. Cmr-field... Read More
How can I avoid violating NOT NULL constraints on foreign keys that are mapped to cmr-fields?
Added on Sat, Dec 26, 2009
n WLS 7.0 and later, you can set delay-database-insert-until to 'commit' and assign the cmr-field a value before the current transaction commits. You can also set delay-database-insert-until to 'ejbPostCreate' and assign the cmr... Read More
Does WebLogic support auto generating primary keys for entity beans?
Added on Sat, Dec 26, 2009
Yes, this feature was added in WLS 6.1. For more information, see the DTD comments for the <automatic-key-generation> element.http://www.bea.com/servers/wls810/dtd/weblogic- ejb-jar.dtd Read More
Which security principal does an MDB use to connect to JMS
Added on Sat, Dec 26, 2009
As of WLS 6.1 SP2, an MDB uses the same principle to connect to JMS as it does to process messages. This is either the principle that is mapped to the run-as role specified for the bean, or 'guest' if no run-as role is provided. Prior to... Read More
How should I obtain my JDBC connection so that it participates in the EJB container's transaction?
Added on Sat, Dec 26, 2009
You must get your JDBC connection from a TxDataSource or from the JTS driver. If you get a JDBC connections from a plain DataSource or directly from the JDBC driver, it will NOT participate in the EJB container transaction. TxDataSources are... Read More
My transaction aborted, but my database changes did not rollback.
Added on Sat, Dec 26, 2009
See previous question. You must obtain your JDBC connections from a TxDataSource. Read More
Given the following files, write the client codes to locate/create/invoke a
Added on Sat, Dec 26, 2009
Question : Given the following files, write the client codes to locate/create/invoke a sessionBean in order to get the company name by using getCompanyName(). File: companyHome. java companyRemote.java companyBean.java -... Read More
Explain about the concept of EJB?
Added on Sat, Dec 26, 2009
EJB is a complex subject and it requires patience to master it. This is used for Enterprise construction of applications. It is a server side component and architecture. The main role which EJB functions is, it hides the business logic of an... Read More
Name some common roles which EJB performs?
Added on Sat, Dec 26, 2009
Enterprise Java Beans is used chiefly for encapsulating the business logic of an application. It handles problems such as security, persistence and transactional integrity of applications. It solves these major three problems of developers thus... Read More
Can I map an entity bean to more than one table?
Added on Sat, Dec 26, 2009
A. In WLS 8.1 it is possible to map an entity bean to multiple tables, however, there are some restrictions. Namely, each table must contain the same primary key columns. The columns can have different names in different tables, but they must contain... Read More
When you will chose Stateful session bean and Stateless session bean?
Added on Sat, Dec 26, 2009
Stateful session beans are used when there is converstional state and when there is a need of temporary storage Stateless session bean are used when there is no conversational state and when session bean has to be used only for database access Read More
Can I use a join or intermediate table to implement a One-Many relationship?
Added on Sat, Dec 26, 2009
This is currently not supported. One-Many relationships require that the bean on the Many side of the relationship contain a foreign-key in one of its tables. Read More
What are the call back methods in Session bean?
Added on Sat, Dec 26, 2009
Session bean callback methods differ whether it is Stateless or stateful Session bean. Here they are. Stateless Session Bean 1. setSessionContext() 2. ejbCreate() 3. ejbRemove() Stateful Session Bean 1. setSessionContext() 2... Read More
What is the life cycle of Stateless session bean?
Added on Sat, Dec 26, 2009
The stateless session bean's life cycle has two states: the Does Not Exist state and the Method-Ready Pool. The Method-Ready Pool is similar to the instance pool used for entity beans. This is one of the significant life-cycle differences... Read More
Why can't I hold on to a cmr-field (Container Managed Relationship) collection and use it after the transaction commits?
Added on Sat, Dec 26, 2009
. This is prohibited by the EJB 2.0 specification. The reason for disallowing this is that the DBMS data backing a cmr-field collection can change in unpredictable ways once your transaction commits. Tracking these changes is difficult and can... Read More
Explain about POJOs which form a part of EJB?
Added on Sat, Dec 26, 2009
Plain old java objects are nothing but java objects. EJB3 has implemented POJOs. It gives a feel to the developers about the old objects and names used in programming. This makes a developer comfortable rather than to use fancy names for the same old... Read More
Explain in detail about stateless session bean?
Added on Sat, Dec 26, 2009
Concurrent access to a bean can be possible by using stateless session bean because they don?t have a state associated with them. This bean is less resource intensive due to lack of overhead which negates its functionality in calling a conversation... Read More
Explain about stateful session Beans?
Added on Sat, Dec 26, 2009
Stateful session beans have a state and they are distributed objects, because of them having a state they keep a track record of the calling program. This session should be carefully programmed because it may tell you about the status and presence of... Read More
Explain the difference between Container managed persistence and Bean managed persistence?
Added on Sat, Dec 26, 2009
If the persistent state was managed by a container present in a bean then it is called as Container managed persistence. If the own state was managed by a bean then it is called as Bean managed persistence. The chief difference lies between the... Read More
Explain about Entity bean and its features?
Added on Sat, Dec 26, 2009
Entity Bean is a sever side component belonging to J2EE. Persistence can be managed either by Container or a Bean; these functions are present in Entity bean. Mostly it can be identified or sorted by a primary key. Remote references can survive a... Read More
Explain about message driven beans?
Added on Sat, Dec 26, 2009
Message driven beans are primarily used to handle asynchronous JMS messages which require integration of EJB and Java messaging services. These beans behave asynchronously. Handling of an operation which does not require instant reply or response... Read More
Explain about the process of execution of EJBs?
Added on Sat, Dec 26, 2009
EJB or Enterprise Java beans are always present in EJB container which is in turn present in an application server. Interaction of the EJB with the container and client code with container or EJB depends upon the specification. They are always... Read More
Explain about instance methods?
Added on Sat, Dec 26, 2009
Instance methods are placed in component interface and they are attached to specific instance. There nature of being Java instances makes EJB to generate classes for these instances which act as a proxy. Code from the client end is required to... Read More
Explain about class methods?
Added on Sat, Dec 26, 2009
Home interface declares class methods. They are not used to find an existing entity and neither are they tied to a specific instance. These are not used for creating an EJB instance. Read More
Explain about the transactions feature present in EJB?
Added on Sat, Dec 26, 2009
ACID transactions and bean managed transactions should be supported by EJB container. Transactions which are container managed require declarative syntax which will be used in the deployment descriptor. Read More
Explain about deployment descriptor?
Added on Sat, Dec 26, 2009
As the name indicated deployment descriptor refers to a configuration file which is deployed to a container. It is primarily used for deploying a module or application. Configuration requirements are also stated in a deployment descriptor and these... Read More
Explain about the naming and directory services present in EJB?
Added on Sat, Dec 26, 2009
Home interface implementation object can be found using JNDI and this feature is available for clients using EJB. The same Home interface can be found by using CORBA name service. Creation and deletion of EJBs can be done from home interface and... Read More
Explain about J2EE application and its components?
Added on Sat, Dec 26, 2009
Two components are present in a J2EE application they are web and enterprise Java bean. Enterprise Java bean consists of all the logic which is very much required for a web service to run. These can be stored as . jar file and can be deployed on an... Read More
Explain about the method ready pool?
Added on Sat, Dec 26, 2009
In this stage of operation bean contains an instance in its memory. This instance of memory is present in EJB container. These instances are created at the start up and a session context is set up and ultimately this data or instance is transferred... Read More
What is IIOP ?
Added on Sat, Dec 26, 2009
It is Internet Inter Object Resource Broker Protocl Read More
Does each stateless session bean have its own EJBObject
Added on Sat, Dec 26, 2009
This is container specific as it is responsible for hadling the beans. There may be a 1:N or M:N relationship between EJBObject and the session Bean. Read More
How do I know what the develper named the bean?
Added on Sat, Dec 26, 2009
We can know the name of the bean through the deployment descriptor .THe tag < ejb-name>has the name of the bean . Read More
Why don't stateful session beans have a pool?
Added on Sat, Dec 26, 2009
Stateful session beans get instantiated once for each seperate client request and it stores the client information in it, there is no threading concept in EJB hence if there will be an instance pool will exist then there is a possiblity of... Read More
Who makes the EJBObject class?
Added on Sat, Dec 26, 2009
EJBObject class is made by the Container Read More
What happens when an interface extends another interface
Added on Sat, Dec 26, 2009
The methods in the super interface autometically comes into extended interface like inheritance Read More
What are the design patterns in EJB? Clarify it?
Added on Sat, Dec 26, 2009
No answer available currently. Be the first one to reply to this question by submitting your answer from the form below.   Read More
Is stateful session beans are scalable?
Added on Sat, Dec 26, 2009
No stateful session beans are not scable since it has to remember its state w.r.t each client..however stateful session beans can be activated and passivated. Read More
What is the difference between EJB and J2EE ?
Added on Sat, Dec 26, 2009
J2EE is a Software which works as backround infrastructure for our application , and EJB(container) is a part of J2EE Architecture .EJB is useful for Distributed Application. Read More
Can we use session beans & entity beans in single application?
Added on Sat, Dec 26, 2009
yes definately Read More
Without using entity beans can we do database transactions?
Added on Sat, Dec 26, 2009
Without using entity beans we can do database transactions through Springs .Spring can be used to configure declarative transaction management, remote access to your logic using RMI or web services, mailing facilities and various options in... Read More
Already we have http session in servlets. so why we use session beans ejb?
Added on Sat, Dec 26, 2009
Remember EJB is an API for distributed computing, it can be accessed form different client (CORBA, Thick Clients like Swings or stand alone Java programms etc..), including Servlets or JSP (Thin Client) which has HTTPSession for maintaining client... Read More
What is the use of using session facade design pattern in EJB'S?
Added on Sat, Dec 26, 2009
There are many uses, important one is to reduce network traffic I you are calling many EJB from your Servlet then this is not advised, because it has to make many network trips, so what you do you call a Stateless session bean and this in turn... Read More
Why java is system independent?
Added on Sat, Dec 26, 2009
Java was designed to not only be cross-platform in source form like C, but also in compiled binary form. Since this is frankly impossible across processor architectures Java is compiled to an intermediate form called byte-code. A Java program... Read More
What is static block?
Added on Sat, Dec 26, 2009
Static block is a group of statements enclosed in curly braces and a prefix keyword static is used before that block. this peice of code are executed once in its life time. Read More
When we use abstract class and interface ?
Added on Sat, Dec 26, 2009
It's totally dependent on condition. When there is a situation that we have to provide the partial implementation of some or all the method of a Object then One should go towards Abstract class. When all the method are abstract then one can... Read More
How we deploy in weblogic?
Added on Sat, Dec 26, 2009
Simple Make a war /ear/ jar file of the application eg: if all your app'n code , etc is in say folder d:/mybankappn then which is a web app'n then.. go to D:mybankappn> jar -cvf bankappn.war *.* == == start weblogic server. Go... Read More
What is parent class of Hashtable?
Added on Sat, Dec 26, 2009
java.util.Dictionary Read More
Which deployment descriptor used in struts?
Added on Sat, Dec 26, 2009
Struts configuration file: struts-config.xmlWeb Application Deployment Descriptor: web.xml Read More
What is the difference synchronized block and normal block?
Added on Sat, Dec 26, 2009
Synchronised block is a thread safe,where as a normal block is not thread safe.only one thread at atime can access a synchronised blockbut not for a normal block Read More
What are the file used in hibernate?
Added on Sat, Dec 26, 2009
Hibernate is a middle tier library. Which files are you talking about? In Hibernate core. Hibernate.cfg. xml or properties file to configure Hibernate and HBM files. In EJB3, persistence.xml and datasource . Read More
What kind of bean(entity/session) will you use if there are no database transactions and all you use is a read-only database.
Added on Sat, Dec 26, 2009
It depends on the available infrastructure and programming efforts to be put in.Read only Entity bean(CMP) will minimize progarmmer time and effors, if one is comfortable with CMP developmet.Stateless or BMP requires more effort and coding than CMP Read More
What is the use of activate, passivate methods in EJB?
Added on Sat, Dec 26, 2009
Ejb activate() and passivate() methods are playing good role in ejbs. ejb activate() is the method that donotes the objects which are at active state and at the same time passivate() tells us that objects which are at passive state(at sleeping... Read More
What is session Facade in EJB?
Added on Sat, Dec 26, 2009
Session Facade is a design pattern to access the Entity bean through local interface than accessing directly. It increases the performance over the network. In this case we call session bean which on turn call entity bean. Read More
What is the default transaction attribute in transactions
Added on Sat, Dec 26, 2009
In weblogic, the default transaction attribute for EJB is SUPPORTS. There is no default transaction attribute for an EJB. Section 11.5 of EJB v1.1 spec says that the deployer must specify a value for the transaction attribute for those methods... Read More
What is EJB role in J2EE?
Added on Sat, Dec 26, 2009
EJB technology is the core of J2EE. It enables developers to write reusable and portable server-side business logic for the J2EE platform. Read More
What is session synchronization in EJB
Added on Sat, Dec 26, 2009
It is used for transaction support in stateful session beans. EJB container calls call back functions on sfsb (if it implements SessionSynchronization interface) after transaction started, before completion and after completion.Bean developer can do... Read More
What is the difference between EJB and Java beans?
Added on Sat, Dec 26, 2009
EJB is a specification for J2EE server, not a product and Java beans may be a graphical component in IDE. Read More
What are the key features of the EJB technology?
Added on Sat, Dec 26, 2009
► EJB components are server-side components written entirely in the Java programming language ► EJB components contain business logic only - no system-level programming & services, such as transactions, security, life-cycle, threading,... Read More
Where is JNDI located (In client or server).
Added on Sat, Dec 26, 2009
question: Where is JNDI located (In client or server). If its server, how a client can get the information about which EJB is registered in JNDI ?. How EJB will be registered in JNDI. Answers: If its server, how a client can get the... Read More
What are the key benefits of the EJB technology?
Added on Sat, Dec 26, 2009
► Rapid application development ► Broad industry adoption ► Application portability ► Protection of IT investment Read More
How to achieve clustering and connection pooling in ejb
Added on Sat, Dec 26, 2009
To achieve clustering : You need to configure vendor specific deployment descriptor file(or other vendor specific manner) in order to get cluster aware EJB application. When you configure for clustering, EJB Container/Server generates cluster aware... Read More
How many enterprise beans?
Added on Sat, Dec 26, 2009
There are three kinds of enterprise beans: 1. session beans, 2. entity beans, and 3. message-driven beans. Read More
What is message-driven bean?
Added on Sat, Dec 26, 2009
A message-driven bean combines features of a session bean and a Java Message Service (JMS) message listener, allowing a business component to receive JMS. A message-driven bean enables asynchronous clients to access the business logic in the EJB... Read More
How to configure the jdbc driver in welogic server? What are all the necessary jar files to be used?
Added on Sat, Dec 26, 2009
http://e-docs.bea.com/wls/docs81/jdbc/thirdparty.html#thirdparty001 Read More
How do J2EE application servers in general and the Weblogic servers in particular help software development?
Added on Sat, Dec 26, 2009
J2EE application server in general or Weblogic appliction server in particular provide services such as security, data integration and resource management. So the developers can concentrate only on the functionality they need to implement. Also... Read More
How EjbQL ara impemented when it is necessary?
Added on Sat, Dec 26, 2009
1. EJB QL is introduced in EJB 2.0 specification it is used to write only finder(Select) queries for Entity beans. it is simple to write and give OO feel. it supports lazy loading. A2.It is only applicable for statefull session bean A3. In BMP it... Read More
What is Entity Bean and Session Bean ?
Added on Sat, Dec 26, 2009
Entity Bean is a Java class which implements an Enterprise Bean interface and provides the implementation of the business methods. There are two types: Container Managed Persistence(CMP) and Bean-Managed Persistence(BMP). Session Bean is used to... Read More
Can we deploy two ejbs with same JNDI name in separate ears
Added on Sat, Dec 26, 2009
Yes we can.As long as those 2 ear files are not deployed on the same app server or in the same cluster. If that happens, there would be a ' naming' conflict & would fail the deployment. Read More
How EJB Invocation happens?
Added on Sat, Dec 26, 2009
Retrieve Home Object reference from Naming Service via JNDI. Return Home Object reference to the client. Create me a new EJB Object through Home Object interface. Create EJB Object from the Ejb Object. Return EJB Object reference to the client.... Read More
What is default state of session bean in a ejbjar.xml
Added on Sat, Dec 26, 2009
The default state of a session bean is " STATELESS" Read More
When should we use session bean/entity bean?I was unable to judge?For Example :For Airline Project where we can use EJB's?
Added on Sat, Dec 26, 2009
Session beans are used to execute business logici.e in airline reservation entity beans are connected to database to get the data and give it to the session beans to update like suppose to reserve one seat::::::::entitybeans load the current reserved... Read More
What is the diff between interface and abstract class?
Added on Sat, Dec 26, 2009
Interface is a class construct with methods having no functionality.Advantage of an Interface will come to the picture if the porgrammerwants to call the methods in such a manner where he/she can implementthose methods according their requirement... Read More
Why we need the transactions?
Added on Sat, Dec 26, 2009
Transactions ensure that database actions are consistent. Consider a case where a record is required to be added to say two databases simultaneaously. If the record is added to both the databases, action is consistent & transaction is complete... Read More
What is an EJB Context?
Added on Sat, Dec 26, 2009
EJBContext interface provides methods for interacting with the container.Such as u can obtain the enterprise bean's remote home interface(getEJBHome() method),local home interface(getEJBLocalHome() method),enterprise bean's environment... Read More
Is it possible to share an HttpSession between a JSP and EJB? What happens when I change a value in the HttpSession from inside an EJB?
Added on Sat, Dec 26, 2009
You can pass the HttpSession as parameter to an EJB method, only if all objects in session are serializable. This has to be consider as passed-by-value, that means that it?s read-only in the EJB. If anything is altered from inside the EJB, it won?t... Read More
The EJB container implements the EJBHome and EJBObject classes. For every request from a unique client, does the container create a separate instance of the generated EJBHome and EJBObject classes?
Added on Sat, Dec 26, 2009
The EJB container maintains an instance pool. The container uses these instances for the EJB Home reference irrespective of the client request. while referring the EJB Object classes the container creates a separate instance for each client request.... Read More
What is difference between servlet and jsp
Added on Sat, Dec 26, 2009
JSP is Java code embedded in HTML; the Java code is compiled (if necessary) and run by the container on the server and the client only sees the results of that code's execution mixed in appropriately with the html. Servlets are compiled... Read More
Can the primary key in the entity bean be a Java primitive type such as int?
Added on Sat, Dec 26, 2009
The primary key can?t be a primitive type. Use the primitive wrapper classes, instead. For example, you can use java.lang.Integer as the primary key class, but not int (it has to be a class, not a primitive). Read More
What is requestdespatcher?
Added on Sat, Dec 26, 2009
It is a method that gives object to which next request ,response objects need to be handled to serve the left over work. Read More
Can you control when passivation occurs?
Added on Sat, Dec 26, 2009
The developer, according to the specification, cannot directly control when passivation occurs. Although for Stateful Session Beans, the container cannot passivate an instance that is inside a transaction. So using transactions can be a a strategy... Read More
How garbage collector works
Added on Sat, Dec 26, 2009
Grabage Collector is least priority thread. The task for the GC is to clear the memory used by the no reference objects in the heap.we can't force the GC to come but we can place the request to come i.e by calling System.gc() or Runtime.gc()... Read More
What is the advantage of using Entity bean for database operations, over directly using JDBC API to do database operations? When would I use one over the other?
Added on Sat, Dec 26, 2009
Entity Beans actually represents the data in a database. It is not that Entity Beans replaces JDBC API. There are two types of Entity Beans Container Managed and Bean Mananged. In Container Managed Entity Bean - Whenever the instance of the bean is... Read More
What is EJB QL?
Added on Sat, Dec 26, 2009
EJB QL is a Query Language provided for navigation across a network of enterprise beans and dependent objects defined by means of container managed persistence. EJB QL is introduced in the EJB 2.0 specification. The EJB QL query language defines... Read More
What is design pattern ? use ?
Added on Sat, Dec 26, 2009
A design pattern describes a recurring desing problem and a core solution to it. A design pattern has 4 essential elements: a name, the problem, the solution and consequences. Design patterns can be grouped in 3 major categories: creational,... Read More
Brief description about local interfaces?
Added on Sat, Dec 26, 2009
EEJB was originally designed around remote invocation using the Java Remote Method Invocation (RMI) mechanism, and later extended to support to standard CORBA transport for these calls using RMI/IIOP. This design allowed for maximum flexibility in... Read More
What is the importance of the Narrow class in RMI?
Added on Sat, Dec 26, 2009
Since client never talk to bean directly ,client get reference to component interface (EJBObject) by calling create() method on home interface Client use JNDI to get reference to home interface, for that it first gets the InitialContext ... Read More
Give a scenario where you have used stateless session beans and why was it necessary?
Added on Sat, Dec 26, 2009
I dont think that St less bean is used in this scenario (ie., Credit card processing ) coz there it is a must that we have to remember the client. Read More
What are the special design care that must be taken when you work with local interfaces?
Added on Sat, Dec 26, 2009
It is important to understand that the calling semantics of local interfaces are different from those of remote interfaces. For example, remote interfaces pass parameters using call-by-value semantics, while local interfaces use call-by-reference. ... Read More
What are the call back methods in Session bean
Added on Sat, Dec 26, 2009
Session bean callback methods differ whether it is Stateless or stateful Session bean. Here they are. Stateless Session Bean 1. setSessionContext() 2. ejbCreate() 3. ejbRemove() Stateful Session Bean 1. setSessionContext() 2... Read More
What happens if remove()is never invoked on a session bean?
Added on Sat, Dec 26, 2009
In case of a stateless session bean it may not matter if we call or not as in both cases nothing is done. The number of beans in cache is managed by the container. In case of stateful session bean, the bean may be kept in cache till either the... Read More
What is the difference between Message Driven Beans and Stateless Session beans?
Added on Sat, Dec 26, 2009
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... Read More
What is EJB Query Language
Added on Sat, Dec 26, 2009
EJB QL is somewat similar to SQL. But ejb ql is used to retrieve data from bean objects where as sql is used to retrieve data from tables. Read More
How can I call one EJB from inside of another EJB?
Added on Sat, Dec 26, 2009
EJBs can be clients of other EJBs. It just works. Use JNDI to locate the Home Interface of the other bean, then acquire an instance reference, and so forth. Read More
Can I invoke Runtime.gc() in an EJB
Added on Sat, Dec 26, 2009
Yes, we can give a call to Runtime.gc() in EJB Read More
What is local interface. How values will be passed
Added on Sat, Dec 26, 2009
If Client and EJB classes are in the same machine ( Same JVM) then we can use Local linterface instead of Remote interface. Since Client and EJB are in same JVM, values are passed by referance. Read More
Is is possible for an EJB client to marshal an object of class java.lang.Class to an EJB?
Added on Sat, Dec 26, 2009
Technically yes, spec. compliant NO! - The enterprise bean must not attempt to query a class to obtain information about the declared members that are not otherwise accessible to the enterprise bean because of the security rules of the Java language. Read More
What is the difference between JavaBean and EJB
Added on Sat, Dec 26, 2009
Java Beans architecture is meant to provide a format of general-purpose components. But Enterprise Bean Architecture is meant to provide a format of highly specialized business logic components. Read More
How can we call java beans in jsp?
Added on Sat, Dec 26, 2009
We can call java beans by using jsp:useBean tag Read More
Can we use instance variables in Stateless session beans? If yes, Why and How? If the answer is no
Added on Sat, Dec 26, 2009
Yes we can have instance variables in Stateless Session Bean ,but these are not used to maintain the client specific state. Read More
What is the difference between distributed transactions and Flat transactions in EJB?
Added on Sat, Dec 26, 2009
If your EJB container talks with Multiple databases(EIS) in single trasaction that is been called as distributed transacation. Read More
Is it possible to stop the execution of a method before completion in a SessionBean?
Added on Sat, Dec 26, 2009
Stopping the execution of a method inside a Session Bean is not possible without writing code inside the Session Bean. This is because you are not allowed to access Threads inside an EJB. Read More
What is the default transaction attribute for an EJB?
Added on Sat, Dec 26, 2009
There is no default transaction attribute for an EJB. Section 11.5 of EJB v1.1 spec says that the deployer must specify a value for the transaction attribute for those methods having container managed transaction. In WebLogic, the default transaction... Read More
What is ACID
Added on Sat, Dec 26, 2009
ACID is releated to transactions. It is an acronyam of Atomic, Consistent, Isolation and Durable. Transaction must following the above four properties to be a better one Atomic: It means a transaction must execute all or nothing at all. ... Read More
What is the difference between session and entity beans? When should I use one or the other
Added on Sat, Dec 26, 2009
An entity bean represents persistent global data from the database; a session bean represents transient user-specific data that will die when the user disconnects (ends his session). Generally, the session beans implement business methods (e.g. Bank... Read More
What is the difference between CMP and BMP
Added on Sat, Dec 26, 2009
CMP -- Container-managed persistence beans are the simplest for the bean developer to create and the most difficult for the EJB server to support. This is because all the logic for synchronizing the bean's state with the database is handled ... Read More
What is Entity Bean. What are the various types of Entity Bean
Added on Sat, Dec 26, 2009
State is maintained in the database,the state of the enterprise bean persists longer than the request,the session,or even the server or container life time.This is why we sometimes say that entity beans survive a server crash. Flavours of Entity... Read More
What is the life cycle of Stateful session bean
Added on Sat, Dec 26, 2009
A Stateful Session Bean has three states. Does not exists, Method Ready and Passivated states. Like Stateless beans, when the Stateful Session Bean hasnt been instantiated yet (so it is not an instance in memory) is it in the Does not exists... Read More
How statefull session bean remembers it's client state
Added on Sat, Dec 26, 2009
Through its convesational state, may be a member variable of the bean Read More
What is the main use of using interface?
Added on Sat, Dec 26, 2009
The Main use of interface in java is to implements the concept of Multiple Inheritence. Read More
How many EJB Objects are created for a Bean
Added on Sat, Dec 26, 2009
Only one Object Created for a bean. Read More
What is clustering. What are the different algorithms used for clustering
Added on Sat, Dec 26, 2009
A cluster is loosely coupled group of servers that provide a unified, simple view of the services that they offer individually. Servers in a cluster may or may not communicate to one another. Generally, the overall goal of employing a cluster is to... Read More
Why are ejbActivate() and ejb Passivate() included for stateless session bean even though they are never
Added on Sat, Dec 26, 2009
The simple reason is to manage your resources. For eg. if you use/open any third party resource on ejbActivate, you need to make sure ejbPassivate close the connection/ release the use of resource regardless of stateful session or stateless session Read More
Is Decorator an EJB design pattern
Added on Sat, Dec 26, 2009
Decorator is not a EJB Design pattern. It is a Java pattern. Read More
How is Stateful Session bean maintain their states with client
Added on Sat, Dec 26, 2009
A stateful session bean is an enterprise bean (EJB component) that acts as a server-side extension of the client that uses it. The stateful session bean is created by a client and will work for only that client until the client connection is dropped... Read More
If session has thrown ApplicaitonException would you use EJBContext.setRollBackOnly method
Added on Sat, Dec 26, 2009
yes Is the correct answer. Read More
What are the services provided by container
Added on Sat, Dec 26, 2009
The EJB container provides services to EJB components. The services include transaction, naming, and persistence support. Transaction support An EJB container must support transactions. EJB specifications provide an approach to transaction... Read More
What is difference between EJB 1.1 and EJB 2.0
Added on Sat, Dec 26, 2009
EJB 2.0 adds the local beans, which are accessible only from within the JVM where beans are running in. In EJB 1.1, we had to implement remote client views for all these beans, even if we had no remote clients. Read More
What are simple rules that a Primary key class has to follow
Added on Sat, Dec 26, 2009
Primary key class has to meet the following requirements ? The access control modifier of the class is public. ? All fields are declared as public. ? The class has a public default constructor. ? The class implements the hashCode() and... Read More
If i throw a custom ApplicationException from a business method in Entity bean which is participating
Added on Sat, Dec 26, 2009
For declarative transactions, container will rollback on systemException. Container has no way to know whether a speicific application exception is serious enough to roll back the participated transaction. Use setRollbackOnly() to doom the... Read More
What is abstract schema
Added on Sat, Dec 26, 2009
In cmp, the cmp bean is given an abstract schema name. In EQL you retrieve the data in a bean using these schema names. Read More
What is handle in EJB
Added on Sat, Dec 26, 2009
A handle is an abstraction of a network reference to an EJB object. A handle is intended to be used as a "robust" persistent reference to an EJB object. Read More
What is the difference between find and select methods in EJB
Added on Sat, Dec 26, 2009
A select method is similar to a finder method for Entity Beans, they both use EJB-QL to define the semantics of the method. They differ in that an ejbSelect method(s) are not exposed to the client and the ejbSelect method(s) can return values that... Read More
How can we call cmp?
Added on Sat, Dec 26, 2009
First of all the question is not very clear and specific. But I hope this helps:You call create() method of the home object which in turn calls the ejbCreate() of the bean and as you mentioned that this a CMP - so within the beans ejbCreate() you can... Read More
Is instance pooling necessary for entity beans
Added on Sat, Dec 26, 2009
One of the fundamental concepts of Entity Beans is that they are the pooled objects.Instance pooling is the service of the container that allows the container to reuse bean instances,as opposed to creating new ones every time a request for a bean is... Read More
When two entity beans are said to be identical?Which method is used to compare identical or not?
Added on Sat, Dec 26, 2009
Two Entity Beans are said to be Identical,if they have the same home inteface and their primary keys are the same.To test for this ,you must use the component inteface's isIdentical() method.   Read More
Can undefined primary keys are possible with Entity beans?If so, what type is defined?
Added on Sat, Dec 26, 2009
Yes,undefined primary keys are possible with Entity Beans.The type is defined as java.lang.Object. Read More
Can undefined primary keys are possible with Entity beans?If so, what type is defined? s
Added on Sat, Dec 26, 2009
Yes,undefined primary keys are possible with Entity Beans.The type is defined as java.lang.Object. Read More
What is the difference between optimistic locking and pessimistic locking
Added on Sat, Dec 26, 2009
Optimistic locking assumes that no one would read or change the data while changes are being by a bean Pessimistic locking would rather lock down the data so that no one can access it Read More
With EJB 1.1 specs, why is unsetSessionContext() not provided in Session Beans, like unsetEntityContext()
Added on Sat, Dec 26, 2009
Quote] ejbRemove() is called for session beans every time the container destroyes the bean. So you can use this method to do the stuff you typically would do in unsetEntityContext(). For entity beans ejbRemove() is only called if the user explicitly... Read More
What is the difference between CMP 1.1 and CMP 2.0
Added on Sat, Dec 26, 2009
CMR and sub classing of the CMP bean by the container Read More





   copy right ® all rights reserved by www.fullinterview.com