Mihai Radulescu

Ranch Hand
+ Follow
since Sep 18, 2003
Mihai likes ...
IntelliJ IDE Java Linux
Merit badge: grant badges
For More
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 Mihai Radulescu


Well, is good to see you guys back .
What are yours plans regarding the "Oracle Certified Associate, Java SE 8 Programmer - 1Z1-808". According with http://javarevisited.blogspot.co.at/2014/09/latest-OCPJP-exam-java-8-certification-oracle-java-se-8.html the exam is in the beta phase.

Best Regards,
M
Nam Ha Minh, I hit only 86 % and I am not amazing happy with it but this is life.
As fare as I will get "ridiculous rich" I will reschedule the test and I will get a over 90% .).

Best Regards
Mihai
10 years ago
Yeep, it seams that I need to change my profile, I just shot an other certification .
I like to thanks the all of you for Help, specially Frits Walraven, Ivan A Krizsan and all the guys behind the enthuware tests.

The exam was easy but not as easy as you expect. It ha the fair amount of tricky and easy questions.
But well that was ..... JPA certification here I am.


Best Regars
Mihai
10 years ago
Sorry for the delayed answer, you know holidays.

Just to be sure that I understand your statement right.
You say that @Interceptors annotation can not be used the same method annotated with @Timeout.
This is correct, the reason can be the fist sentence from the Interceptors chapter from the specifications (chapter 12).


Interceptors are used to interpose on business method invocations and lifecycle events that occur on an enterprise bean instance.



As long as a timeout is not a business method then the upper stamen is correct.

Am I right ?


Thanks in advance,
Mihai
Dear All and dear Frits,

Fist, I like to thanks you for the study notes, they are well done and concise.

Second, I think I locate something that my look like a mistake. In my document version on page 4-42 you have a note that states:


Note: you cannot have an Interceptor on a Timeout method



IMHO and according with the Oracle specification for Interceptors (available http://docs.oracle.com/javaee/6/tutorial/doc/gkedm.html ) you can have interceptors for timeout methods.


Interceptors for EJB timer service timeout methods may be defined using the @AroundTimeout annotation on methods in the target class or in an interceptor class. Only one @AroundTimeout method per class is allowed.



Is this a mistake in your study notes or do I misinterpret something ?


Thanks in advance & best Regards,
Mihai
Hi

Under normal circumstances you will get a kit that contains a lot of more or less things (e.g. your certification on paper, a pin, etc ). This kit also contains a paper form where you are asked if everything was OK and if not you can report this.
But, are you sure that the code snippet contains an error ?
The other aspect, please be careful, you are not allowed to expose in public details about the exam and because you acknowledge this (not expose details) before you start the exam.

Best Regards,
Mihai
Hi

The most easy way to understand this is : "the MDB does not have a client like the other beans (sless and sfull)". Only container interacts with the MDB and it do it after some very simplistic rules :
  • enroll the resource in transaction - for this only REQUIRES will fit
  • don't enroll the resource in transaction - for this only NOT_SUPPORTED will fit


  • by resource I mean the JMS resource.

    NEVER will cause an exception, to avoid this the container needs to call the MDB only outside of the transaction context. This will bound the container to a certain strategy (ugly design).
    REQUIRED_NEW can not be used because (according with 13.6.3.2 of EJB 3.0 Core specification) the transaction must be started before the involved MDB action listener method is called. The REQUIRED_NEW starts the transaction after the method was call.

    The only acceptable way when you may use : REQUIRED_NEW with a MDB is if the MDB is a timed object. Timed objects can use REQUIRED, REQUIRED_NEW, NOT_SUPPORTED.


    Best Regards,
    Mihai
    Hi

    Ear is the top level archive for the enterprise application. If you have time you may consult the chapter 20 - named "EJB-jar File" from the specifications (JSR220).
    The build methodology for this archive may depending on the underlying tools (IDE, maven, gradle, ant, etc) but the archive structure remains the same. In your case you need something like :
    my.ear:
  • project1-ejb.jar
  • project1-ejb.jar


  • After your log file I presume that you use netbeans so go in File->New project->Enterprise application. After you are ready with this select the fresh create enterprise application do right click choose "Add new module".


    Regards,
    Mihai.
    Hi Sasinda

    The ejb-class represents the bean corresponding class for the a given environment and the injection-* represents the injection applying point.
    More precisely, the ejb-class is used to declare entries in the bean context, all the bean instances from this type may use this entries (via JNDI calls) - please notice the "may use it"; there is no must this is just a declaration.
    The injection-target-class is used to specify the injection application point - it means inject this instance in this field.

    Even if both elements (ejb-class and injection-target-class) have the same meaning they are used in different contexts.

    If you dislike to see the "class" in two places you can remove the <ejb-class> element and use <remote> or <local> with the implemented interface.

    Regards,
    Mihai

    Hi,
    I think you deal with a deployment exception.
    Here are my tips : build a ear that contains both your projects, each project is a ejb-jar. Each ejb-jar must use @local/remote and @statefull/stateless or the equivalents in the deployment descriptor (ejb-jar.xml).
    If it fails please post your ear structure.

    Regards,
    Mihai


    Hi

    JBoss is a great piece of software but sometime he follws its own ways. The Glassfish is the reference implementation for the all the related JSRs so if you are a beginner start with Glassfish. More if you are a beginner start with Netbeans - this IDE brigs the Glassfish with - so it is grantee to with Glassfish.

    Regards,
    Mihai
    Yes.
    Both, JTA and RESOURCE_LOCAL describes transactions - for different purposes (see the upper post from Raf)

    Hi Fei,

    In the "container-managed entity manager" the container care about the life cycle for the involved resources (or more precisely the resource manager connection factory) and the application is focus only on the business. In the "application mode" the application (you can read here the developer) must care about the resource life cycle (e.g. it must close the factory), so in this case the application must focus on business and on resource life cycle.

    The JTA is only the transactional model.

    Regards,
    Mihai

    This is the classical "broke of interceptor chain" failure.