Marcin Faryna

Greenhorn
+ Follow
since Jul 16, 2009
Poland
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
6
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Marcin Faryna


Hello,

Im preparing the SCBCD certification, could you please send me the mocking Tests (free of course )

this is my adresse mail: k_karim_92@hotmail.fr

thanks you very much



Sorry, khalid i cannot send you Ethuwares test it is not honest to share them, also i think it is illegal too. Ethuware tests aren't expensive compare to others, beside they are worth their price, you have more then just answers checked. I think Ethuware team spent a lot of hours collecting this knowledge and working on their shape which it is now. So just distributing them for free is not honest from my point of view.


Congratulations!

How would you rate the Enthuware tests compared to the real thing? I seem to be getting lots of questions about the roles of deployers, assemblers, sys admins, etc do these appear on the real exam?



The real exam which i was taking doesn't consists of so many role's questions like Ethuware's, but roles questions maybe random both in difficulty and number. I wasn't studying roles part very hard, roles wasn't interesting subject in my opinion, but some knowledge int this area is required to don't loose points unnecessarily.

10 years ago
Ok, here it is my preparation story. I began my preparation with general understanding EJB so at this first stage i studied from "Ejb in action". It wasn't regular study. It took some time, something about 1 month when i gained more theoretical general knowledge. After that i began more complex studies with specification and few others materials like "Mastering EJB", "MZ study guide". The second part was very time consuming task and it took another month of preparation. Most of work in second part i spend on searching some exceptional situations and collect knowledge to solve them. This is the time where javaranch forum was most useful, many of the scenarios which i found was already there with explanation at hand. Last 2 weeks of preparation i made use of Ethuware test. The score from ethuware wasn't high at first time but gave me good directions what part of my knowledge need to be improved first. So in short:
1.General knowledge first even if you have some experience with technology like i have (about 1 year) there are many names, descriptions, concepts which are used rarely but need to be known for exam (here i advise "EJB in Action")
2.Use your knowledge to improve your understanding of concepts state more complex questions and try to answer them (specs, MZ study guide, Mastering EJB, forum)
3.Test your knowledge (Ethuware SCBCD 5 tests - there are answers included - very helpful)
And don't give up.

10 years ago
Hello The day before yesterday I have passed SCBCD 5 90%. Thanks all forum members for help, it was very useful. The exam wasn't so hard as I supposed, the first part was quite easy, second more complex but compare to ethuware's tests it wasn't a problem. Next target webservices, i think current jee6 version.
10 years ago
Hello everyone, very helpful answer Benoît but i have some doubts about the spec int this matter. On the page 79 (JSR 220) there is a table describing "Operations Allowed in the Methods of a Stateful Session Bean". There are PostConstruct, Pre-Destroy, PrePassivate, PostActivate lifecycle methods on the left and on the right access to Resource manager, Enterprise bean and others described as allowed. Isn't it conflicting with:


Accessing resource managers and enterprise beans is disallowed in the session bean methods
for which the container does not have a meaningful transaction context and/or client security
context.



I think it is, but what do you say?
If your client is stand-alone application you must use Remote or Webservice interface to invoke EJB3 bean.
Hello, In my opinion there is a mistake in this question:


1. @Resource DataSource ds;



Is wrong because container uses the name java:comp/env/ms.FooBean/ds which is not bound to any DataSource.


2. (DataSource) ctx.lookup("java:comp:env/jdbc/BarDB");



Is wrong because like S Bhanage said wrong name was used.


3.initCtx.lookup("java:comp/env/jdbc/BarDB");



This one is wrong because simply there is nothing like Context Object there is SessionContext obviously and is explicity mentioned

... and a reference to a SessionContext object bound to the variable ctx




4.Resource(name=?jdbc/BarDB?, type=javax.sql.DataSource)



Which is wrongly formed and no field is annotated.


So all four are wrong what do you think?
hi, I dont't know which EJB container do you use, but from spec "An EJB 3.0 container must make the following APIs available to the enterprise bean instances at runtime:
• Java 2 Platform, Standard Edition v5 (J2SE) APIs, which include the following APIs:
• JDBC
• RMI-IIOP
• JNDI
• JAXP
• Java IDL
• EJB 3.0 APIs, including the Java Persistence API
• JTA 1.1, the UserTransaction interface only
• JMS 1.1
......"
so i think it's bug in implementation when bean serve business request without container services fully initialized.
Container must be fully operational before bean can serve business request (Timeout for example). This is my point of view of course.
Yes, I understand this way:

1.Timer is created within transaction so rollback of this transaction imply timer creation will not happend.
2.Timer has its own transaction when it's timeOut method is invoked. What is is interesting here in spec "The timeout callback method is typically has transaction attribute REQUIRED or REQUIRES_NEW (Required or RequiresNew if the deployment descriptor is used to specify the transaction attribute)", REQUIRED suggests that timer timeOut method may join some other transaction which i think is not possible?
Yes but there is specific situation which i cannot find in JSR220:



In this case in glassfish 3.0.1 we got:
ClassAInterceptor:perform
ClassBInterceptor:perform

but in jboss 5.1.0GA:
ClassBInterceptor:perform
ClassAInterceptor:perform

I presume that this is gap in specification and vendors implement this on their own.

I think i figured it out:
1.Default interceptors with order in DD (method level default interceptors can be invoked first if they are defined in such order in DD)
2.Bean class level annotated interceptors with order declared in annotation (if such interceptor has parent, this parent will be invoked first)
3.Bean parent class level annotated interceptors with order declared in annotation
4.DD class level interceptors order defined in DD
5.Bean method level annotated interceptors with order declared in annotation (if such interceptor has parent, this parent will be invoked first)
6.DD method level interceptors with order declared in annotation (if such interceptor has parent, this parent will be invoked first)
7.Bean class parent (if any) defined interceptor
8.Bean class itself defined interceptor

Hope that's all

What about super-class annotated interceptors are they inherited?
Is there any way to disable annotated (class level or method lvl) interceptors via ejb-jar.xml ?
I understand that javax.ejb.ApplicationException annotation is related to sessions beans transaction managment not to Lifecycle handlers.
Yes in "EJB in Action" (2007) is written "Note that you can have multiple PostConstruct and PreDestroy callbacks for a given bean (although this is seldom used) in a class or in a separate interceptor class (discussed in chapter 5)." . Which can direct to the false assumption that in single class definition you can have more then one @PostConstruct and @PreDestroy annotated method.