• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JPA,JPQL question

 
Isuru Samaraweera
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
Does JPA’s query language relies on a container to manage the persistence layer?

As per my understanding it is not.You can run JPA/JPQL as a standalone application without the support of a server.

Please clarify.


Thanks,
Isuru
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35279
384
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That is correct. JPA can be run outside a container. If it is run in a container, it can take advantage of services from there.
 
Isuru Samaraweera
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jeanne,
Thanks for the reply.Further clarification needed."JPA is supporting all the datamodels" right?

As far as I read JPA supports all the available data models.?

Thanks,
Isuru
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35279
384
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you mean by data model?
 
Isuru Samaraweera
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jeanne,
Let say "oo data model,relational data model etc".


Further I would like to clarify the notion "JPA render code that requires extensive SQL tuning when it comes to legacy databases"?

In my opinion this might be true because legacy sql code is written to gain maximum performance.And if you use JPA to use OO modelling
performance will be compromised and JPQL generated might be extravagantly slow.

What is your opinion on this?


Thanks,
Isuru
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35279
384
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Isuru Samaraweera wrote: "JPA render code that requires extensive SQL tuning when it comes to legacy databases"?

In my opinion this might be true because legacy sql code is written to gain maximum performance.And if you use JPA to use OO modelling
performance will be compromised and JPQL generated might be extravagantly slow.

You'd have to tune the JPSQL as well. Which is a pain compared to "normal" SQL because you have less control. But yes, an awkwardly designed database isn't going to map well to a JPA model.

I tend to use JPA for simple one to one mappings so this isn't a major issue.
 
Isuru Samaraweera
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jeanne,
Thanks for the reply.

So as a conclusion I am taking "JPA render code that requires extensive SQL tuning when it comes to legacy databases" as a valid statement.

Thanks,
Isuru
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35279
384
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Isuru Samaraweera wrote:So as a conclusion I am taking "JPA render code that requires extensive SQL tuning when it comes to legacy databases" as a valid statement.

Maybe. I would say that "sometimes JPA renders code that requires extensive SQL tuning." A lot of things in architecture aren't absolutes.
 
Isuru Samaraweera
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Jeanne for the reply
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic