P Chittaranjan

Ranch Hand
+ Follow
since Feb 09, 2006
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by P Chittaranjan

Hi,

I am from Bangalore, Indian. I received my Certificate on 26th Feb and the score card on 27th Feb. I have got 73 %. Though it is not a high score, but I am happy with this score.

Suchitra , I think you will be getting the certificate very soon provided your contact address is proper in the database.

Sun takes for 4-6 weeks of time to deliver the certificate outside of USA.
Hi Steven,

From my understanding , you can call the method getRollbackOnly() but it will throw exception at run time.
You have already given the answere.
For the methods marked with Supports, it may run in a certain transaction.

If a transaction is available , it will run with out a problem.
If transaction is not there , we will get the exception.

To avoid this problem getRollbackOnly() should not be called within a method marked Supports.

Thanks,
Chittaranjan
Hi,

Yes the login is different from I7. If you are a first time user , you have to register first.
For Registration you need the following details which you can get from any of you Score Report.
CANDIDATE ID:
REGISTRATION NUMBER:
DATE OF EXAM:
Unbelievable !!!
I too cleared!!!
Thanks a lot to SUN for giving the Opportunity to sit in the exam.
I used only the Specifications for the preparation.Also I had few months of experience in EJB 2.0.
Thanks a lot to all the Ranchers for posting the valuable informations here !!

Congratulations to all who cleared the exam!!!


Thanks,
Chittaranjan
Hi ,

It is not the bean class. It is the bean interface we are talking about.
If you extend java.rmi.Remote interface to the business interface , you can mention RemoteException in the throws clause of the business method.

Thanks,
Chittaranjan
Hi Rajan,

Thanks a lot !!!
Yes, I was using the old doc. It is corrected in the final release.

Thanks,
Chittaranjan
[ December 16, 2006: Message edited by: P Chittaranjan ]
Hi ,

I am not sure whether you are talking about business interface.
If your business interface is writen for remote client view(annotated with @Remote) , the methods of the business interface can throw RemoteException.

Thanks,
Chittaranjan
Hi,

The following is the example given on page 289 of the spec ejb-3_0-pr-spec-ejbcore.pdf.
--------------------------------------------------------
Example:
@TransactionAttribute(SUPPORTS)
public class someClass {
public void aMethod () {...}
public void bMethod () {...}
...
}
@Stateless public class aBean implements A {
public void aMethod () {...}
@TransactionAttribute(REQUIRES_NEW)
public void cMethod () {...}
...
}
Assuming aMethod, bMethod, cMethod are methods of interface A, their transaction attributes are
REQUIRED, SUPPORTS, and REQUIRES_NEW respectively.
--------------------------------------------------------------------

According to the above example 'aBean' implements interface A.
Since interface A is not mentioned here in the example ,I assume that interface A has default TransactionAttribute(REQUIRED).

Based on the default TransactionAttribute of A, methods aMethod, bMethod, cMethod should have the transaction attribute REQUIRED, REQUIRED, and REQUIRES_NEW respectively.

Is there something wrong in the example?
or Am I missing something here?

Can any body please help me to understand this?

Thanks,
Chittaranjan
Hi Ranchers,

One doubt in "Operations Allowed in the Methods of a Session Bean".

From my understanding
PostConstruct, Pre-Destroy, PrePassivate,PostActivate callback
methods run in a unspecified Transaction Context. So Resource manager access and Enterprise bean access should not be allowed in these methods.


If I see the tables (Table1-page 74 and Table2-page 82 ) from ejb-3_0-pr-spec-ejbcore.pdf spec, there are some differences.

For Statefull Session beens

Operations allowed in PostConstruct, Pre-Destroy, PrePassivate,PostActivate are
1. SessionContext methods: getBusinessObject,getEJBHome, getEJBLocalHome, getCallerPrincipal,isCallerInRole, getEJBObject, getEJBLocalObject
2. JNDI access to java:comp/env
3. Resource manager access
4. Enterprise bean access

For Stateless Session beens
Operations allowed in PostConstruct, Pre-Destroy are

1. SessionContext methods: getBusinessObject,getEJBHome, getEJBLocalHome, getEJBObject,getEJBLocalObject, getTimerService
2. JNDI access to java:comp/env

As we know all the above methods are running in unspecified transaction.
Why Resource manager access and Enterprise bean access are allowed in Statefull session bean?
Can any body please help me to understand the difference here?

Regards,
Chittaranjan
Hi Vijay,

For accessing any resource manager we need to have a meaning full transaction.
setEntityContext method always runs in an unspecified transaction context.
That is the reason accessing resource manager are restricted in setEntityContext.

Thanks,
Chittaranjan
Hi Rehana Shaik,

Q1. For ejbRemove method in stateless session bean:
These are allowed
1. get reference to EJB Home
2. get reference to EJB Object
7. get transaction reference and call methods on it(BMT)
These not are allowed
3. get security information from client ( stateless session beans doesnot have any client specific information )
4. get primary key ( this cannot be called for session beans)
5. force a transaction to rollback(CMT) ( scince ejbRemove is running in a unspecified transaction , this is not allowed)
6. find if a transaction is already set to rollback(CMT) ( scince ejbRemove is running in a unspecified transaction , this is not allowed)


Q2.
For ejbRemove method in entity bean

All are allowed except
7. get transaction reference and call methods on it(BMT)-- because entity bean is always Container Managed.

For unsetEntityContext method in entity bean
This method is called when the entity object(not representing any entity in the persistent store) is in the pool.
Only 1. get reference to EJB Home is allowed here.

Q3.onMessage in message driven bean (ofcourse 1, 2, 3, 4 are already
ruled out).

This one you have already answered. 5 & 6 for CMT and 7 for BMT are allowed.



Thanks,
Chittaranjan
Hi All,

Thanks a lot.

Hi Dhanya Palanisamy,

I have 2 years experience in Java coding. But I don't have any working experience in J2EE( Servlet,JSP,EJB). I will be starting a web based project from this month. This certification was for that.


Thanks,
Chittaranjan
13 years ago
Hi,

I passed SCWCD with score 75%.

Thanks a lot to K&B. HFSJ is realy an amazing book.

This is the only book I refered. This helped me to clear the exam with 5 days of preparation.
I had scored 45% in the mock test just 2 hour before the Exam.

Thanks to Head First Servlt and JSP.


Regards,
Chittaranjan

SCJP1.5, SCWCD1.4
13 years ago
I think the question is specifically looking for JSP Code. Not scripting.
This is like , you are logging in to your mail account from different system at the same. In this case you should have a single session.Or loging in from more than one browser in the same machine.

The developer has to take care of that.