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

Summary: I need to set <use-java-context>false</use-java-context> in <project>/setup/jboss-ds.xml
Product: serverplugins Reporter: chrislundin <chrislundin>
Component: JBossAssignee: Petr Hejl <phejl>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 6.x   
Hardware: PC   
OS: Linux   
Issue Type: ENHANCEMENT Exception Reporter:

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 ?