• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Greetings! - "J2EE Performance Testing" book promotion

 
Author
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Java Ranchers!
My name is Ted Osborne, and I'm here to help with this week's book promotion. I am one of the coauthors of "J2EE Performance Testing with BEA WebLogic Server". In particular, I contributed the EJB performance testing material in the book.
In preparing the EJB material for the book, we chose to approach it from an EJB design pattern perspective, and to do that I created the "JazzCat" sample application and accompanying servlet test cases that measure performance of a few of the "meat and potato" EJB design patterns. I found this project extremely interesting, and the testing yielded some surprising results.
For example, if I were to ask you what kind of performance gain you might enjoy from applying the Session Facade pattern with everything running in the same server instance, what would you guess? Well, in one of our tests, we realized an 80% reduction in response time! That one surprised me, because in that test case we had eliminated the remote calls and data marshalling that are often cited primary motivators for using the pattern!
So to kick things off, I invite you to share your surprises (good and bad) that you've encountered with performance testing and EJB applications. Or anything else related to performance testing EJBs or using EJB design patterns.
I'll be hanging out here over the next couple of days, and I look forward to some interesting questions and discussion. "Operators are standing by..."
Looking forward to your posts!
Thanks,
Ted Osborne
Co-author of "J2EE Performance Testing with BEA WebLogic Server" from Expert Press by Peter Zadrozny with Philip Aston and Ted Osborne.
[email protected]
http://www.tedosborne.com
 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Can you explain the performance difference
between standard SQL and EJB-QL.
Gayan Balasooriya
Sun Certified Java Programmer
Sun Certified Web Component Developer for J2EE
 
Ranch Hand
Posts: 321
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ted,
Welcome to the ranch!!! great to have u guys here for the promotion.Well i would like you to lend some insight as to how to make an intelligent call when one need to decide out of the following :
1)Plain JDBC v/s Entity beans
2)BMP v/s CMP when in terms of development time.when would we go for BMP's
3)Using 3rd party Persistence v/s Writing portable EJB-QL's
4)What to use as a wrapper an MDB or a Session Bean over Entity Beans in Session Facade.
5)How do we test performance issues in case of BMP/CMP.

Rishi
SCJP,SCWCD
 
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Ted,
Can you tell me how can take part in Java Ranch Give Away Book pooling.
Regards
Awais Bajwa
 
Author
Posts: 350
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Can you explain the performance difference
between standard SQL and EJB-QL.


I find code that get's generated from EJB QL can be really ineffecient SQL/JDBC code. But....
Most app servers will cache the entity beans so you don't hit the DB everytime you hit the site. We found that EJB CMP with caching turned on improved our performance.
I think you should look into EJB CMP. It is very productive. There is a link to serveral tutorials I wrote on EJB CMP included in my signature.
Gee... I hope I win a free copy of this book. It sounds really good.
 
Rick Hightower
Author
Posts: 350
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Hello Ted,
Can you tell me how can take part in Java Ranch Give Away Book pooling.
Regards
Awais Bajwa


You just did.
 
sharp shooter, and author
Posts: 1913
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ted,
Welcome to JavaRanch! Thanks for coming along to answer everybody's questions and I hope you have a great week.
Cheers
Simon, Bartender (moderator) of "J2EE and EJB" forum
p.s. only members with valid names will be eligible for the book giveaways.
 
Ranch Hand
Posts: 2713
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ted. Thanks for particapting.
I have a quick question regarding your book. I see it has WebLogic in the title... is it really geared towards performance testing and tuning in regards to WebLogic? Or is the book's content more application server agnostic with WebLogic used as an example?
 
Ted Osborne
Author
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Chris,
We actually began the project with a "server-agnostic" POV, but scaled back as deadlines approached. As a result, I think most of the examples can be easily ported to another platform. I can say that, at least for the EJB examples I did, there isn't any WebLogic-specific Java code--only a couple of vendor-specific deployment descriptors.
I'd be very interested to hear about anyone running the examples on another platform.
 
Ranch Hand
Posts: 445
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch ,Ted!MAybe u can help us newbies out.
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i have a question,
in weblogic 6.1 sp2 , can i load the startup class before any bean is deployed, becasue iam facing problem in doing so.
i think this is directly poss in sp3. pls give me soln for sp2.
 
Ted Osborne
Author
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Rick Hightower:

I find code that get's generated from EJB QL can be really ineffecient SQL/JDBC code. But....
Most app servers will cache the entity beans so you don't hit the DB everytime you hit the site. We found that EJB CMP with caching turned on improved our performance.
I think you should look into EJB CMP. It is very productive. There is a link to serveral tutorials I wrote on EJB CMP included in my signature.
Gee... I hope I win a free copy of this book. It sounds really good.


I agree with Rick here, and our own tests seemed to back that up. In just about every turn, the EJB container kicked our butts when compared to "doing it by hand", even in the simplest cases.
I think you will alway be able to outperform the container with app-specific tuned SQL queries, but at what cost? In doing so, you're likely to surrender a lot of productivity, extra code to manage, and perhaps portability. Another interesting side-effect I found is that, because the container has several services in it's arsenal (pooling, TX management, etc.), while I might beat the container's SQL generation in writing my own suped-up query, some other required service would come into play that I had to either address in my code, or surrender and let the container do its thing.
After doing this project, I'm now a big fan of CMP/CMR. This is not to say there aren't cases that warrant rolling your own, but if I had to generalize, I'd side with the container doing the heavy lifting.
Ted
-------------
Ted Osborne
Co-author of J2EE Performance Testing with BEA WebLogic Server
[email protected]
http://www.tedosborne.com
[ October 16, 2002: Message edited by: Ted Osborne ]
 
Ted Osborne
Author
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Rishi Singh:
...Well i would like you to lend some insight as to how to make an intelligent call when one need to decide out of the following :
1)Plain JDBC v/s Entity beans
2)BMP v/s CMP when in terms of development time.when would we go for BMP's
3)Using 3rd party Persistence v/s Writing portable EJB-QL's
4)What to use as a wrapper an MDB or a Session Bean over Entity Beans in Session Facade.
5)How do we test performance issues in case of BMP/CMP.

Rishi
SCJP,SCWCD


Hi Rishi,
I'm hesitant to say "thanks for the great question" because it is "great" in both senses: "great=good" question that interests a lot of us, and "great=large" question that could (should?) be answered with book unto itself! LOL
In the book, we touched on some of these issues you raise, but I think in all those cases you mention, and I tried to illustrate this in the book, one precept is generally applicable: your best guide to make the call is by performance testing early on. The tests themselves are not difficult to create, and there are a bunch of tools out there to support this activity (I like Bean-test), but in the end the results are application-specific. In each of the choices you cite, you could create a model where either wins over the other. Creating a simple model early on, one that reflects what you have in mind for a design, and testing it, is IMHO the best way to make the call in chooing one technology/design over another. The model and test results help guide your decision, and also serve as a great communication tool.
In making such decisions, one thing I would recommend (I think I alluded to this in a previous post), is to also keep in mind the many "tangential" factors that can come into play. For example, you may create a model and run tests that show BMP to yield better performance, but you must also consider the cost of extra coding, more tedium in design, greater code maintenance burden, portability, etc. These other factors are often not trivial.
I'd like to hear what others think about this...
Ted
 
Ranch Hand
Posts: 336
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ted and welcome,
I am just listening here, as this stuff is totally foreign to me.
Just wanted to comment that you are not a greenhorn
Cheers,
Leslie
 
Sheriff
Posts: 7001
6
Eclipse IDE Python C++ Debian Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just wanted to comment that you are not a greenhorn
Ted's now been "upgraded" to Author status.
 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Good looking book...I had it in my hand just the other day. Did not look at it long enough to check if your tests included using Container Managed Relationships and showed how they effect performance.
Just curious.
 
Chris Mathews
Ranch Hand
Posts: 2713
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ramjet,
Thanks for joining JavaRanch, but could you take a quick look at the naming policy and edit your profile accordingly.
Sorry Simon. I was bored so I decided to do your job.
 
Rick Hightower
Author
Posts: 350
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


After doing this project, I'm now a big fan of CMP/CMR.


Me too...


This is not to say there aren't cases that warrant rolling your own, but if I had to generalize, I'd side with the container doing the heavy lifting.


I agree. I only use JDBC when CMP/CMR and EJB QL wont work. I find it worked out for 85% to 95% of our persistence layer needs. Mostly it breaks down when we are doing fancy reports with really complex joins, then it is better to resort to JDBC via DAO and Stateless Session Beans.
Plus when you combine EJB CMP 2.0 with XDoclet it is very productive and easy to develop. Too bad when most people think about CMP they think about EJB 1.1. EJB 2.0 CMP is very useful.
I wrote a EJB 2.0 CMP tutorial that is in my bio... if anyone wants to learn more about EJB 2.0.
 
Rishi Singh
Ranch Hand
Posts: 321
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Rick,
--------------------------------------------------
Originally posted by RickHightower
I agree. I only use JDBC when CMP/CMR and EJB QL wont work. I find it worked out for 85% to 95% of our persistence layer needs. Mostly it breaks down when we are doing fancy reports with really complex joins, then it is better to resort to JDBC via DAO and Stateless Session Beans.
--------------------------------------------------
when we need to acess data involved in three or more tables it becomes pretty hard to do the mapping and write EJB-QL while we can optimize the query and use JDBC, somehow i feel using BMP with JTA for transaction demarcation and JDO for data acess is still the best option , offcourse it takes time to maintain and debug but in a way the control seems to be in the developers hand and he is not left to the mercy of the Container managed services.

Rishi
SCJP,SCWCD
[ October 17, 2002: Message edited by: Rishi Singh ]
 
Rishi Singh
Ranch Hand
Posts: 321
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ted,
I would like to compare entity bean and JDO over the following points:
1) Entity beans were never meant to be 'real' domain objects, though we can use entity beans as references across the application still the benefits of inheritance is lost(infact there are many points where EJB violates pure OO concepts)JDO can make use of inheritance to the best possible manner as they are plain java objets.
2) The class dependencies in case of a Entity bean is five(home,remote,bean implementation + 2 superinterfaces ) whereas JDO needs only two class ( plain .java class, and one primary key class)
3) The building and the deployment process is almost the same for both
4) In case of Entity bean we cant have benefits of dynamic query as we need to write the EJB-QL in deployment descriptors, whereas JDO's can take the leverage of dynamic query .
These are some of the points which i realised when taking a close look at both and i feel BMP/JTA/JDO is the way to go.would like to hear from
Ted about this....
Rishi
SCJP,SCWCD
 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Err...
I'm a novice in Java... Haven't learn anything about EJB yet ... can I participate in this give away ?
 
Rishi Singh
Ranch Hand
Posts: 321
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
In order to acess multiple entity bean and thier data we encapsulate all the entity bean properties which we want into an object and then get tht object through serialization in one network call, now if i want to send data in bulk to update mutiple entity bean in one network call, and the entity in between themselves have CMR relation, is it possible to update mutiple tables in one call to the database.which pattern does allows me to do so.
Rishi
SCJP,SCWCD
 
Rishi Singh
Ranch Hand
Posts: 321
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
Following are the limitataions of CMR which we encountered and trying to get a work-around.
CMR is fine if you are dealing with small numbers of objects in relationships. It does not work when numbers become large.If we want to avoid doing CMR, than it would be much simpler to put finder methods in your beans, and then implement the relationship methods manually using them. For example, if you have a Person who has a relationship to a PhoneNumber, we would have:
PhoneNumberHome:
public List findByPersonId(long personId);
Person:
public List getPhoneNumbers();
PersonBean:
public List getPhoneNumbers()
{
// assume phoneNumberHome was init'ed previously
return phoneNumberHome.findByPersonId(getId());
}
Then, PhoneNumberBean has the repsonsiblity to determine how to get the right list of PhoneNumbers (possibly using a DAO, or possibly using CMP, or whatever it wants).
This seems much simpler and easier to understand. Plus, there is less coupling between the two entities involved in the relationship. The problem with finders is that business logic needs to be implemented in them, and that EJB-QL is a poor substitute for the processing power of java.
if you want to perform complex business-logic processing to decide what phone numbers are relevant? What if the person had 5000 phone numbers, and you needed to look at the data in all of them, maybe compare their data to another datasource? With CMR, you would need to instantiate all 5000 phone numbers as entity beans.Is there a workaround...would like to hear from others...
Rishi
SCJP,SCWCD
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ted,
First, thanks for the free presentation on J2EE performance at the New England Java User's Group (http://www.nejug.org) last month. I got two colleagues to attend in addition to myself and we all learned things about the design patterns that we hadn't thought of. I liked how how you drilled down on why certain design patterns gave different performance than we would have expected.
Second, we have copies of your "J2EE Performance Testing" book and your earlier book "Professional EJB" around the office. Both books are good reads. It it rare to find books or even chapters that focus directly on J2EE and middleware testing.
Are you presenting at any other Java user's groups in the near future? A few of my colleages in San Jose would like to attend if you are out that way!
-jason
 
Rick Hightower
Author
Posts: 350
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


2) The class dependencies in case of a Entity bean is five(home,remote,bean implementation + 2 superinterfaces ) whereas JDO needs only two class ( plain .java class, and one primary key class)


Only one class file is needed if you use XDoclet.
Some containers are starting to use XDoclet so you only have to deploy one, and the container does the rest.
 
Rick Hightower
Author
Posts: 350
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

4) In case of Entity bean we cant have benefits of dynamic query as we need to write the EJB-QL in deployment descriptors, whereas JDO's can take the leverage of dynamic query .


I agree that this is an area where EJB CMP lacks. I would consider using JDO for dymanic queries.
JBoss and WebLogic have the ability to do dynamic queries with EJB CMP 2.0, but there is no standard way to do dynamic queries.
In the applications that I write I don't need to do many dynamic queries... I usually try not to allow the end users to enter in SQL statements.
I am very happy with defining finder's and selects in the deployment descriptor. I find it very productive, and it is a lot less code than doing the same thing in JDO.
I find JDO a bit cumbersome in the way it handles building queries.
[ October 17, 2002: Message edited by: Rick Hightower ]
 
Rick Hightower
Author
Posts: 350
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


1) Entity beans were never meant to be 'real' domain objects,


really... can you explain this.


though we can use entity beans as references across the application still the benefits of inheritance is lost(infact there are many points where EJB violates pure OO concepts)


EJB is not perfect. And I've heard that argument before. I think it is an overstatement to say EJB violates pure OO. An Entity can extend another, and it is nice to seperate the interface from the implementation.


JDO can make use of inheritance to the best possible manner as they are plain java objets.


I agree. This is one of the advantages of JDO, but with this flexibility comes some added complexity. Since Entity beans are in the container they are managed by the container, and they can notify of lifecycle events like ejbPostCreate. This is something that JDO is missing.
EJB 2.2 or 2.3 when EJB CMP is merged with and built on top of JDO is when I will embrace JDO.
Besides EJB CMP comes with the container. JDO does not. You have to purchase it in addition to the container.
 
Rick Hightower
Author
Posts: 350
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


when we need to acess data involved in three or more tables it becomes pretty hard to do the mapping and write EJB-QL


It seems easy to me. We used it in production and it worked like a charm. I've used JBoss, WebLogic and Resin. I wont like and say EJB CMP is perfect, but it is easy to do what you are describing. EJB QL is easy and allows you to naviage relationships easily.
EJB QL Tutorial part 3
EJB QL tutorial part 4
 
Ted Osborne
Author
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Ramjet:
Good looking book...I had it in my hand just the other day. Did not look at it long enough to check if your tests included using Container Managed Relationships and showed how they effect performance.
Just curious.


As a matter of fact, I did take a little side-trip down the CMR road as part of the Data Access Object (DAO) pattern performance tests in the book, comparing CMR with bean-managed relationships and with Session Bean/DAO data access.
Ted
 
Ted Osborne
Author
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Rishi Singh:
Hi Ted,
I would like to compare entity bean and JDO over the following points:
1) Entity beans were never meant to be 'real' domain objects, though we can use entity beans as references across the application still the benefits of inheritance is lost(infact there are many points where EJB violates pure OO concepts)JDO can make use of inheritance to the best possible manner as they are plain java objets.
2) The class dependencies in case of a Entity bean is five(home,remote,bean implementation + 2 superinterfaces ) whereas JDO needs only two class ( plain .java class, and one primary key class)
3) The building and the deployment process is almost the same for both
4) In case of Entity bean we cant have benefits of dynamic query as we need to write the EJB-QL in deployment descriptors, whereas JDO's can take the leverage of dynamic query .
These are some of the points which i realised when taking a close look at both and i feel BMP/JTA/JDO is the way to go.would like to hear from
Ted about this....
Rishi
SCJP,SCWCD


I hear this Entity Bean CMP vs. JDO debate quite a bit, although I confess I don't know the JDO model as well as I should. On the surface, it seems to me like a tradeoff between "richer functionality" (JDO) and the portability & services of a component model (CMP).
Check out the following FAQ by Mark Hapner and Craig Russell:
http://java.sun.com/products/jdo/JDOCMPFAQ.html
They seem to suggest that the two models are not necessarily mutually exclusive:

A reason to use Entity beans to wrap JDO classes (using a BMP delegate strategy) is to allow the JDO classes to be remotely accessible directly, rather than through a session facade. This implies a higher degree of autonomy and functionality in the JDO classes.

 
Ted Osborne
Author
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Rishi Singh:
1) Entity beans were never meant to be 'real' domain objects, though we can use entity beans as references across the application still the benefits of inheritance is lost(infact there are many points where EJB violates pure OO concepts)JDO can make use of inheritance to the best possible manner as they are plain java objets.


My friend Dan O'Conner wrote a nice article on inheritance and EJBs you might want to check out:
Inheritance & EJBs
There was also a recent article on EJB polymorphism and inheritance by John Musser and Bernard Lenz in the October Java Developer's Journal (Vol. 7, Issue 8)
As an aside, I can recall encountering EJB inheritance back in the EJB 1.0 days when I worked on the Bean-test team, and was troubleshooting a problem at a customer site--they were using a lot of inheritance in their EJBs and it knocked our test code generator for a loop! Of course we fixed the generator, but that's how I learned about EJB inheritance... (the hard way!)
 
Ted Osborne
Author
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by EJB Testing:
Are you presenting at any other Java user's groups in the near future? A few of my colleages in San Jose would like to attend if you are out that way!
-jason


Thanks for the kind words, Jason. I don't currently have any plans that take me out your way, but I might be doing a web event for Empirix in November, and if I do I will cover some of the design pattern material I did for the book (and at NEJUG). Keep an eye on my web site; I'll post details there soon.
Ted
 
Rick Hightower
Author
Posts: 350
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ted,
It was nice virtually meeting you. If I don't win your book, which I wont of course, I will buy it.
I checked out your website, and I see that you are in MA. I don't get up there very often, but if you are ever in Tucson AZ be sure to come speak at the Tucson JUG.
 
Rishi Singh
Ranch Hand
Posts: 321
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Rick,
when i say entity beans are not meant to be real domain objects
i mean the very nature of it i.e 1 entity mapping to 1 row in a table, in some scenarios it may not be a logical thing to instantiate 1000 or more entity beans if i have that number of rows and if the need be so, this is what i had explained in my earlier post.
I am going through your Xdoclet tutorials and it seems an intresting read, whether weblogic7.0 support this.?
Rishi
SCJP,SCWCD
[ October 18, 2002: Message edited by: Rishi Singh ]
 
Rishi Singh
Ranch Hand
Posts: 321
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Rick Hightower
---------------------------------------------------------------------------------------------------
In the applications that I write I don't need to do many dynamic queries... I usually try not to allow the end users to enter in SQL statements.
----------------------------------------------------------------------------------------------------
Well what if the application depends upon alot of real time dynamic data,how can u restrict ur end-user the leverage of not getting real-time data.The only thing which i could visualize is this may not be the case with EJB 2.2 with CMP built on top of JDO
Rishi
SCJP,SCWCD
 
Rishi Singh
Ranch Hand
Posts: 321
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Rick Hightower wrote
----------------------------------------------------------------------------------------------------
I find JDO a bit cumbersome in the way it handles building queries.
----------------------------------------------------------------------------------------------------
You can use the JDO query facility, which is quite simple.Here i would like to mention one more point, the entry point to a entity bean is the home interface, which is different for different entity-context whereas in case of JDO we have one single entry point the Persistence Manager.
Rishi
SCJP,SCWCD
 
Rick Hightower
Author
Posts: 350
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


I am going through your Xdoclet tutorials and it seems an intresting read, whether weblogic7.0 support this.?


Yes it does. Well... rather it works with WebLogic 7.
Go to the following link....
http://www.rickhightower.com/ejbcmpcmrtut.html
At the bottom of the page is a link to source code in a zip file for WebLogic 7. The source code in this file has an Ant Script that runs XDoclet. This example works with WebLogic 7.
 
Rick Hightower
Author
Posts: 350
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Well what if the application depends upon alot of real time dynamic data,how can u restrict ur end-user the leverage of not getting real-time data.


Your definition of a dynamic query may be different than mine. When I think of a dynamic query, I think of arbitrary SQL like select statements instead of precanned ones.
Can you explain how JDO supports "real time data" differently than EJB CMP?
It sounds like you are talking about cached data problems. Both JDO and EJB CMP have implementations that support caching so one would not be better than the other.
Basically, I am not sure I understand you so I cannot respond very well.
 
Rick Hightower
Author
Posts: 350
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


it may not be a logical thing to instantiate 1000 or more entity beans if i have that number of rows and if the need be so, this is what i had explained in my earlier post.


EJB CMP does not do this typcially. It gets a number of primary keys. As you request the item, it loads it. Some containers can prefetch x amount.
Can you explain how JDO would handle this better?
It seems like JDO and EJB CMP handle this very similar.
 
Rishi Singh
Ranch Hand
Posts: 321
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
when the data in the underlying database cant be mapped to the entity graph, what would be the ideal approach if we are using CMP/CMR 2.0.Do we need to keep hepler dependent objects or i should put it this way whats the solution with
EJB2.0 CMP/CMR
Rishi
SCJP,SCWCD
 
Are you okay? You look a little big. Maybe this tiny ad will help:
New web page for Paul's Rocket Mass Heaters movies
https://coderanch.com/t/785239/web-page-Paul-Rocket-Mass
reply
    Bookmark Topic Watch Topic
  • New Topic