This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 67538 - EJB project does not initialize server configuration on load.
Summary: EJB project does not initialize server configuration on load.
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: EJB Project (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: Andrei Badea
URL:
Keywords:
Depends on:
Blocks: 67466
  Show dependency tree
 
Reported: 2005-10-26 07:44 UTC by _ pcw
Modified: 2005-10-28 02:32 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ pcw 2005-10-26 07:44:10 UTC
The EJB project (and probably Ejb freeform project as well btw) does not
initialize the server configuration when loading an existing EJB module.  The
SJSAS plugin works around some common cases, but there are places where we
simply can't so this needs to be fixed.

One example:  

Create an ejb module project.
Add a session bean that does not have remote interfaces.
Open ejb-jar.xml in the Multiview editor.
Close the Configuration Files node in the project explorer. (Very important.)
Restart the IDE.

Once restarted, ejb-jar.xml will be opened again.  Go to the EJB Implementation
& Interfaces section for the session bean added previously and check "remote
interfaces" and say yes to generating them.

When is said and done, no JNDI name will be generated for this session bean (or
even an entry for it) in sun-ejb-jar.xml

The reason is that the configuration editor has not been initialized for this
project and no DConfigBeans have been created to listen to event changes.

The workaround is to open the configuration editor on sun-ejb-jar.xml before
adding the remote interfaces.

There is a similar issue wrt/ new EJB projects created in the same IDE session.
 I suspect that if the problem with opened projects is fixed, it will also fix
the problem with new projects, but if not, I can work around this one.
Comment 1 Andrei Badea 2005-10-26 15:01:39 UTC
Fixed in both EJB project and EJB free-form project.
J2eeModuleProvider.getConfigSupport().ensureConfigurationReady() is called when
the project is opened. Let me know if it fixed the issue wrt new EJB projects
you mentioned or if I can help with it.

Checking in EjbJarProject.java;
/cvs/j2ee/ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/EjbJarProject.java,v
 <--  EjbJarProject.java
new revision: 1.55; previous revision: 1.54
done
Checking in EJBProjectNature.java;
/cvs/j2ee/ejbfreeform/src/org/netbeans/modules/j2ee/ejbfreeform/EJBProjectNature.java,v
 <--  EJBProjectNature.java
new revision: 1.18; previous revision: 1.17
done
Comment 2 _ pcw 2005-10-28 02:32:23 UTC
I added some additional code to the SJSAS deployment configuration object's
initialization routine that was required for this all to work properly.  Should
be fine now.