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 193768 - I need to set <use-java-context>false</use-java-context> in <project>/setup/jboss-ds.xml
Summary: I need to set <use-java-context>false</use-java-context> in <project>/setup/j...
Status: NEW
Alias: None
Product: serverplugins
Classification: Unclassified
Component: JBoss (show other bugs)
Version: 6.x
Hardware: PC Linux
: P3 normal (vote)
Assignee: Petr Hejl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-23 12:18 UTC by chrislundin
Modified: 2010-12-23 12:18 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description chrislundin 2010-12-23 12:18:22 UTC
Maybe I don't understand how it is supposed to work. :)
 
If I add a row with "<use-java-context>false</use-java-context>" to the file <project>/setup/jboss-ds.xml and deploy using <nbdeploy> ant target, the jboss-ds.xml file is recreated without that row. 
I think the reason is in org.netbeans.modules.j2ee.jboss4.config.ds.DatasourceSupport.java

    public Set<Datasource> getDatasources() throws ConfigurationException {
        
        HashSet<Datasource> projectDS = new HashSet<Datasource>();
        Datasources dss = getDatasourcesGraph();
        if (dss != null) {
            LocalTxDatasource ltxds[] = datasources.getLocalTxDatasource();
            for (int i = 0; i < ltxds.length; i++) {
                if (ltxds[i].getJndiName().length() > 0) {
                    projectDS.add(new JBossDatasource(
                                    ltxds[i].getJndiName(),
                                    ltxds[i].getConnectionUrl(),
                                    ltxds[i].getUserName(),
                                    ltxds[i].getPassword(),
                                    ltxds[i].getDriverClass()));
                }
            }
        }
        
        return projectDS;
    }


where it reads the graph but only uses JndiName, ConnectionUrl, UserName, Password, and DriverClass. 

How to I get <use-java-context>false</use-java-context> to end up in <jboss_home>/server/<instance>/deploy/jboss-ds.xml ?