Anyone already able to work with J2EE support?

I wonder if it is just me or if there are still quite some issues with
the J2EE support (and modules support in general) in IDEA. Here are four
examples of what I mean:

1) While creating a web application module with the wizard I did not add
a web root to it. I cannot find any place to do so later. The modules
list shows my web module but I cannot find a place to add a web root.

2) Are the web roots in the project settings going to be removed just
like the main module is supposed to get removed soon?

3) When addind a new EJB to an ejb module I get an exception which
results in the package being created, the ejb-jar.xml being updated, but
no source files and no trace of the EJB in the dialog (exception already
posted to tracker).

4) When specifying output paths for an ejb modules jar and exploded
path, different dialogs are used. One of them honours folders excluded
in IDE settings (not letting me select a folder below my build
directory), the other does not honour the settings (which is better in
this case).

So, am I just not lucky or do others have such problems as well
preventing them from really trying the new features in-depth?!

Michael

11 comments

I also am unable to try out the new J2EE features. I don't know if I am just
not doing it properly, but I can't even get as far as setting up J2EE
modules because it seems to only work with brand new projects with no
content? I have existing J2EE projects that I would like to 'import' into
Idea when setting up a module but this doesn't appear to be possible? Anyone
know if I am wrong, because I would love to be!!

Scott

"Michael Descher" <michael.descher@gmx.de> wrote in message
news:bobq0i$te$1@is.intellij.net...

I wonder if it is just me or if there are still quite some issues with
the J2EE support (and modules support in general) in IDEA. Here are four
examples of what I mean:

>

1) While creating a web application module with the wizard I did not add
a web root to it. I cannot find any place to do so later. The modules
list shows my web module but I cannot find a place to add a web root.

>

2) Are the web roots in the project settings going to be removed just
like the main module is supposed to get removed soon?

>

3) When addind a new EJB to an ejb module I get an exception which
results in the package being created, the ejb-jar.xml being updated, but
no source files and no trace of the EJB in the dialog (exception already
posted to tracker).

>

4) When specifying output paths for an ejb modules jar and exploded
path, different dialogs are used. One of them honours folders excluded
in IDE settings (not letting me select a folder below my build
directory), the other does not honour the settings (which is better in
this case).

>

So, am I just not lucky or do others have such problems as well
preventing them from really trying the new features in-depth?

>

Michael

>


0

There is no possibility to import projects/EJBs into existing module right now.
Any thoughts how it can look like ?
E.g. we can search for the existing EJBs after creating new EJB module.

Also, please do not hesitate to post bugs/feature requests into tracker
--
regards,
Alexey Kudravtsev.
JetBrains, Inc
http://www.intellij.com
"Develop with pleasure!"


"Scott Curtis" <scurtis@smart421.com> wrote in message news:bod0f3$q8o$1@is.intellij.net...

I also am unable to try out the new J2EE features. I don't know if I am just
not doing it properly, but I can't even get as far as setting up J2EE
modules because it seems to only work with brand new projects with no
content? I have existing J2EE projects that I would like to 'import' into
Idea when setting up a module but this doesn't appear to be possible? Anyone
know if I am wrong, because I would love to be!!

>

Scott

>

"Michael Descher" <michael.descher@gmx.de> wrote in message
news:bobq0i$te$1@is.intellij.net...

I wonder if it is just me or if there are still quite some issues with
the J2EE support (and modules support in general) in IDEA. Here are four
examples of what I mean:

>

1) While creating a web application module with the wizard I did not add
a web root to it. I cannot find any place to do so later. The modules
list shows my web module but I cannot find a place to add a web root.

>

2) Are the web roots in the project settings going to be removed just
like the main module is supposed to get removed soon?

>

3) When addind a new EJB to an ejb module I get an exception which
results in the package being created, the ejb-jar.xml being updated, but
no source files and no trace of the EJB in the dialog (exception already
posted to tracker).

>

4) When specifying output paths for an ejb modules jar and exploded
path, different dialogs are used. One of them honours folders excluded
in IDE settings (not letting me select a folder below my build
directory), the other does not honour the settings (which is better in
this case).

>

So, am I just not lucky or do others have such problems as well
preventing them from really trying the new features in-depth?

>

Michael

>

>
>


0

I am not sure exactly how the old J2EE functionality worked but it allowed
me to point to existing ejb-jar.xml etc and from that was able to figure out
what was there. In the new functionality it wants to create a brand new
ejb-jar.xml (or if I try to point it to an existing one it simply overwrites
it) into which it will automatically generate the appropriate info on
creation of EJBs etc. I assumed the new functionality would be similar. This
is what I meant by import ejbs, I guess.

scott


"Alexey Kudravtsev (JetBrains)" <cdr@intellij.com> wrote in message
news:bodjhs$boj$1@is.intellij.net...

There is no possibility to import projects/EJBs into existing module right

now.

Any thoughts how it can look like ?
E.g. we can search for the existing EJBs after creating new EJB module.

>

Also, please do not hesitate to post bugs/feature requests into tracker
--
regards,
Alexey Kudravtsev.
JetBrains, Inc
http://www.intellij.com
"Develop with pleasure!"

>
>

"Scott Curtis" <scurtis@smart421.com> wrote in message

news:bod0f3$q8o$1@is.intellij.net...

I also am unable to try out the new J2EE features. I don't know if I am

just

not doing it properly, but I can't even get as far as setting up J2EE
modules because it seems to only work with brand new projects with no
content? I have existing J2EE projects that I would like to 'import'

into

Idea when setting up a module but this doesn't appear to be possible?

Anyone

know if I am wrong, because I would love to be!!

>

Scott

>

"Michael Descher" <michael.descher@gmx.de> wrote in message
news:bobq0i$te$1@is.intellij.net...

I wonder if it is just me or if there are still quite some issues with
the J2EE support (and modules support in general) in IDEA. Here are

four

examples of what I mean:

>

1) While creating a web application module with the wizard I did not

add

a web root to it. I cannot find any place to do so later. The modules
list shows my web module but I cannot find a place to add a web root.

>

2) Are the web roots in the project settings going to be removed just
like the main module is supposed to get removed soon?

>

3) When addind a new EJB to an ejb module I get an exception which
results in the package being created, the ejb-jar.xml being updated,

but

no source files and no trace of the EJB in the dialog (exception

already

posted to tracker).

>

4) When specifying output paths for an ejb modules jar and exploded
path, different dialogs are used. One of them honours folders excluded
in IDE settings (not letting me select a folder below my build
directory), the other does not honour the settings (which is better in
this case).

>

So, am I just not lucky or do others have such problems as well
preventing them from really trying the new features in-depth?

>

Michael

>

>
>

>
>


0

http://www.intellij.net/tracker/idea/viewSCR?publicId=20866

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


"Scott Curtis" <scurtis@smart421.com> wrote in message news:bodq9i$n72$1@is.intellij.net...

I am not sure exactly how the old J2EE functionality worked but it allowed
me to point to existing ejb-jar.xml etc and from that was able to figure out
what was there. In the new functionality it wants to create a brand new
ejb-jar.xml (or if I try to point it to an existing one it simply overwrites
it) into which it will automatically generate the appropriate info on
creation of EJBs etc. I assumed the new functionality would be similar. This
is what I meant by import ejbs, I guess.

>

scott

>
>

"Alexey Kudravtsev (JetBrains)" <cdr@intellij.com> wrote in message
news:bodjhs$boj$1@is.intellij.net...

There is no possibility to import projects/EJBs into existing module right

now.

Any thoughts how it can look like ?
E.g. we can search for the existing EJBs after creating new EJB module.

>

Also, please do not hesitate to post bugs/feature requests into tracker
--
regards,
Alexey Kudravtsev.
JetBrains, Inc
http://www.intellij.com
"Develop with pleasure!"

>
>

"Scott Curtis" <scurtis@smart421.com> wrote in message

news:bod0f3$q8o$1@is.intellij.net...

I also am unable to try out the new J2EE features. I don't know if I am

just

not doing it properly, but I can't even get as far as setting up J2EE
modules because it seems to only work with brand new projects with no
content? I have existing J2EE projects that I would like to 'import'

into

Idea when setting up a module but this doesn't appear to be possible?

Anyone

know if I am wrong, because I would love to be!!

>

Scott

>

"Michael Descher" <michael.descher@gmx.de> wrote in message
news:bobq0i$te$1@is.intellij.net...

I wonder if it is just me or if there are still quite some issues with
the J2EE support (and modules support in general) in IDEA. Here are

four

examples of what I mean:

>

1) While creating a web application module with the wizard I did not

add

a web root to it. I cannot find any place to do so later. The modules
list shows my web module but I cannot find a place to add a web root.

>

2) Are the web roots in the project settings going to be removed just
like the main module is supposed to get removed soon?

>

3) When addind a new EJB to an ejb module I get an exception which
results in the package being created, the ejb-jar.xml being updated,

but

no source files and no trace of the EJB in the dialog (exception

already

posted to tracker).

>

4) When specifying output paths for an ejb modules jar and exploded
path, different dialogs are used. One of them honours folders excluded
in IDE settings (not letting me select a folder below my build
directory), the other does not honour the settings (which is better in
this case).

>

So, am I just not lucky or do others have such problems as well
preventing them from really trying the new features in-depth?

>

Michael

>

>
>

>
>

>
>


0

Alexey Kudravtsev (JetBrains) wrote:

There is no possibility to import projects/EJBs into existing module right now.
Any thoughts how it can look like ?


I would be happy if IDEA could accept an existing deployment descriptor
instead of always trying to create a new one. I was able to do that,
albeit in a quite unorthodox way.

Here's what I've done: first, create a standard module, set the content
roots, source folders, output folder and everything else. Now close the
project and open the .iml file with any other editor (not with IDEA),
and change a few things.

1. Set the module type to J2EE_EJB_MODULE for an EJB module or
J2EE_WEB_MODULE for a web module. The module type is set in the root
element, just like this: 2. For an EJB module, add the following elements: Notice the ejb-jar.xml path, and edit it to reflect your own file. JAR_PATH, JAR_ENABLED, EXPLODED_PATH and EXPLODED_ENABLED are properties related to the building process, and you'll be able to edit them later using IDEA, so you can leave them as is for now. 3. For a WEB module, add the following elememnts: Notice the web.xml path, and edit it to reflect your own file. JAR_PATH, JAR_ENABLED, EXPLODED_PATH and EXPLODED_ENABLED are properties related to the building process, and you'll be able to edit them later using IDEA, so you can leave them as is for now. That's it. Save the files and reopen the projects. Your modules now should be correctly recognized as EJB/WEB modules, and existing content (ie, existing deployment descriptors) will be used. The only part I wasn't able to figure out was how to add webroots to a web module. Any jetbrainer could help here? -- Marcus Brito ]]>

0

Next IDEA EAP build will accept existing deployment descriptors during J2EE module creation.
Moreover, you can change deployment descriptor for the existing J2EE module (F4 on the J2E Module/ General properties/ Deployment
descriptor)

You can configure Web Roots in the Web module editor General tab (F4 on the web module/ choose General tab/Web Roots)

The tough thing is to configure e.g. EJB support for the existing monolitic Ariadna-like project.
For each deployment descriptor there, you will have to extract EJB module which content should be set up to contain the deployment
descriptor file itself and all EJB classes.
Note that modules are not allowed to share content roots with each other. So extracting modules may require some file moving and
that is why it is not easy to automate.

Please let us know of any difficulties using J2EE support.
--
regards,
Alexey Kudravtsev.
JetBrains, Inc
http://www.intellij.com
"Develop with pleasure!"


"Marcus Brito" <pazu@animegaiden.com.br> wrote in message news:bqfmqb$9jf$1@is.intellij.net...

Alexey Kudravtsev (JetBrains) wrote:

>

There is no possibility to import projects/EJBs into existing module right now.
Any thoughts how it can look like ?

>

I would be happy if IDEA could accept an existing deployment descriptor
instead of always trying to create a new one. I was able to do that,
albeit in a quite unorthodox way.

>

Here's what I've done: first, create a standard module, set the content
roots, source folders, output folder and everything else. Now close the
project and open the .iml file with any other editor (not with IDEA),
and change a few things.

>

1. Set the module type to J2EE_EJB_MODULE for an EJB module or
J2EE_WEB_MODULE for a web module. The module type is set in the root
<module> element, just like this:

>

<module version="4" relativePaths="false" type="J2EE_EJB_MODULE">

>

2. For an EJB module, add the following elements:

>

<component name="EjbModuleBuildComponent">
<option name="JAR_PATH" value="" />
<option name="JAR_ENABLED" value="false" />
<option name="EXPLODED_PATH" value="" />
<option name="EXPLODED_ENABLED" value="false" />
</component>
<component name="EjbModuleProperties">
<option name="EJB_JAR_XML_PATH"
value="$MODULE_DIR$/ADM/src/META-INF/ejb-jar.xml" />
</component>

>

Notice the ejb-jar.xml path, and edit it to reflect your own file.
JAR_PATH, JAR_ENABLED, EXPLODED_PATH and EXPLODED_ENABLED are properties
related to the building process, and you'll be able to edit them later
using IDEA, so you can leave them as is for now.

>

3. For a WEB module, add the following elememnts:

>

<component name="WebModuleBuildComponent">
<option name="JAR_PATH" value="" />
<option name="JAR_ENABLED" value="false" />
<option name="EXPLODED_PATH" value="" />
<option name="EXPLODED_ENABLED" value="true" />
</component>
<component name="WebModuleProperties">
<webroots />
<option name="WEB_XML_PATH"
value="$MODULE_DIR$/WEB/web/WEB-INF/web.xml" />
</component>

>

Notice the web.xml path, and edit it to reflect your own file. JAR_PATH,
JAR_ENABLED, EXPLODED_PATH and EXPLODED_ENABLED are properties related
to the building process, and you'll be able to edit them later using
IDEA, so you can leave them as is for now.

>

That's it. Save the files and reopen the projects. Your modules now
should be correctly recognized as EJB/WEB modules, and existing content
(ie, existing deployment descriptors) will be used. The only part I
wasn't able to figure out was how to add webroots to a web module. Any
jetbrainer could help here?

>

--
Marcus Brito <marcus@portaljava.com.br>



0

Alexey Kudravtsev (JetBrains) wrote:

Please let us know of any difficulties using J2EE support.


Hope next EAP makes this possible. Up to 977 J2EE support is near
impossible to use without lots of hacking around -- just read my above
message. I manually configured some modules in my project, just to have
my settings lost after restarting IDEA.

One question now: do you plan to open some of the J2EE integration API
so we can plug some extra functionality? For example, editors for
third-party deployment descriptors (application servers, web frameworks)?

--
MB

0

I am still disappointed by the need for differing modules to have different source paths. But I think we can get around this by making our entire project a EJB module and drop the main project module. Would that be correct?

Thanks,
Patrick

0

Alexey Kudravtsev (JetBrains) wrote:

Note that modules are not allowed to share content roots with each other. So
extracting modules may require some file moving and that is why it is not
easy to automate.

Please let us know of any difficulties using J2EE support.


The difficulty is that the IDE cannot dictate the sources organization
(however bad it is). If we had to move classes around we would have to
stop using IDEA for EJB development.

But in the current EAP (977), I am able to have ALL sources in one module
and the EJB module (manually configured - edited IML file) contains
ONLY the depl. descriptors - and it seems to be working.
Are you saying that if the EJB classes are not in the EJB module
it will not work? Will you remove the current EAP functionality?

r.

0

Holy smokes! Do you know how hard it was to find the J2EE Module Tab?! The tabs at the bottom are barely noticeable and the inconsistency caused more confusion than necessary.

0

heh... work in progress. Welcome to 992 :)

0

Please sign in to leave a comment.