aspose file tools*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Cleared SCBCD last week.. some notes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Cleared SCBCD last week.. some notes" Watch "Cleared SCBCD last week.. some notes" New topic
Author

Cleared SCBCD last week.. some notes

Anurag Saksena
Greenhorn

Joined: Jul 20, 2004
Posts: 28
Hey people!

I cleared SCBCD with 88%. Some of the notes which I took towards the end and really helped are pasted down below

-a.
========
SCJP 1.4
SCWCD 1.4
SCBCD 1.3


++++++++++++
* MBD can have overloaded ejbCreate() methods. Just that the container will call only ejbCreat() with no args.

* EJBs should not make use of the thread API

* onMessage() can have ony 'Required' or 'NotSupported' Tx attributes

* Path expressions that contain NULL values during evaluation return NULL values

* It is recommended that static fields be declared as final. But its not an error. It can be read-only. You must not assign a value to it.

* An EJB must not load a native library.

* EJBQL cannot be used to update ejbs or insert new rows in DB.

* The transaction context of ejbPostCreate() methods is same as that of the corresponding ejbCreate method.

* EJBObject.isIdentical(o)
Stateless: returns 'True' for same home
Stateful: returns 'False' (always)
Entity: returns 'True' if same entity

* afterBegin() is called between client invokation of bz method and it getting invoked on the bean.

* Server crashes are transparent to entity bean client.

* MBD can only be remote.

* Session beans cannot be passivated when in Tx.

* ejbRemove() is not called..
Server crashes
Passivated bean times out
Bean throws a system exception

* Null is also passivated

* Implement SessionSynchronisation only when the Stateful bean uses CMT

* Entity bean can use only CMT for Tx.

* Bean clients call remove() on EJBObject.

* If bean clients call EJBHome.remove() == remove the bean that came from that home, i.e. You have to know exctly which bean you want container to remove.

* If Session bean's home interface invokes remove(o), it'll get a RemoveException.

* If a session bean client tries to invoke EJBObject.getPrimaryKey(), they'll get RemoteException (or EJBException)

* Can't invoke EJBObject.getPrimaryKey() in ejbCreate() of CMP.

* getRollbackOnly(), getUserTransaction() can be called from inside onMessage()

* An enterprise bean must not use the java.util.zip package for reading and writing the standard ZIP to ensure portiability

* The following are considered to be goals of the EJB 2.0 Specification:
- Define the integration of EJB with the Java Message Service.
- Provide a local client view and support for efficient, lightweight access to enterprise beans from local clients.
- Provide improved support for the persistence of entity beans.
- Provide improved support for the management of relationships among entity beans.
- Provide a query syntax for entity bean finder methods.
- Provide support for additional methods in the home interface.
- Provide for network interoperability among EJB servers.

* The ejb-jar file must contain, either by inclusion or by reference, the class files for all the classes and interfaces that each enterprise bean class and the home and component interfaces depend on, except J2EE and J2SE classes.

* java:comp/env is the JNDI name of an enterprise bean's environment

* <ejb-ref> element in DD allows the bean provider to locate the home interface of other enterprise beans without knowing where the object resides in the enterprise system.

* <ejb-ref>: Ensuring that the target enterprise method is type-compatible with the declared EJB reference are the responsibilities of both the application assembler and the deployer.

* If the value of the <res-auth> element was Application the bean provider would be responsible for performing a sign-on to the resource manager programmatically.

* Linking an EJB reference to a target enterprise bean - Application Assembler

* Binding the homes of enterprise beans that exist in the target operational environment - Deployer

* Environment entry value - Bean Provider, App Assembler, Deployer

* Adding, removing and configuring resource managers - System adminstrator

* SessionSynchronization - Provides notification of the events of the transactional context it is involved in

* EJBContext.getUserTransaction() only if BMT else IllegalStateException

* The Bean Provider must ensure that the Java types assigned to the cmp-fields are restricted to the Java primitive types and Java serializable types.

* The <primkey-field> is an optional element and is used to map a single field to a primary key.

=====
* Application Assembler can use the <exclude-list> element to indicate the set of methods that should not be called

* Assign method permissions for all of the unspecified methods - Deployer

* The Application Assembler is allowed to modify the values of the environment entries set by the Bean
Provider.

* The Deployer can modify the values of the environment entries that have been previously set by the
Bean Provider and/or Application Assembler, and must set the values of those environment entries for
which no value has been specified.

* The Application Assembler can use the <ejb-link> element in the deployment descriptor to link an
EJB reference to a target enterprise bean. Can also bo linked to (in the same J2EE application unit) different ejb-jar file. e.g. <ejb-link>../products/product.jar#ProductEJB</ejb-link>

* The Deployer must ensure that the target enterprise bean is type-compatible with the types declared for the EJB reference.

* Deployer should bind the enterprise bean reference to the home of the enterprise bean specified as the link�s target.

* Session beans and Message-driven beans are never re-entrant.

* <session-type>, <transaction-type>, <persitence-type>, <message-selector>, <acknowledge-mode> are elements inside <enterprise-beans>

* Application assembler must never modify <abstract-schema-name>, <relationship-role-source>

* EJB QL
<query>
<query-method>
<method-name>ejbSelectPendingLineitems</method-name>
<method-params/>
</query-method>
<ejb-ql>SELECT OBJECT(l) FROM LineItems l WHERE l.shipped <> TRUE </ejb-ql>
</query>

* An enterprise bean must not attempt to listen on a socket. Creating a socket is ok.

* The enterprise bean must not attempt to use the Reflection API to access information that the security rules of the Java programming language make unavailable.

* The enterprise bean must not attempt to create a class loader; obtain the current class loader;
set the context class loader; set security manager; create a new security manager; stop the
JVM; or change the input, output, and error streams.

* The enterprise bean must NOT attempt to define a class in a package.

* JTA 1.0.1, the UserTransaction interface ONLY

* JavaMail 1.1, sending mail ONLY

* Bean provider must define EJBQL for all finders, selectors including ejbFindByPrimaryKey(key)

* If a business method raises a system exception whilst in the context of transaction, afterCompletion() is called on the session bean instance with a boolean value of false to notify the instance that a rollback has occurred.

* Invoking javax.ejb.EJBObject.getPrimaryKey() on a session bean results in javax.rmi.RemoteException been thrown.

* BasketHome basketHome = (BasketHome)initialContext.lookup("java:comp/env/ejb/basket");
// implies Basket is local as no PortableRemoteObject.narrow()

* basketHome.create(discountVoucher); //Basket is a Stateful bean as create() with args

* EJBMetaData interface for the session bean is obtained using a remote home interface

* Its java.rmi.NoSuchObjectException for Remote and javax.ejb.NoSuchObjectLocalException for local. [Notice diffrent package name]

* Along with the System Administrator setting up of the principal delegation in a Container-specific way - Deployer

* Deployer sets up the appropriate security policy for the enterprise bean application.
Application Assembler and Deployer define the appropriate security policies for the application.

* When ejbActivate() is invoked in an entity bean there is no client, this means that the Container cannot invoke getCallerPrincipal() or isCallerInRole(). java.lang.IllegalStateException will be thrown.

* SELECT DISTINCT OBJECT (p) FROM Pet p, Owner o WHERE p.petname = o.petname // is a valid query

* For session bean ejbCreate() is invoked by the container with an unspecified transaction context

* ejbPassivate() is invoked by the container before passivating the bean instance giving the bean provider an opportunity to ensure that the bean's state meets the requirements for passivation and to allow the bean provider to release any open resources.

* Bean class may implement the session bean's component interface.

* The conversational state of a stateful session bean may hold resources such as open socket connections and open database cursors. However, the container cannot retain the open resources when the bean instance is passivated.

* If a remote client in a 'transaction context' (with CMT) will always receive a javax.transaction.TransactionRolledbackException in case of any System exceptions. A local client will receive javax.ejb.TransactionRolledbackLocalException (notice different package name)

* A CMT bean in case of Application Exception - If the instance did not call setRollbackOnly(), the EJB container will commit the transaction and re-throw the application exception

* Entity home business methods cannot start with cannot start with the prefix: "create", "find" or "remove"
++++++++++++
Emad El-Agouz
Greenhorn

Joined: Feb 21, 2005
Posts: 21
Thank you for sharing.
It is nice from you...


Emad El-Agouz<br />Software Engineer<br />-----------------<br />SCJP,SCWCD,SCBCD & SCEA (Pt 1)<br />IBM 399
rani bedi
Ranch Hand

Joined: Feb 06, 2001
Posts: 358
Congrats for clearing SCBCD and thanks for your notes


Cheers,<br />Rani<br />SCJP, SCWCD, SCBCD
Jeff Walker
Ranch Hand

Joined: Apr 25, 2004
Posts: 116
Originally posted by Anurag Saksena:
Hey people!

I cleared SCBCD with 88%. Some of the notes which I took towards the end and really helped are pasted down below
...
++++++++++++


Congratulations Anurag, you've done well in a difficult exam!
Thank you again for posting your experiences.
On behalf of all of us who are studying for the exam, we all appreciate it.
-jeff walker
amol deshpande
Ranch Hand

Joined: Sep 05, 2003
Posts: 162
>Bean provider must define EJBQL for all finders, selectors including >ejbFindByPrimaryKey(key)
>


I need a quick correction if I'm not correct.........??? ejbFindByPrimaryKey doesnt need to have EJBQL......!!! I mean ...all finders exceptin ejbFindByPrimaryKey need ejbql.
Please tell me the correct option....it will make me feel better
Amol.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Cleared SCBCD last week.. some notes