Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 199417
Collapse All | Expand All

(-)src-common-internal/org/eclipse/hyades/ui/internal/dbresource/DBResourceSupportUICommon.java (-1 / +6 lines)
Lines 177-191 Link Here
177
		storeValues();
177
		storeValues();
178
		URI testUri = URI.createURI("testConnection-1234567890"+getAgentNamePostfix());
178
		URI testUri = URI.createURI("testConnection-1234567890"+getAgentNamePostfix());
179
		File f = new File("testConnection-1234567890"+getAgentNamePostfix());
179
		File f = new File("testConnection-1234567890"+getAgentNamePostfix());
180
		Resource resource = null;
180
		try {
181
		try {
181
			f.delete();
182
			f.delete();
182
			Resource resource =  HierarchyResourceSetImpl.getInstance().createResource(testUri);
183
			resource =  HierarchyResourceSetImpl.getInstance().createResource(testUri);
183
			TRCAgent agent=HierarchyFactory.eINSTANCE.createTRCAgent();
184
			TRCAgent agent=HierarchyFactory.eINSTANCE.createTRCAgent();
184
			resource.getContents().add(agent);
185
			resource.getContents().add(agent);
185
			resource.save(Collections.EMPTY_MAP);
186
			resource.save(Collections.EMPTY_MAP);
186
		} catch (Throwable e) {
187
		} catch (Throwable e) {
187
			return e;
188
			return e;
188
		} finally {
189
		} finally {
190
		    if(resource !=null)
191
		    {
192
		        HierarchyResourceSetImpl.getInstance().getResources().remove(resource);
193
		    }
189
			f.delete();
194
			f.delete();
190
//			deleteTestFile(testUri);
195
//			deleteTestFile(testUri);
191
		}
196
		}
(-)src-common-internal/org/eclipse/hyades/ui/internal/dbresource/DBResourceSupportUI.java (-13 / +14 lines)
Lines 150-161 Link Here
150
			newStore.setValue(currentResourcePostFix + "/" + IHyadesResourceExtension.LRSP_LOCATION, location.getText());
150
			newStore.setValue(currentResourcePostFix + "/" + IHyadesResourceExtension.LRSP_LOCATION, location.getText());
151
			newStore.setValue(currentResourcePostFix + "/" + IHyadesResourceExtension.LRSP_USERNAME, username.getText());
151
			newStore.setValue(currentResourcePostFix + "/" + IHyadesResourceExtension.LRSP_USERNAME, username.getText());
152
			newStore.setValue(currentResourcePostFix + "/" + IHyadesResourceExtension.LRSP_PASSWORD, LoadersUtils.scramblePassword(password.getText()));
152
			newStore.setValue(currentResourcePostFix + "/" + IHyadesResourceExtension.LRSP_PASSWORD, LoadersUtils.scramblePassword(password.getText()));
153
			Properties p = (Properties)HyadesResourceExtensions.getInstance().getAllProperties().get(currentResourcePostFix);
153
			
154
			if(p==null)
154
			//bugzilla 157641 - The same properties map gets passed to the DB handler, so if any values are changed here 
155
			{
155
			//it would change in the instance available with the DB Handler thus currupting it. So ensure that you pass a new
156
				p = new Properties();
156
			//properties map
157
				HyadesResourceExtensions.getInstance().getAllProperties().put(currentResourcePostFix,p);
157
			Properties p = new Properties();
158
			}
158
            HyadesResourceExtensions.getInstance().getAllProperties().put(currentResourcePostFix,p);
159
			p.setProperty("largeResourceSupportJDBCLocation", jdbcLocation.getText());
159
			p.setProperty("largeResourceSupportJDBCLocation", jdbcLocation.getText());
160
			p.setProperty("location", location.getText());
160
			p.setProperty("location", location.getText());
161
			p.setProperty("user", username.getText());
161
			p.setProperty("user", username.getText());
Lines 169-180 Link Here
169
		} else {
169
		} else {
170
			newStore.setValue(IHyadesResourceExtension.LARGE_RESOURCE_SUPPORT_CURRENT_DB_TYPE, "");
170
			newStore.setValue(IHyadesResourceExtension.LARGE_RESOURCE_SUPPORT_CURRENT_DB_TYPE, "");
171
			newStore.setValue(currentResourcePostFix + "/" + "largeResourceSupportJDBCLocation", "");
171
			newStore.setValue(currentResourcePostFix + "/" + "largeResourceSupportJDBCLocation", "");
172
			Properties p = (Properties)HyadesResourceExtensions.getInstance().getAllProperties().get(currentResourcePostFix);
172
			
173
			if(p==null)
173
			//bugzilla 157641 - The same properties map gets passed to the DB handler, so if any values are changed here 
174
			{
174
            //it would change in the instance available with the DB Handler thus currupting it. So ensure that you pass a new
175
				p = new Properties();
175
            //properties map
176
				HyadesResourceExtensions.getInstance().getAllProperties().put(currentResourcePostFix,p);
176
			Properties p = new Properties();
177
			}
177
            HyadesResourceExtensions.getInstance().getAllProperties().put(currentResourcePostFix,p);
178
			p.setProperty("largeResourceSupportJDBCLocation", "");
178
			p.setProperty("largeResourceSupportJDBCLocation", "");
179
			p.setProperty("location", "");
179
			p.setProperty("location", "");
180
			p.setProperty("user", "");
180
			p.setProperty("user", "");
Lines 234-240 Link Here
234
		setPageComplete(true, null);
234
		setPageComplete(true, null);
235
		if (enableDBRS.getSelection()) {
235
		if (enableDBRS.getSelection()) {
236
			if (!skipJDBCcheck && !isValidJDBCType()) {
236
			if (!skipJDBCcheck && !isValidJDBCType()) {
237
				setPageComplete(false, CommonUIMessages._64);
237
			    String jarLocation = jdbcLocation.getText();
238
				setPageComplete(false, (jarLocation == null || jarLocation.equals(""))?null:CommonUIMessages._64);
238
			}
239
			}
239
			if (jdbcLocation.getText().endsWith(File.separator + "db2jcc.jar")) {
240
			if (jdbcLocation.getText().endsWith(File.separator + "db2jcc.jar")) {
240
				if (location == null || location.getText().equals(""))
241
				if (location == null || location.getText().equals(""))
(-)src-common-internal/org/eclipse/tptp/platform/common/ui/internal/messages.properties (-3 / +3 lines)
Lines 86-94 Link Here
86
_62  = Unknown
86
_62  = Unknown
87
_63  = None
87
_63  = None
88
_64  = Invalid JDBC driver
88
_64  = Invalid JDBC driver
89
_65  = Invalid database location
89
_65  = Please specify the database location
90
_66  = Invalid username
90
_66  = Please specify the username
91
_67  = Invalid password
91
_67  = Please specify the password
92
_68  = Connection completed without errors.
92
_68  = Connection completed without errors.
93
_69	 = Error when trying to connect:
93
_69	 = Error when trying to connect:
94
_70  = The ZoomSlider's maximum value must be greater than its minimum value!
94
_70  = The ZoomSlider's maximum value must be greater than its minimum value!

Return to bug 199417