This week's book giveaway is in the Java in General forum.
We're giving away four copies of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 and have ishori Sharan & Adam L Davis on-line!
See this thread for details.
Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!

mark ken

Ranch Hand
+ Follow
since Sep 01, 2004
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by mark ken

Hello Mark,
I did a test by using look-up method and objectFactoryBean to create bean2 in bean1(bean1 is singleton).
Both of them are working fine. So my question is that why don't use ObjectFactoryCreatingFactoryBean to create new bean in a singleton bean.
Can I use ObjectFactoryCreatingFactoryBean as a replacement for look-up method. The link you give me which mentioned ServiceLocatorFactoryBean, I guess it's the same thing with ObjectFactoryCreatingFactoryBean.

You are right,Message Driven pojo is a singlton bean. I'm using Message Driven pojo to handle the jms request, but one pojo is not enough in my project, I need to run some business process inside the jms listener(Pojo). And It takes some time to finish the business process.
So, I create multiple pojo in jms container.

Each Pojo need to create a new bean when the new jms data coming. But I can't decide which way should I use to create the new bean.(look-up method or objectFactoryBean) I guess maybe objectFactoryBean is better, because I don't need to use CGLIB.
Thank you for your reply.

[ November 04, 2008: Message edited by: mark ken ]
Hello Mark,
Thank you for your reply.
The reason I want to use lookup method to inject a bean to a non-singleton bean is that I need to create several jms listeners(non-singleton bean) in my application,each listener need to create new bean when it receive jms data from the Queue. jms listener beans are running in spring jms container.
If I use the normal injection, I couldn't get new bean each time when listener receive the data from Queue.
So, when I declare a look-up method in my listener bean, I can call this method to get a new bean each time.(look-up method can return me different instance each time , I have tested it.)
Of couse I also can use "ObjectFactoryCreatingFactoryBean" to inject a object factory into my listener bean.
But ,I want to know which one is better or which one is the correct way. Since both of them can do the same job.
Hello guys,
As Spring document mentioned . lookup method is used to inject a non-singleton bean into a singleton bean.
I want to know can I use it to inject a non-singleton bean into a non-singleton.
I mean can I declare an abstract look-up method in a non-singleton bean , called abstract MyBean createMyBean();
I link this lookup method to another non-singleton bean(Mybean), each time when I call this look-method
it returns me new instance of "MyBean" . I want to use this way to instead of "ObjectFactoryCreatingFactoryBean"

Can I use it like this way? thank you very much.
I don't know, I sent about 10 emails to test center and Sun education service during last 3 month, but they didn't tell me the reason.
Just told me , they submited a request to solve this problem. I guess it could be their database problem.

Originally posted by Muhammad Shafique:
Hi Mark,


28 weeks is too long! Why did you have to wait that much?


14 years ago
Dear guys:
After waiting 4 months (28 weeks), finally I got the test result:
I would like to thank all of you who give me the help during me preparing this test.

General Con: 100 100
Documentation: 70 70
OOD: 30 30
GUI: 40 28
Locking: 80 80
Data Store: 40 20
Network Server: 40 40
Total: 400 368

some information about my application design.
My assignment is URLBird ,I used three tier to design my application.
I found a bug in my locking section after submiting my assignment, but I mentioned it in my eassy exam, they still give me full mark.
I didn't use lockmanager, I implement locking function in Data class directly.
For gui part, I didn't provide server side gui, maybe that is the reason I got 12 point reduced

[ May 08, 2007: Message edited by: mark ken ]
[ May 08, 2007: Message edited by: mark ken ]
14 years ago
Yes, I booked with Prometric, I contacted with them for several times.
But it dones't help. They gave me same answer each time, just say: "we will contact with sun , we will let you know once you get scored".
I just sent another mail to Prometric two days ago, until now no any reply.I feel pretty bad.

Originally posted by Brian Kelly:
Did you book it through Prometric???
If so, contact them instead...
(my result took 4 weeks)...

[ March 14, 2007: Message edited by: Brian Kelly ]

Hell guys:
I had my scjd eassy exam on 4th Jan, Now it has been 9 weeks.
I'm still waiting my test result, I sent several mails to test center, but it doesn't work. The status of my exam result is still "pending"!

Is this normal for taking 9 weeks without result coming out?I want to know is there other method to complain this?
thank you so much.
I just passed this test with version 1.3.
It take me two month to prepare this exam, I don't have any ejb development experience before.
I only used the book [scbcd study kit] and ejbplus for mock test.(no other materials)
I have to say the real exam is much more easier than ejbplus's mock test.
I only got 70% mark by mock test of ejbplus.

Thank you all who provide helps for me.
please read following code, it say that deployer add role-link in ejb-jar file. But in my book, it say that assembler should define role-link.
which one is right? thank you.
<description>system admins have higher bonus rates.</description>
<role-name>admin</role-name> <-- This is given by the bean provider.
<!-- deployer adds the following line because she knows that the role name of system administrators is configured in her system as 'sysadmin';
I think above statement should be "remove entity from database", not remove the bean instance.
Because , the container will put bean instance into pool after user call remove.

am I right? thank you.
[ February 02, 2007: Message edited by: mark ken ]
in MDB bean, onMessage() method, if a system exception happended,
does container redeliver the message to message queue?
thank you.
but, my book say:for BMT session bean , developer need to make sure close transaction before the method end.
Why for CMT stateless session bean also need that?
I think for CMT bean we don't take care to end the transaction before the method end.

Originally posted by John Meyers:
Since its CMT the container will take care of the transaction boundary. So I guess thats true. With BMT however you better make sure you dont let transactions hanging around without closing them. Its legal to do so for stateful beans but not stateless beans.

a stateless CMT session bean has to end the transaction before the method in which it started ends??

is this true?
could BMP entity bean also be a CMT bean?
thank you!