ejb3 entity view...where oh where are you!

Looking over the beta 'new features' document, I was amazed and astounded to see a rather pretty ejb3 entity diagram showing.

Now, I have some ejb3 entities, as it happens, with many relationships between them. I cannot for the life of me though figure out what I need to do to see a pretty picture of it all! I have an ejb module, with contains ejb2 session beans in front of ejb3 entity beans. Maybe this is preventing me from seeing the lovely new diagrams?

0
8 comments
Avatar
Permanently deleted user

Hello Hani,

It's available in "Java EE: Structure" view - select persistence unit,
press F4 (or click RMB and select "Edit").

Regards,
Gregory Shrago

Hani Suleiman wrote:

Looking over the beta 'new features' document, I was amazed and astounded to see a rather pretty ejb3 entity diagram showing.

Now, I have some ejb3 entities, as it happens, with many relationships between them. I cannot for the life of me though figure out what I need to do to see a pretty picture of it all! I have an ejb module, with contains ejb2 session beans in front of ejb3 entity beans. Maybe this is preventing me from seeing the lovely new diagrams?

0

I don't see any persistence units showing up there, just ejb modules.

0
Avatar
Permanently deleted user

Hani Suleiman wrote:

I don't see any persistence units showing up there, just ejb modules.


1. EJB Module should have persistence.xml set up in "Module
Settings"/"Ejb Module Settings" tab.
2. persistence.xml should have at least one persistence unit

1 & 2 can be achieved by "create new persistence unit" action on EJB
module tree node in Java EE view.

Then persistence units will be present in Java EE view under the
corresponding EJB module node.

Regards,
Gregory Shrago

0

Ok, doesn't work for me. I manually add persistence.xml (it should have been autodetected, for one thing), and I get an exception. Filed as #71670. The exception will happen over and over again until I remove persistence.xml.

0
Avatar
Permanently deleted user

Hani Suleiman wrote:

Ok, doesn't work for me. I manually add persistence.xml (it should have been autodetected, for one thing), and I get an exception. Filed as #71670. The exception will happen over and over again until I remove persistence.xml.


Fixed, thanks.
As a workaround set "exclude-unlisted-classes" to false in persistence.xml.

Regards,
Gregory Shrago

0
Avatar
Permanently deleted user

Hani Suleiman wrote:

Ok, doesn't work for me. I manually add persistence.xml (it should have been autodetected, for one thing), and I get an exception. Filed as #71670. The exception will happen over and over again until I remove persistence.xml.


Fixed, thanks.
As a workaround set "exclude-unlisted-classes" to false in persistence.xml.

Regards,
Gregory Shrago

0

Is there any chance of reworking this? It is possible for example to deploy persistence units outside of an ejb module. I could have a jar with a META-INF/persistence.xml in it and it'd be slurped up by any JPA implementation. Ideally, this view would be decoupled from EJB, and I'd just be able to right click on any jar/directory that has a META-INF/persistence.xml and see all the nice toys and pictures for it.

Right now I'm forced to create a fake ejb module to get this functionality, which is not obvious and no first time users will think to try that to look for a very well hidden feature!

0
Avatar
Permanently deleted user

Is there any chance of reworking this? It is possible for example to
deploy persistence units outside of an ejb module. I could have a jar
with a META-INF/persistence.xml in it and it'd be slurped up by any
JPA implementation. Ideally, this view would be decoupled from EJB,
and I'd just be able to right click on any jar/directory that has a
META-INF/persistence.xml and see all the nice toys and pictures for
it.

Right now I'm forced to create a fake ejb module to get this
functionality, which is not obvious and no first time users will think
to try that to look for a very well hidden feature!


Here's a vote for splitting the two. Users should not be forced to use fake
structures just to be able to get access to features.
IDEA should work the way users do and not force things the other way around.

Best,
Andrei


0

Please sign in to leave a comment.