Skip to content

Add proxy hints for org.hibernate.SessionFactory & org.hibernate.Session #29138

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
christophstrobl opened this issue Sep 12, 2022 · 4 comments
Closed
Assignees
Labels
in: data Issues in data modules (jdbc, orm, oxm, tx) theme: aot An issue related to Ahead-of-time processing type: enhancement A general enhancement
Milestone

Comments

@christophstrobl
Copy link
Member

christophstrobl commented Sep 12, 2022

The following hints are required to run jpa with hibernate.

{
  "interfaces": [
    "org.hibernate.SessionFactory",
    "org.springframework.orm.jpa.EntityManagerFactoryInfo"
  ]
},
{
  "interfaces": [
    "org.hibernate.Session",
    "org.springframework.orm.jpa.EntityManagerProxy"
  ]
}

See: spring-aot-smoke-tests#113

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Sep 12, 2022
@sdeleuze
Copy link
Contributor

@snicoll @jhoeller Do they seem relevant proxy hints we can't infer and that we should configure?

@sdeleuze sdeleuze added in: data Issues in data modules (jdbc, orm, oxm, tx) type: enhancement A general enhancement theme: aot An issue related to Ahead-of-time processing labels Sep 13, 2022
@jhoeller
Copy link
Contributor

jhoeller commented Sep 13, 2022

The combination of SessionFactory and EntityManagerProxy seems odd, is that really necessary in that combination?

The other two are obviously the EMF/EM proxies that we create in our JPA setup arrangement. For the EMF proxy, we might be able to infer it from a narrowed AbstractEntityManagerFactoryBean.getObjectType() implementation. For the EM proxies, I'm not quite sure where to infer those since we typically create those on demand (i.e. not as beans).

@christophstrobl
Copy link
Member Author

@jhoeller good catch - thanks - my bad, yes we can do without that one. I'll update the description

@sdeleuze sdeleuze removed the status: waiting-for-triage An issue we've not yet triaged or decided on label Sep 13, 2022
@sdeleuze sdeleuze self-assigned this Sep 13, 2022
@sdeleuze sdeleuze added this to the 6.0.0-M6 milestone Sep 13, 2022
@sdeleuze
Copy link
Contributor

Ok let's configure hints for those for M6 since that's the last JPA blocker, I will create a follow-up issue for RC1 to see if we can infer them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: data Issues in data modules (jdbc, orm, oxm, tx) theme: aot An issue related to Ahead-of-time processing type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

4 participants