Project Source, Package view and j2EE modules

Hi.

i noticed that when i added my source to an ejb module it dissappears from the package view main module in the project pane. apparently it now resides under the ejb module node in the project view (that node doesnt expand btw..).

the problem is that that's all my source, not just 'ejb source'. am i now supposed to have a different source directory for ejb and non ejb files? i usually have all my source in one dir, /source and then everything in com/company/proj/apackagedir1 ... there's no distinction between ejb source and non ejb source...

thanks,
Trevor

7 comments

i figured out the directory issue. i didnt realize that i could drill down all the way to the beans directory ( afew levels deep) to specify the ejbs.

however, I still cant see ejb beans in the package view. for me, the module name is in red, as well as a few beans...what causes that?

tks.

0

Trevor,
There are Java modules, EJB modules, and other module types in IDEA.
Each module has source path which must not intersect with other module paths.
EJB module is distinct from other module types in the following:
- It is able to recognize ejb-jar.xml and display its EJB structure (EJBs/classes/CMP fields/etc) in the J2EE tab in Project view
- EJB specific codeinsight, make etc

Morale:
You cannot share source directories between modules.
Just configure EJB module to contain specific source directories and pull its EJBs from specific ejb-jar.xml


--
regards,
Alexey Kudravtsev.
JetBrains, Inc
http://www.intellij.com
"Develop with pleasure!"


"Trevor" <trevor.samaroo@gs.com> wrote in message news:7873810.1066757936787.JavaMail.itn@is.intellij.net...

Hi.

>

i noticed that when i added my source to an ejb module it dissappears from the package view main module in the project pane.

apparently it now resides under the ejb module node in the project view (that node doesnt expand btw..).
>

the problem is that that's all my source, not just 'ejb source'. am i now supposed to have a different source directory for ejb

and non ejb files? i usually have all my source in one dir, /source and then everything in com/company/proj/apackagedir1 ...
there's no distinction between ejb source and non ejb source...
>

thanks,
Trevor



0

Interseting...then my whole project needs to be a EJB module as we have all of our code mingled together.

I find it interesting that the IDE is enforcing a filesystem layout instead of letting the user lay it out their own way.

0

thats what i gather too. however, if you at least have ejbs in a separate package/dir, you can have those in a separate module by drilling down to that dir. i guess the idea is, if you have pojos right in a package that you have ejb's in, you're gonna deploy them with the ejb anyways?

i just want the package view to expand the ejb and application nodes...so its kinda useless at the momeent anyways. does that work for you?

0

i kinda like the behavior better in 3.0...BUT i'm still waiting to figure out what the module concept will buy me. the j2ee module in 4.0 still has enough bugs that i can't quite comment fully yet - i have to move back to 3.0 to work with ejbs. i hope in one more build i'll be able to give some real useful feedback if its usable.

0

So far I much prefer the 3.0 way of doing it. I don't know where the idea comes that EJBs need to be in their own source tree. There's no rule about that from Sun (at least that I know of) and I don't think the IDE should be enforcing any sort of thing like that.

0

EJBs do not need to be separated from other POJOs in the project.
It is just that ejb-jar.xml must correspond to EJB module one-to-one.
EJBs and other Java classes can live happily inside the same EJB module.
Howewer e.g. if your EJBs from several ejb-jars reference the same class, that class need to be separated in the third module which
then will be included into both EJB modules dependencies.

--
regards,
Alexey Kudravtsev.
JetBrains, Inc
http://www.intellij.com
"Develop with pleasure!"


"Patrick Burleson" <pbur@yahoo.com> wrote in message news:24317785.1066861324445.JavaMail.itn@is.intellij.net...

So far I much prefer the 3.0 way of doing it. I don't know where the idea comes that EJBs need to be in their own source tree.

There's no rule about that from Sun (at least that I know of) and I don't think the IDE should be enforcing any sort of thing like
that.


0

Please sign in to leave a comment.