Tag: programming languages
Questions Related to programming languages
-
A bean cannot use java.net.Socket.
-
A bean instance variable cannot be declared static and final.
-
A bean cannot listen on a socket as a server.
-
A bean cannot use the java.io package.
-
A bean cannot use this in the body of a class method.
-
int
-
short
-
java.lang.Boolean
-
java.lang.Character
-
Once acquired, the home interface can be used only once.
-
Each instance of a session bean has its own EJBHome object.
-
The InitialContext must be narrowed before it can be used to get the
-
Only remote clients need to get the home interface; local clients can get to the
-
The local client can use the home interface to remove the bean instance.
-
None of the above.
-
L can pass its reference for B as a return value of a method call from R.
-
R can pass its reference for B as a parameter in a method call to L.
-
L cannot call methods on R. Doesn’t this depend on what R actually is, and where it is located
-
L cannot call methods on B.
-
A local client can remove the bean by invoking a method on the home interface
-
Only a remote client can use the remove() method in the component interface.
-
A stateful session bean is created by the container when the client invokes a create() method on the home interface.
-
A create call from a client on a stateless session bean may not result in creating any instance of the bean. The container can create stateless session bean instances before any call from the client.
-
A remove call from a client on a stateless session bean instance results in removing the instance.
-
setSessionContext()
-
ejbCreate() method of a stateless session bean
-
ejbCreate() method of a stateful session bean
-
None of the above
-
Call ejbCreate().
-
Implement javax.ejb.SessionBean.
-
Implement javax.ejb.EJBContext.
-
Implement ejbRemove().
-
Implement setSessionContext().
-
An ejbRemove() call from the container removes the bean instance and puts it out for the garbage collector.
-
An ejbCreate() call is made by the container only when a client invokes a create method.
-
You can get the security information about a client from inside the ejbCreate() method.
-
The container will call the setSessionContext() method only once.
-
All of the above.
-
ejbRemove()
-
ejbPassivate()
-
setSessionContext()
-
ejbCreate()
-
None of the above
-
javax.ejb.NoSuchObjectLocalException for the local client
-
javax.ejb.NoSuchObjectException for the remote client
-
javax.ejb.RemoveException
-
javax.ejb.ObjectNotFoundException
-
java.rmi.NoSuchObjectException for the remote client