today i passed with 76%. 70% was minimum, out of 87 questions.
1. ~5 questions are about security - HttpServletRequest + web.xml configuration
2. ~10 questions about composite components
3. 2 questions about custom components, without taglib descriptors
4. ~6 non-trivial facelets templating questions
5. ~4 questions about packaging JSF application, including taglib descriptors in WEB-INF
6. 10-15 questions about converters and validators - all you can think of
7. ~4 questions about GET requests (viewParams, h:link, hutputLink etc.)
8. ~5 questions about navigation, simple and bit harder ones
10. One question about PhaseListener, one about <h:graphicImage>, one exclusively about @Inject (WTF?), one about ui:debug
11. Few about Locale, some combined inside questions about converters
12. 10,15,20 questions "What is best practice" or "What scope would you use" - not that easy!
13. ~5 questions about actionListeners
14. 0 (zero) questions about ManagedProperty and ViewScope
15. 3 questions about datatables
16. few questions about <h:selectOneMenu> and <h:selectManyMenu>
17. few questions about lifecycle - "in what phase would you do this", "what phases are skipped if you do this" etc.
18. There were no questions about JSF 2.2 stuff (flowscope, statless view, HTML5 passthrough etc.)
At least half questions were verbose. I tried to follow advise from some people here who said, read answers first - it didn't help me much, maybe with 1 or 2 questions.
With few questions, i didn't realy understand what they wanted to ask, to be honest.
I learned from Core JSF, Java EE6 tutorial, BalusC @ stackoverflow + blog, and JSF 2.0 specification.
I forgot to mention - i think you should stop task that you are about to create when application start because if applicition don't stop "normaly" task will "live on" so when you start application you will have 2 tasks actualy.
considering the circumstances i was forced to find another solution for automatic calling EJB method. Unfortunately this was, for my opinion, less elegant and more limited solution.
I'll write short tutorial for how set WebSphere scheduler for all of you who got need to use it.
So here it is, using EJB 3.0 and WebSphere 7
1) Set scheduler in WebSphere console (you'll need database connection set as well, because scheduler automaticly creates few tables for managing tasks)
Go to resources -> schedulers -> new
Set JNDI name by which you'll call Scheduler from your application (in this example, it will be sched/testScheduler), and ofcourse choose database conneciton.
Poll interval - i'm not sure what is purpose of it because i set interval for tasks in application, but anyway i set it to 30min.
Table prefix - i guess choose whatever you prefer
Now after you created new Scheduler, select it in table (resources -> schedulers) and click 'Create tables'.
2) EJB part - i created stateless session bean and implemented com.ibm.websphere.scheduler.TaskHandler with all it's methods. Then i removed @Override annotations from implemented methods, and removed "implements com.ibm.websphere.scheduler.TaskHandler" part of code.
Ofcourse, now i had to tell in ejb-jar.xml that my bean will implement com.ibm.websphere.scheduler.TaskHandler (as remote) and com.ibm.websphere.scheduler.TaskHandlerHome (as remote home):
Finally, here is code for setting and canceling tasks for particular scheduler (i call it in contextListener when application starts/stops)
So as you can see, taskInfo.setTaskHandler(home) is telling what bean will execute every time task is called.
i can't access test environment that easy so i'll just have to wait couple of more days...But i can tell you that timer was set properly after application was deployed (here's the original log):
1st println is 1st line in contextInitialized method.
2nd println is after setting Calendar to next day in 3 A.M. in contextInitialized method.
3rd println is from EJB in method setNewTimer, when called from contextInitialized, after createTimer method.
I think i'll try to set interval to 5 minutes to see how it goes...And update to 22.214.171.124 as soon as possible.
Also, i get this XA exception every now and then in logs (on test env.)...maybe that could be reason for timer not working, who knows.
I am using contextListener to set EJB timer when application starts. Then, @Timeout method should be executed every 24 hours. On application stop timers are canceled.
I'm working with EJB3.0 and WebSphere Application server 126.96.36.199.
On my developing environment everything works fine, but on test environment @Timeout method is not called altough timer IS set in contextListener. I have exactly nothing in my logs at the timeout (test environment is on 188.8.131.52).
Any suggestions what could be reason for this behaviour besides different versions? I checked differences between these two versions but i haven't noticed anything related to EJB timers.
The problem is, our customer would like fancy solution. I would like to know is it possible to do that kind of refreshing/updating?
In my actual problem, i'd need to update few tables on page after new database update. Can i use ajax with jsf1.2?