• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JPA,JPQL question

 
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What do you mean by data model?
 
Isuru Samaraweera
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Jeanne for the reply
 
reply
    Bookmark Topic Watch Topic
  • New Topic