Skip to content
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

Allow injection of EMF into CDI beans #23

Closed
wants to merge 1 commit into from

Conversation

stuartwdouglas
Copy link
Member

No description provided.

@stuartwdouglas
Copy link
Member Author

This enables support for injecting the EntityManagerFactory, with support for the EntityManager still to come (it requires the TransactionalEntityManager stuff to be ported from WildFly).

import javax.persistence.EntityManager;
import javax.persistence.PersistenceUnit;

public class JpaProducer {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that one a not yet working area?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will fix this



@RunWith(GraalTest.class)
public class JPABootstrapITCase extends JPABootstrapTestCase {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like this new class is doing the same job as JPABootstrapInGraalITCase. Is that correct? If yes I will remove JPABootstrapInGraalITCase.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, I thought I had, it I must have missed commiting the deletion.

}
}
}
knownUnitNames.remove(""); //TODO: support for the default PU
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any specific reason you remove it now?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because I don't have a way to figure out what the default PU is. To do this I need to move the persistence.xml processing earlier (and basically have it done by shamrock instead on hibernate-protean).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interestingly, I will need to have Shamrock be fed persistence.xml info too to fix John's class visibility problem. I'm hoping Hibernate can feed this back to me instead of having to reproduce part of the logic in Shamrock.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hibernate-protean already handles this parsing, and with some changes it should be possible to make it work in Shamrock. The results of the parsing look like they are bytecode serializable so it should be easy to make them get parsed at build time, to remove the need to load XML parsers at runtime.

This would require some changed in hibernate-protean though, as at the moment there is no way to control the order.

@cescoffier cescoffier added this to the 0.1.0 milestone Jan 21, 2019
maxandersen referenced this pull request in maxandersen/quarkus Apr 20, 2020
when committed then issues with label `kind/epic` will on
open/edit/labeling have
a section like:

```
<!-- EPIC:DATA
       #23 quarkusio#445 #44
-->
```

Expanded to a task list with link to issue + title header.

the checkbox will reflect wether open or closed at the time of
edit of the issue.
(we can potentially improve that in future)

Includes update to epic template and disables debug printing as
to speed things up a bit.
gytis referenced this pull request in gytis/quarkus Apr 22, 2020
when committed then issues with label `kind/epic` will on
open/edit/labeling have
a section like:

```
<!-- EPIC:DATA
       #23 quarkusio#445 #44
-->
```

Expanded to a task list with link to issue + title header.

the checkbox will reflect wether open or closed at the time of
edit of the issue.
(we can potentially improve that in future)

Includes update to epic template and disables debug printing as
to speed things up a bit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants