"When work, commitment and pleasure all become one and you reach that deep well where passion lives, nothing is impossible."
"When work, commitment and pleasure all become one and you reach that deep well where passion lives, nothing is impossible."
Thanks for the link, but my issue is dosent the session facade pattern increase the complexity of development considering the different business/session layers we need to implement it.
I'm not going to be a Rock Star. I'm going to be a LEGEND! --Freddie Mercury
"When work, commitment and pleasure all become one and you reach that deep well where passion lives, nothing is impossible."
"When work, commitment and pleasure all become one and you reach that deep well where passion lives, nothing is impossible."
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
I'm not going to be a Rock Star. I'm going to be a LEGEND! --Freddie Mercury
Originally posted by Andres Gonzalez:
Can we use EJB for all types of intenet applications...
hmm.. we've got to be very careful when generalizing... That's the reason we have to check/state the requirements in a proper way. Otherwise we might end up in big trouble.
Originally posted by Pradeep Bhat:
Where do you think the trouble will be?
I'm not going to be a Rock Star. I'm going to be a LEGEND! --Freddie Mercury
Originally posted by Lasse Koskela:
If your application doesn't need the services an EJB Container provides, you could implement the same logical, easy-to-maintain structure for your application using plain old Java objects.
I'm not going to be a Rock Star. I'm going to be a LEGEND! --Freddie Mercury
Originally posted by Chris Mathews:
Just to add to what Lasse said... for a vast majority of J2EE Applications, EJB is unecessary.
"When work, commitment and pleasure all become one and you reach that deep well where passion lives, nothing is impossible."
Pradeep, I havent tried this but does EJB support threads?
BTW, Chris isnt it very late night for you right now?
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Originally posted by Tejpal Singh:
Pradeep, I havent tried this but does EJB support threads?
Originally posted by Pradeep Bhat:
You are not supposed to use threads.
"When work, commitment and pleasure all become one and you reach that deep well where passion lives, nothing is impossible."
Originally posted by Pradeep Bhat:
BTW, Chris isnt it very late night for you right now?
Originally posted by Lasse Koskela:
Pradeep, bartenders don't need sleep. We are able to refill our physical and mental batteries by means of telepathy (we have outsourced sleeping to other people).
Yes, but people will go to great lengths to avoid work. Right now I am trying to avoid packing for our impending move on Saturday.
quote:
Originally posted by Tejpal Singh:
Will there be multiple instances of the EJB or one instance would be used?
Originally posted by Pradeep Bhat:
Saturday.. are you from Australia? Lasse, I know it is morning for you.![]()
It is technically possible to pool instances of Stateful Session Beans but it doesn't make much sense and the context switch would kill performance.
So does this mean the EJB model may not work in a threaded environment?
What if i refer a EJB class from another synchronized method of my simple java class that extends Thread class?
How would the bean instance be served to multiple threads?
Will there be multiple instances of the EJB or one instance would be used?
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
From the thread:
Using JMS obviously causes some overhead when compared to "just launching a thread" but the benefit is that the client can proceed without waiting for the response. From the container's point of view, asynchronous communication is easier to "optimize for performance" as the response time is (usually) not an issue and the asynchronous processing may be scheduled for a lower priority thread.
"When work, commitment and pleasure all become one and you reach that deep well where passion lives, nothing is impossible."
Doesn't pooling stateful session bean violate SFSB life cycle.
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
The servlet calls my session bean "X" that refers an entity "A" that persists data to the database.
The servlet also calls another JMS class "Y" that calls the same session bean "X" to persist data using another entity "B" to another table.
The above model works for upto 100 simultaneous submits... however if the form is programatically submitted using a java class and using the same EJB and JMS objects, the system hangs due to the long queue of JMS data and eventually the connection is refused.
...
So how would you recomend me to do the same with JMS and EJB?
My other option is to conventinally submit data directly to database using a simple DAO object.
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Originally posted by Lasse Koskela:
Aren't you already using JMS and EJB? Or did you refer to something else than Entity Beans with "entity"? The fact that the too long JMS queue makes your system hang is something that simply should not happen. How long does the JMS queue get and how many MDBs do you have processing those messages (what's the pool size you configured for the MDB)?
"When work, commitment and pleasure all become one and you reach that deep well where passion lives, nothing is impossible."
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
"When work, commitment and pleasure all become one and you reach that deep well where passion lives, nothing is impossible."
"When work, commitment and pleasure all become one and you reach that deep well where passion lives, nothing is impossible."
Originally posted by Chris Mathews:
Just to add to what Lasse said... for a vast majority of J2EE Applications, EJB is unecessary.
The secret to creativity is knowing how to hide your sources.
Originally posted by Faisal Khan:
Chris,
I have never used EJBs and was considering building them into the application I work on, do you think I shouldn't because we have not felt any need for doing so. How can I determine whether I would need EJB for an app - is it matter of experience in architecting.
Thanks.
<i><b>- Dan Malks</b></i><br />Co-Author of <a href="http://www.corej2eepatterns.com" target="_blank" rel="nofollow">Core J2EE Patterns: Best Practices and Design Strategis</a>
- <b><i>Deepak Alur</i></b><br />Co-Author of <a href="http://www.corej2eepatterns.com" target="_blank" rel="nofollow">Core J2EE Patterns: Best Practices and Design Strategis</a>
Please do not shoot the fish in this barrel. But you can shoot at this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
|