Mellon Sun

Ranch Hand
+ Follow
since Feb 20, 2003
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Mellon Sun

Is there a possible someday we use Android as desktop OS?

I just started reading Pro Android 2.

I wish Android in action can give me a different perspective.
14 years ago
I use NetBeans IDE, so a beans.xml was automatically included in WEB-INF directory. I guess this is not the point.
I tried to replace the import declaration of SessionScope from javax.faces.bean.SessionScoped to javax.enterprise.context.SessionScoped and it worked.

Thanks for your help.
14 years ago
JSF
When I use @ManagedBean everything is ok:


When I use @Named instead, it is not ok anymore:



too many times the constructor method was called in each request.
14 years ago
JSF
I am reading the book Core Java Server Faces 3rd Edition.
There is a sample of JSF ajax feature and I tried it with NetBeans9.1 and GlassFish V3.
However only when I use @ManagedBean, it works well. If I use @Named annotation, it seems that the @SessionScoped annotation doesn't work.
Because I saw that the default constructor of User bean was called four times when I click the Login button and the getGreeting() cannot catch the filed "name"'s value.



14 years ago
JSF
Why not? If somebody win Nobel Prize, of course he want and need to know how many other people had win the same like him.



16 years ago
There is an doc in java.sun.com :

The Sun Certification and Team Performance: The Impact
on Application Developers
Sponsored by: Sun

Cushing Anderson Lisa Rowan
April 2008

which describes serveral perspective about how the certification impact the team performance.

But there is no infomation like "there are total xxx candidates took java certification exam".
16 years ago
I mean datas like how many people got the SCJP Certifications, how many people get all the certifications about Java Technology.

How they distribute in the world.
16 years ago
Fortunately, with SCEA5, I took the beta exam. There was no chance to make a mistake like that.
[ January 01, 2009: Message edited by: Mellon Sun ]
16 years ago
I have been pursuing the Java Technology Certification for years. Everytime before I took the exam, I prepared for it honestly. Today, when I am doing the exam, I find that most of the questions in the real test are "known".

I downloaded a pdf document, I treat it as a normal practice questions, but it looks like they are the real exam questions.

I suppose I could get a score between 50%-70%, but I got 93% easily. Almost all the 61 questions can be found in that document which has many questions.

I feel I cheated myself. Before, every time I finished my exam and passed, I edit my profile in Java Ranch to show my new certification proudly. But this time, I feel shame. I hate that doc, I wish I never find it at all. It makes me feel that I am a cheater.

[ December 27, 2008: Message edited by: Mellon Sun ]
[ December 28, 2008: Message edited by: Christophe Verre ]
16 years ago
I think it means javax.EJBContext.lookup()
For application managed entity manager, a EntityManagerFactory should be injected and get the entity manager via EntityManagerFactory.createEntityManager().
For container managed entity manager, it can be directly injected into a session bean.

So, can I say if an entity manager is injected into a session bean, then it should be a container managed one, and a container managed entity manager should be a JTA entity manager, then an injected entity manager in EJB must be a JTA entity manager but never can be a resource-local one?
Bingo! That point is the problem. I succeed after removing it.
<enterprise-beans>
<session>
<ejb-name>StatelessSBBean</ejb-name>
<ejb-class>com.mellon.StatelessSBBean</ejb-class>
<session-type>Stateful</session-type>
</session>
</enterprise-beans>

It works with the descriptor snippet above, the StatelessSBBean is annotated with @Stateless, how could I confirm the StatelessSBBean is running as an Stateful Session Bean exactly? After all, there is not a
method like "isStateless" or "getSessionType" exists.

And, anyone can cite a case need this?
For instance, there is a stateless session bean annotated with "@Stateless", can I override it to a stateful session bean via the deployment descriptor?

"Type-level, method-level, and field-level annotation can all be overridden by the deployment descriptor.", is this true?