Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[corona-dev] ProjectContainerProxy basic error handling - forwarded.

An email discussion which took place on Monday 06.11.2006 (US Style 11.06.2006 ;-)).

Please read it from top to bottom.

 

 

 

From: Jaworowski, Piotr

Sent: Friday, November 03, 2006 11:31 AM

To: O'Flynn, Dennis

Cc: Everitt, Glenn; Okraszewski, Marcin

Subject: ProjectContainerProxy basic error handling

 

Hi Dennis,

 

            Today we were testing corona, and we have encountered quite

a few problems connected with error handling in ProjectContainerProxy.

 

I know that now is the stabilization phase of the project, but I've

implemented "basic" error handling within PCP, and I'm not sure whether

I should check the change into the CVS repository or not.

 

That "basic" error handling fix the problem connected with corona

server which has to run prior starting the corona client.

 

            Unfortunately, it does not solve problems like losing

connection to server during the work... Should I check that change into

repository?

 

 

 

Piotr

 

Ps. we were trying to avoid introducing big changes to corona lately

but it seams to be a must. As an attachment, patch with that change.

 

 

From: Everitt, Glenn
Sent: Friday, November 03, 2006 11:17 PM
To: Jaworowski, Piotr
Cc: Hawkins, Joel; Jaworowski, Piotr; Kaczmarek, Pawel; Kalka, Edyta; O'Flynn, Dennis; Okraszewski, Marcin; Roberts, Brian; Wright, Jim
Subject: RE: ProjectContainerProxy basic error handling

 

It seems like the next steps missing.

 

I think there are two types of exceptions

1. an exception where I want to attempt to reconnect – in the “catch” of the exception I want to call some standard re-connection code in the ProjectContainerProxy.  A lostConnection Notification should be sent out if re-connection attempts fail and lostConnection Notification listeners should disable items in the user interface and in a perfect world we need to “automatically” switch over to using the locally cached ContextContainer.  Switching over to the cached ContextContainer implies that the cache has been kept current with the remote ContextContainer.  This may mean the ContextContainer Editor needs to update the cached container in addition to the remote container.

2. an exception from which there is no recovery – more thought required here.

 

So I don’t think this code can be quickly implemented so in the interim it would make sense to make a re-connection attempt and if it fails show the exception in a Pop-up Window/Dialog.

 

Does this make sense?

Glenn Everitt

 

 

From: Okraszewski, Marcin
Sent: Monday, November 06, 2006 12:37 PM
To: Everitt, Glenn
Cc: Jaworowski, Piotr; Hawkins, Joel; Kaczmarek, Pawel; Kalka, Edyta; O'Flynn, Dennis; Roberts, Brian; Wright, Jim
Subject: Re: ProjectContainerProxy basic error handling

 

As I understand the re-connection code would be embeded in the

ProjectContainerProxy. So if a method fails it tries to reconnect and

invoke it again. When it fails again it throws an exception. I believe

there is no point in throwing that kind of exception to the invoker, and

make it handle reconnection. The reconnection should be transparent.

 

The change of throwing CoronaException in each proxy method will be

required anyway. For now, until the reconnection is implemented, the

lost connection is an unrecoverable error and it is thrown outside. It

helps at least that you can for instance close Eclipse or change server

if the current one doesn't work. Now I experienced things like need to

kill Eclipse when our server goes offline.

 

So think of all thrown exeptions now as unrecoverable. Later, when we

implement some error handling in the proxy, we will throw less and less

exceptions.

 

Marcin

 

 

From: Jaworowski, Piotr

Sent: Monday, November 06, 2006 8:15 AM

To: Okraszewski, Marcin; Everitt, Glenn

Cc: Hawkins, Joel; Kaczmarek, Pawel; Kalka, Edyta; O'Flynn, Dennis; Roberts, Brian; Wright, Jim

Subject: RE: ProjectContainerProxy basic error handling

 

Hi,

 

I've enhanced that 'basic error handling' which was written before, so now it would also handle situations like, connection to server lost during the work.

 

What was changed :

1)

      All the methods from IConrainerManager are throwing CoronaException,

2)

      All the methods from IProjectConrainerManager are throwing CoronaException,

3)

      SOAClientException inherits CoronaException, (thanks to points 1, 2, 3 no UndeclaredThrowableException will be thrown, if there is no connection to the server as exceptions are wrapped by SOAClientException)

4)

      All ProjectContainerProxy are throwing CoronaException

 

5)

      Handling of newly thrown exceptions added. (Basic handling ;))

 

Thanks to this, no more eclipse kill is required if connection fails. All the error messages are logged into eclipse error log, so user will have the overview what has happened (connection refused or some other bug).

 

It would be really good to add this change to M5. I will not check it in yet. I'd like to know your opinion first.

 

All the other stuff like reconnection in PCP and so on can be implemented within M7 version.

 

Cheers,

Piotr

 

Ps. Change as patch, you can patch your workspace and test it a little bit to see how it works... till now I didn't find any "serious" errors in it.

 

 

From: Hawkins, Joel
Sent: Monday, November 06, 2006 3:13 PM
To: Jaworowski, Piotr; Okraszewski, Marcin; Everitt, Glenn
Cc: Kaczmarek, Pawel; Kalka, Edyta; O'Flynn, Dennis; Roberts, Brian; Wright, Jim
Subject: RE: ProjectContainerProxy basic error handling

 

Can someone catch me up here? What exactly is/are the problem(s) we're trying to solve?

 

I think I see two.

 

1. Knowing the difference between a network error and an application error.

2. Resolving the appropriate error type. The Unknown Exception Types occur when the proxy can't resolve or construct the returned Exception type.

 

Making the proxy dependent on CoronaCore gets you around problem 2 iff your exception type is declared in CoronaCore, but will fail for exception classes that are not part of CoronaCore. Perhaps a better plan would be to use the proxied interface's class loader to attempt to load the exception class from? Reading the code, we're currently using Class.forName(). If we changed it to something like proxyClass.getClassLoader().loadClass(exceptionName).newInstance() (with the appropriate error handling and perhaps some code to invoke a constructor with a message).

 

This sort of solution would reduce inter-dependencies, and put responsibility for exception packaging on the proxy requestor, where it belongs.

 

Problem 1 sounds like a need to differentiate the SOAClientException. Perhaps introducing a SOAClientCommunicationException?

 

Thoughts?

 

Joel

 

 

From: Jaworowski, Piotr
Sent: Monday, November 06, 2006 4:57 PM
To: Hawkins, Joel; Okraszewski, Marcin; Everitt, Glenn
Cc: Kaczmarek, Pawel; Kalka, Edyta; O'Flynn, Dennis; Roberts, Brian; Wright, Jim
Subject: RE: ProjectContainerProxy basic error handling

 

 

Currently, the main problem is that if anything goes wrong on/with server side, client receives the UndeclaredThrowableException which is runtime exception. ( client is implemented in the way that it catches only declared exceptions ).

Such situation causes problems with closing eclipse instance (you have to kill it, to exit) and does not allow user to work with corona. The solution I've send should be considered as a temporary one, thanks to this M5 version would look more stable, and that it's more user friendly.

 

 

> Making the proxy dependent on CoronaCore gets you around problem 2 if

> your exception type is declared in CoronaCore, but will fail for

> exception classes that are not part of CoronaCore.

 

I almost agree with you in this point ;-), unfortunately we have to have some root exception defined, and that this exception should be thrown by all methods defined in IProjectContainerManager/IContainerManager. Otherwise we will have the UndeclaredThrowableException problem. For now the problem was that invoke method wanted to throw SOAClientException for methods which don't declare to throw it. (We can always define for IContainerManager methods that they throw Exception or even Throwable, but I'm not sure if it's a good way).

 

 

> Reading the code, we're currently using Class.forName(). If we changed

> it to something like

> proxyClass.getClassLoader().loadClass(exceptionName).newInstance()

> (with the appropriate error handling and perhaps some code to invoke a

> constructor with a message).

 

This is it :), I really like that solution.

If it will not work, I thought about solution similar to AxisFault exception. That CoronaException would have a cause exception defined in description, and that client has something like a factory class which creates proper exception from the description (but this is just in case the proxyClass line won't work).

 

 

Cheers,

Piotr

 

 

From: Hawkins, Joel
Sent: Monday, November 06, 2006 5:11 PM
To: Jaworowski, Piotr; Okraszewski, Marcin; Everitt, Glenn
Cc: Kaczmarek, Pawel; Kalka, Edyta; O'Flynn, Dennis; Roberts, Brian; Wright, Jim
Subject: RE: ProjectContainerProxy basic error handling

 

>Such situation causes problems with closing eclipse instance (you have to >kill it, to exit) and does not allow user to work with corona.

 

Whah? There are other ways to get runtime exceptions (like our old buddy NullPointerException) - so there's no handling that deals with Throwable?

 

 

>> Making the proxy dependent on CoronaCore gets you around problem 2 if

>> your exception type is declared in CoronaCore, but will fail for >>exception classes that are not part of CoronaCore.

>I almost agree with you in this point ;-), unfortunately we have to have >some root exception defined, and that this exception should be thrown by >all methods defined in IProjectContainerManager/IContainerManager.

 

Sounds like you DO agree with me on this point. :-)

 

>> Reading the code, we're currently using Class.forName(). If we changed it

>> to something like

>> proxyClass.getClassLoader().loadClass(exceptionName).newInstance() (with

>> the appropriate error handling and perhaps some code to invoke a

>> constructor with a message).

>This is it :), I really like that solution.

>If it will not work, I thought about solution similar to AxisFault >exception. That CoronaException would have a cause exception defined in >description, and that client has something like a factory class which >creates proper exception from the description (but this is just in case the >proxyClass line won't work).

 

This is really pretty easy to implement. Shall I make the change? Also, the SOAClientException carries the reason from the AxisFault. My intent was not to surface the AxisFault too directly, as we may very well swap out the SOAP layer in the future (or at least support multiple SOAP layers).

 

Joel

 

 

From: Jaworowski, Piotr
Sent: Monday, November 06, 2006 5:33 PM
To: Hawkins, Joel; Okraszewski, Marcin; Everitt, Glenn
Cc: Kaczmarek, Pawel; Kalka, Edyta; O'Flynn, Dennis; Roberts, Brian; Wright, Jim
Subject: RE: ProjectContainerProxy basic error handling

 

>Whah? There are other ways to get runtime exceptions (like our old buddy >NullPointerException) - so there's no handling that deals with Throwable?

 

In most cases there is a standard eclipse handling, that the error message will go to the eclipse error log. But not in all cases :-(.

 

> This is really pretty easy to implement. Shall I make the change? Also,

> the SOAClientException carries the reason from the AxisFault. My intent

> was not to surface the AxisFault too directly, as we may very well swap

> out the SOAP layer in the future (or at least support multiple SOAP

> layers).

 

The problem is that M5 is coming and I'm not sure if we should add it or not ;-).

 

What do you suggest? What exception should be thrown from methods declared in IContainerManager (Exception, CoronaException, some other) ??

 

Piotr,

 

 

From: Hawkins, Joel
Sent: Monday, November 06, 2006 5:39 PM
To: Jaworowski, Piotr; Okraszewski, Marcin; Everitt, Glenn
Cc: Kaczmarek, Pawel; Kalka, Edyta; O'Flynn, Dennis; Roberts, Brian; Wright, Jim
Subject: RE: ProjectContainerProxy basic error handling

 

As far as the proxyClass delegation stuff, it's a one-liner. I say we go for it. As for distinguishing communication errors, I think I just need to get a bit more familiar with the AxisFault types so I can tell what comes from the send chain vs the receive chain.

 

I do think our code should be able to withstand a runtime exception, however. No matter what, we shouldn't require a kill -9 to shut down!

 

Cheers,

Joel

 

 

From: Jaworowski, Piotr
Sent: Monday, November 06, 2006 6:03 PM
To: Hawkins, Joel; Okraszewski, Marcin; Everitt, Glenn
Cc: Kaczmarek, Pawel; Kalka, Edyta; O'Flynn, Dennis; Roberts, Brian; Wright, Jim
Subject: RE: ProjectContainerProxy basic error handling

 

> No matter what, we shouldn't require a kill -9 to shut down!

 

That's no problem it's small change within CoronaWorkbenchListener.preShutdown method, line PCXViewManager.getManager().hideAndCloseProjects()

was causing the problem with closing the workbench.

It will be surrounded with try catch block...

 

Piotr,

 

 

From: Hawkins, Joel
Sent: Monday, November 06, 2006 9:19 PM
To: Jaworowski, Piotr; Okraszewski, Marcin; Everitt, Glenn
Cc: Kaczmarek, Pawel; Kalka, Edyta; O'Flynn, Dennis; Roberts, Brian; Wright, Jim
Subject: RE: ProjectContainerProxy basic error handling

 

OK Piotr, I checked in the change to have the proxyClass resolve the remote exception type. So the behavior you should see now is:

 

A: The remote code was invoked, and an exception was thrown that is declared in the proxy interface, or is visible to the proxy interface's classloader - you'll get the declared exception.

 

B: The remote code was invoked, and an exception was thrown that wasn't declared in the proxy interface, and is not visible to the proxy interface's classloader - you'll get a SOAClientException.

 

C: The remote code was never invoked, there was a communication error - you'll get a SOAClientException.

 

I've added some code to the SOAClientException so that you can query to see if the error is a network error and if the error is recoverable. So things like a miss-configured axis won't be recoverable, but things like a connection refused will be (in other words, server is unavailable but may return). I don't have the code in the proxy to populate these fields, so for now everything defaults to recoverable non-network error.

 

I'll try and get the detail code into the SOAClientException shortly.

 

Cheers,

Joel

 

The contents of this e-mail are intended for the named addressee only. It contains information that may be confidential. Unless you are the named addressee or an authorized designee, you may not copy or use it, or disclose it to anyone else. If you received it in error please notify us immediately and then destroy it.
### Eclipse Workspace Patch 1.0
#P org.eclipse.corona.soa.client.axis2
Index: src/org/eclipse/corona/soa/client/SOAClientException.java
===================================================================
RCS file: /cvsroot/technology/org.eclipse.corona/plugins/org.eclipse.corona.soa.client.axis2/src/org/eclipse/corona/soa/client/SOAClientException.java,v
retrieving revision 1.2
diff -u -r1.2 SOAClientException.java
--- src/org/eclipse/corona/soa/client/SOAClientException.java	31 Oct 2006 17:40:58 -0000	1.2
+++ src/org/eclipse/corona/soa/client/SOAClientException.java	6 Nov 2006 12:59:55 -0000
@@ -13,10 +13,12 @@
 
 package org.eclipse.corona.soa.client;
 
+import org.eclipse.corona.core.CoronaException;
+
 /**
  * The Exception container for exceptions occuring inside of the Corona SOAP proxy classes.
  */
-public class SOAClientException extends Exception {
+public class SOAClientException extends CoronaException {
 
 	private static final long serialVersionUID = -4991972743200513812L;
 	
#P org.eclipse.corona.container.project.ui
Index: src/org/eclipse/corona/container/project/ui/preferences/ServerSettingsPreferencePage.java
===================================================================
RCS file: /cvsroot/technology/org.eclipse.corona/plugins/org.eclipse.corona.container.project.ui/src/org/eclipse/corona/container/project/ui/preferences/ServerSettingsPreferencePage.java,v
retrieving revision 1.5
diff -u -r1.5 ServerSettingsPreferencePage.java
--- src/org/eclipse/corona/container/project/ui/preferences/ServerSettingsPreferencePage.java	2 Nov 2006 11:24:32 -0000	1.5
+++ src/org/eclipse/corona/container/project/ui/preferences/ServerSettingsPreferencePage.java	6 Nov 2006 12:59:58 -0000
@@ -40,7 +40,7 @@
 	public boolean performOk() {
 		// connect the proxy
 		ProjectContainerProxy pcp = ProjectContainerProxy.getInstance();
-		if (!pcp.getConnectedToServer().equals(
+		if (pcp.getConnectedToServer() == null || !pcp.getConnectedToServer().equals(
 				serverConnectionNameEditor.getStringValue())) {
 			try {
 				ServiceConnectionUtility
@@ -60,7 +60,7 @@
 			}
 			// hide & close known projects.
 			PCXViewManager.getManager().hideAndCloseProjects();
-			if (!pcp.getConnectedToServer().equals(
+			if (pcp.getConnectedToServer() == null || !pcp.getConnectedToServer().equals(
 					serverConnectionNameEditor.getStringValue())) {
 				try {
 					pcp.connectToService(serverConnectionNameEditor
Index: src/org/eclipse/corona/container/project/ui/explorer/PCXViewManager.java
===================================================================
RCS file: /cvsroot/technology/org.eclipse.corona/plugins/org.eclipse.corona.container.project.ui/src/org/eclipse/corona/container/project/ui/explorer/PCXViewManager.java,v
retrieving revision 1.16
diff -u -r1.16 PCXViewManager.java
--- src/org/eclipse/corona/container/project/ui/explorer/PCXViewManager.java	3 Nov 2006 10:01:10 -0000	1.16
+++ src/org/eclipse/corona/container/project/ui/explorer/PCXViewManager.java	6 Nov 2006 12:59:58 -0000
@@ -32,6 +32,7 @@
 import org.eclipse.corona.container.project.ui.view.RepositoryDescriptorStub;
 import org.eclipse.corona.container.project.ui.view.actions.CloseProjectContainerViewAction;
 import org.eclipse.corona.container.project.ui.view.actions.ShowProjectContainerViewAction;
+import org.eclipse.corona.core.CoronaException;
 import org.eclipse.corona.core.resources.exceptions.ConfigurationException;
 import org.eclipse.corona.log.CoronaLogService;
 import org.eclipse.corona.management.common.NoTeamRepositoryException;
@@ -177,7 +178,7 @@
 	 * @return project container stubs to display on top level in PCX
 	 * @throws ConfigurationException is thrown if configuration is incorectly set.
 	 */
-	public Object[] getInitialStubs() throws ConfigurationException {
+	public Object[] getInitialStubs() throws CoronaException {
 		logService.entering("PCXViewManager.getInitialStubs");
 		ProjectContainerStub[] stubs = null;
 		int state = 0;
@@ -236,7 +237,7 @@
 	 * @return a ProjectContainerStub object connected with uriString.
 	 * @throws ConfigurationException if configuration is incorrectly initialized.
 	 */
-	public ProjectContainerStub addProjectContainerStub(String uriString) throws ConfigurationException {
+	public ProjectContainerStub addProjectContainerStub(String uriString) throws CoronaException {
 		logService.entering("PCXViewManager.addProjectContainerStub");
 		ProjectContainerStub stub = findPC(uriString);
 		ProjectContextContainer container = null;
@@ -341,12 +342,16 @@
 				} catch (Exception e) {
 					// TODO Auto-generated catch block
 					e.printStackTrace();
+					//FIXME temporary solution method should throw CoronaException, not No team repository exception
+					throw new NoTeamRepositoryException(e.getMessage() + ". Problem with opening ProjectContainer for memenber");
 				}
 			else
 				projectContainer = getManager().getProjectContainerProxy()
 						.openProjectContainer(uriString);
-		} catch (ConfigurationException e) {
+		} catch (CoronaException e) {
+			//FIXME temporary solution method should throw CoronaException, not No team repository exception
 			logService.log(CoronaLogService.LOG_ERROR, "Failed to open project container. Project Configuration is incorrecly set.");
+			throw new NoTeamRepositoryException(e.getMessage() + ". Problem with opening ProjectContainer for memenber");
 		}
 		// ArrayList list = (ArrayList)
 		// getManager().getProjectContainerProxy().listActiveMembers(uriString);
@@ -376,10 +381,11 @@
 			else
 				pcProxy.closeContainer(uriString);
 			
-		} catch (ConfigurationException e) {
+		} catch (CoronaException e) {
+			//FIXME error handling shoudl be extended
 			logService
 					.log(CoronaLogService.LOG_ERROR,
-							"Failed to close project container. Configuration is incorrecly set.");
+							"Failed to close project container." + e.getMessage(), e);
 		}
 		ProjectContainerStub stub = findPC(uriString);
 		if (stub != null) {
@@ -475,9 +481,9 @@
 				try {
 					stub = addProjectContainerStub(relatedContainers.get(i)
 							.toString());
-				} catch (ConfigurationException e) {
-					// JAWPIO jawpio fixme 
-					e.printStackTrace();
+				} catch (CoronaException e) {
+					//FIXME error handling shoudl be fixed.
+					logService.log(CoronaLogService.LOG_ERROR, "Failed to add ProjectContainerStub. " + e.getMessage(), e);
 				}
 			}
 			result[i] = stub;
Index: src/org/eclipse/corona/container/project/ui/explorer/views/ProjectContainerExplorerView.java
===================================================================
RCS file: /cvsroot/technology/org.eclipse.corona/plugins/org.eclipse.corona.container.project.ui/src/org/eclipse/corona/container/project/ui/explorer/views/ProjectContainerExplorerView.java,v
retrieving revision 1.7
diff -u -r1.7 ProjectContainerExplorerView.java
--- src/org/eclipse/corona/container/project/ui/explorer/views/ProjectContainerExplorerView.java	25 Oct 2006 12:24:37 -0000	1.7
+++ src/org/eclipse/corona/container/project/ui/explorer/views/ProjectContainerExplorerView.java	6 Nov 2006 12:59:58 -0000
@@ -26,6 +26,7 @@
 import org.eclipse.corona.container.project.ui.explorer.PCXViewManager;
 import org.eclipse.corona.container.project.ui.explorer.actions.OpenPCXActionDelegate;
 import org.eclipse.corona.container.project.ui.view.RepositoryDescriptorStub;
+import org.eclipse.corona.core.CoronaException;
 import org.eclipse.corona.core.resources.exceptions.ConfigurationException;
 import org.eclipse.corona.model.container.project.ProjectContextContainer;
 import org.eclipse.jface.action.Action;
@@ -206,7 +207,7 @@
 		public void initialize() {
 			try {
 				containers = getManager().getInitialStubs();
-			} catch (ConfigurationException e) {
+			} catch (CoronaException e) {
 				infoDialog.open();
 				containers = EMPTY_CONTAINERS;
 			}
Index: src/org/eclipse/corona/internal/container/project/ui/view/page/TeamMembersView.java
===================================================================
RCS file: /cvsroot/technology/org.eclipse.corona/plugins/org.eclipse.corona.container.project.ui/src/org/eclipse/corona/internal/container/project/ui/view/page/TeamMembersView.java,v
retrieving revision 1.3
diff -u -r1.3 TeamMembersView.java
--- src/org/eclipse/corona/internal/container/project/ui/view/page/TeamMembersView.java	26 Oct 2006 11:30:22 -0000	1.3
+++ src/org/eclipse/corona/internal/container/project/ui/view/page/TeamMembersView.java	6 Nov 2006 12:59:58 -0000
@@ -17,6 +17,7 @@
  */
 package org.eclipse.corona.internal.container.project.ui.view.page;
 
+import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
@@ -29,6 +30,7 @@
 import org.eclipse.corona.container.project.ui.Activator;
 import org.eclipse.corona.container.project.ui.ImageCache;
 import org.eclipse.corona.container.project.ui.view.page.AbstractRepositoryAdapterPage;
+import org.eclipse.corona.core.CoronaException;
 import org.eclipse.corona.log.CoronaLogService;
 import org.eclipse.corona.repository.ITeamRepositoryAdapter;
 import org.eclipse.corona.ui.tools.TableViewerRefresher;
@@ -243,7 +245,13 @@
 	private void loadActiveUsers() {
 		ProjectContainerProxy pcProxy = ProjectContainerProxy.getInstance();
 		String uri = container.getContainerUri();
-		List activeMembers = pcProxy.listActiveMembers(uri);
+		List activeMembers;
+		try {
+			activeMembers = pcProxy.listActiveMembers(uri);
+		} catch (CoronaException e) {
+			//TODO Fixme proper exception handling required. 
+			activeMembers = new ArrayList(); 
+		}
 		activeUsersIds = new HashSet(activeMembers);
 	}
 
#P org.eclipse.corona.container.manager
Index: src/org/eclipse/corona/container/manager/IProjectContainerManager.java
===================================================================
RCS file: /cvsroot/technology/org.eclipse.corona/plugins/org.eclipse.corona.container.manager/src/org/eclipse/corona/container/manager/IProjectContainerManager.java,v
retrieving revision 1.9
diff -u -r1.9 IProjectContainerManager.java
--- src/org/eclipse/corona/container/manager/IProjectContainerManager.java	31 Oct 2006 12:08:41 -0000	1.9
+++ src/org/eclipse/corona/container/manager/IProjectContainerManager.java	6 Nov 2006 13:00:01 -0000
@@ -20,6 +20,7 @@
 import java.util.List;
 import java.util.Map;
 
+import org.eclipse.corona.core.CoronaException;
 import org.eclipse.corona.core.resources.IContainerConfiguration;
 import org.eclipse.corona.core.resources.exceptions.ConfigurationException;
 import org.eclipse.corona.management.common.NoTeamRepositoryException;
@@ -49,7 +50,7 @@
 	 * @return ProjectContextContainer object
 	 * @throws ConfigurationException 
 	 */	
-	public ProjectContextContainer openProjectContainerForMember(String containerUri, String memberId) throws NoTeamRepositoryException, ConfigurationException;
+	public ProjectContextContainer openProjectContainerForMember(String containerUri, String memberId) throws NoTeamRepositoryException, CoronaException;
 	
 	/**
 	 * Close an existing project container on behalf of a project team member.  The team member should
@@ -62,7 +63,7 @@
 	 * @param memberName
 	 * @throws ConfigurationException 
 	 */
-	public void closeProjectContainerForMember(String containerUri, String memberId) throws ConfigurationException;
+	public void closeProjectContainerForMember(String containerUri, String memberId) throws CoronaException;
 	
 	/**
 	 * Returns a List of Strings containing Team Member names that currently have this 
@@ -71,7 +72,7 @@
 	 * @param containerUri uri of container to check for active Team Members
 	 * @return list of Strings containing Team Member names
 	 */
-	public List<String> listActiveMembers(String containerUri);
+	public List<String> listActiveMembers(String containerUri) throws CoronaException;
 	
 	/**
 	 * Add a member to the ProjectContextContainer's Team Member Repository. The member is not active until 
@@ -85,7 +86,7 @@
 	 *  Note: Should this be changed to require the Name or Uri of the Repository holding the Team Member we currently assume
 	 *  just one "default" Team Member Repository.
 	 */
-	public void joinProject(String containerUri, IRepositoryResource memberObject);
+	public void joinProject(String containerUri, IRepositoryResource memberObject) throws CoronaException;
 	
 	/**
 	 * remove a member from the ProjectContextContainer's Team Member Repository
@@ -94,7 +95,7 @@
 	 * @param containerUri uri of PrjectContextContainer holding Team Member Repository to remove the Team Member from from
 	 * 
 	 */
-	public void unjoinProject(String containerUri, String memberId);
+	public void unjoinProject(String containerUri, String memberId) throws CoronaException;
 
 	//From IContainerManager this needs to be explicitly exposed so the SOA code can expose these
 	//methods
@@ -105,7 +106,7 @@
 	 * @return the ContainerConfiguration object
 	 * @throws ConfigurationException if method is called on uninitialized configuration.
 	 */
-	public IContainerConfiguration loadConfiguration(String containerUri) throws ConfigurationException;
+	public IContainerConfiguration loadConfiguration(String containerUri) throws CoronaException;
 
 
 	/**
@@ -116,7 +117,7 @@
 	 * @param containerConfig the configuration object for this this type of Container
 	 * @return
 	 */
-	public Object resolveContainer(String containerUri, IContainerConfiguration containerConfig);
+	public Object resolveContainer(String containerUri, IContainerConfiguration containerConfig) throws CoronaException;
 	
 	/**
 	 * Open an existing ContextContainer, 
@@ -124,7 +125,7 @@
 	 * @return ContextContainer object
 	 * @throws ConfigurationException if method is called on uninitialized configuration.
 	 */
-	public ContextContainer openContainer(String containerUri) throws ConfigurationException;
+	public ContextContainer openContainer(String containerUri) throws CoronaException;
 	
 	/**
 	 * serializes the ContextContainer object to disk location specified in the ContainerConfiguration
@@ -132,7 +133,7 @@
 	 * @param containerUri uri used to uniquely identify the ContextContainer
 	 * @throws ConfigurationException if method is called on uninitialized configuration.
 	 */
-	public void saveContainer(String containerUri) throws ConfigurationException;
+	public void saveContainer(String containerUri) throws CoronaException;
 	
 	/**
 	 * Close the ContextContainer (however, a reference count of Container users is kept so it may 
@@ -141,7 +142,7 @@
 	 * @param containerUri uri used to uniquely identify the ContextContainer
 	 * @throws ConfigurationException if method is called on uninitialized configuration.
 	 */
-	public void closeContainer(String containerUri) throws ConfigurationException;
+	public void closeContainer(String containerUri) throws CoronaException;
 
 
 	/**
@@ -149,14 +150,14 @@
 	 * so Containers do not have to be opened.
 	 * @return map of Container Name String to Container Uri String
 	 */
-	public Map<String, String> getNameToContainerUriMap();
+	public Map<String, String> getNameToContainerUriMap() throws CoronaException;
 
 	/**
 	 * Provides a mapping from Container Uri to Container Name uses information from ContainerConfigurations
 	 * so Containers do not have to be opened.
 	 * @return map of Container Uri String to Container Name String
 	 */
-	public Map<String, String> getUriToContainerNameMap();
+	public Map<String, String> getUriToContainerNameMap() throws CoronaException;
 
 	/**
 	 * Get a list of the containers listed as related to this container.  This list 
@@ -167,7 +168,7 @@
 	 * @return List of String of related Containers' uris
 	 * @throws ConfigurationException if method is called on uninitialized configuration.
 	 */
-	public List<String> listRelatedContainerUris(String containerUri) throws ConfigurationException;
+	public List<String> listRelatedContainerUris(String containerUri) throws CoronaException;
 	
 	/**
 	 * Get a list of the containers list as related to this container.  This list 
@@ -177,7 +178,7 @@
 	 * @param container ContextContainer object
 	 * @return List of String of related Containers' uris
 	 */
-	public List<ContextContainer> listRelatedContainers(ContextContainer container) throws ConfigurationException;
+	public List<ContextContainer> listRelatedContainers(ContextContainer container) throws CoronaException;
 	
 	/**
 	 * Get a list of all containers directly and indirectly related to this container.  This list 
@@ -191,7 +192,7 @@
 	 * not included in the list.
 	 * @throws ConfigurationException if method is called on uninitialized configuration.
 	 */
-	public List<String> listAllRelatedContainerUris(String startContainerUri) throws ConfigurationException;
+	public List<String> listAllRelatedContainerUris(String startContainerUri) throws CoronaException;
 	
 	/**
 	 * Get a list of all containers directly and indirectly related to this container.  This list 
@@ -204,7 +205,7 @@
 	 * not included in the list.
 	 * @throws ConfigurationException if method is called on uninitialized configuration.
 	 */
-	public List<ContextContainer> listAllRelatedContainers(ContextContainer startContainer) throws ConfigurationException;
+	public List<ContextContainer> listAllRelatedContainers(ContextContainer startContainer) throws CoronaException;
 	
 
 	/**
@@ -214,7 +215,7 @@
 	 * @param relatedContainerUri uri used to uniquely identify the related ContextContainer
 	 * @throws ConfigurationException if method is called on uninitialized configuration.
 	 */
-	public void addRelatedContainerUri(String containerUri, String relatedContainerUri) throws ConfigurationException;
+	public void addRelatedContainerUri(String containerUri, String relatedContainerUri) throws CoronaException;
 	
 	/**
 	 * Remove a containerUri String from the list of related Containers in specified ContextContainer
@@ -223,7 +224,7 @@
 	 * @param relatedContainerUri uri used to uniquely identify the related ContextContainer
 	 * @throws ConfigurationException if method is called on uninitialized configuration.
 	 */
-	public void removeRelatedContainerUri(String containerUri, String relatedContainerUri) throws ConfigurationException;
+	public void removeRelatedContainerUri(String containerUri, String relatedContainerUri) throws CoronaException;
 
 	/**Be sure you REALLY need to use this, it is very expensive. Try to just 
 	 * get a list of Container Names or Container URI and then retrieve just the one
@@ -231,20 +232,20 @@
 	 * 
 	 * @return
 	 */
-	public List<ContextContainer> listOpenContainers();
+	public List<ContextContainer> listOpenContainers() throws CoronaException;
 
 	/**
 	 * 
 	 * @return
 	 */
-	public List<String> listOpenContainerNames();
+	public List<String> listOpenContainerNames() throws CoronaException;
 
 	
 	/**
 	 * 
 	 * @return
 	 */
-	public List<String> listOpenContainerUris() throws ConfigurationException;
+	public List<String> listOpenContainerUris() throws CoronaException;
 	
 	/**
 	 * Find a list of ProjectContextContainer names which contain a RepositoryDescriptor with the given name
@@ -253,32 +254,32 @@
 	 * @return a list of Strings of ProjectContextContainer Names which hold a RepositoryDescriptor with the 
 	 * name repositoryName 
 	 */
-	public List<String> listOpenContainersWithRepository(String repositoryName);
+	public List<String> listOpenContainersWithRepository(String repositoryName) throws CoronaException;
 	
 	/**
 	 * 
 	 * @return
 	 * @throws ConfigurationException if method is called on uninitialized configuration. 
 	 */
-	public List<String> listContainerUris() throws ConfigurationException;
+	public List<String> listContainerUris() throws CoronaException;
 
 	/**
 	 * return the uri of the ContainerManager, Container manager is a singleton
 	 * @return uri of the ContainerManager
 	 */
-	public String getHomeIdentifier();
+	public String getHomeIdentifier() throws CoronaException;
 	
 	/**
 	 * return the webservice uri of the ContainerManager Server, Container manager is a server side component
 	 * @return uri of the ContainerManager
 	 */
-	public String getContainerManagerHomeUri();
+	public String getContainerManagerHomeUri() throws CoronaException;
 
 	/**
 	 * Not sure how configuration of the ContainerManager is really going to work.
 	 * @param config
 	 */
-	public void configure(IContainerConfiguration config);
+	public void configure(IContainerConfiguration config) throws CoronaException;
 	
 	/**
 	 * Close the ContainerManager.
@@ -287,19 +288,19 @@
 	 * closed and no longer needed.  It provides the opportunity
 	 * for the container manager to clean-up and close its resources.
 	 */
-	public void close();
+	public void close() throws CoronaException;
 	
 	/**
 	 * Method refreshs the manager context. Usually called when corona
 	 * configuration directory changes.
 	 * @throws ConfigurationException if refresh operation fails.
 	 */
-	public void refresh() throws ConfigurationException;
+	public void refresh() throws CoronaException;
 
 	/**
 	 * Dummy method which checks whether ContainerManager is accessible from
 	 * the client side.
 	 */
-	public void checkConnection();
+	public void checkConnection() throws CoronaException;
 	
 }
\ No newline at end of file
Index: src/org/eclipse/corona/container/manager/ProjectContainerProxy.java
===================================================================
RCS file: /cvsroot/technology/org.eclipse.corona/plugins/org.eclipse.corona.container.manager/src/org/eclipse/corona/container/manager/ProjectContainerProxy.java,v
retrieving revision 1.17
diff -u -r1.17 ProjectContainerProxy.java
--- src/org/eclipse/corona/container/manager/ProjectContainerProxy.java	2 Nov 2006 11:24:29 -0000	1.17
+++ src/org/eclipse/corona/container/manager/ProjectContainerProxy.java	6 Nov 2006 13:00:01 -0000
@@ -52,13 +52,15 @@
 
 public class ProjectContainerProxy implements PropertyChangeListener {//implements IProjectContainerManager {
 
-	IProjectContainerManager projectContainerManager = null;
+	private IProjectContainerManager projectContainerManager = null;
 	static ProjectContainerProxy instance = null;
 	public static final String SERVER_CHANGED = "SERVER_CHANGED";
 
 	private ServiceTracker srvTrackerProjectEventFactory;
 	private ServiceTracker srvTrackerCollabEventAdmin;
 
+	//TODO remove temporary solution.
+	private String lastTry = null;
 	private String connectedToServer = null;
 	
 	private Set<PropertyChangeListener> listeners = new HashSet<PropertyChangeListener>(); 
@@ -133,6 +135,7 @@
 	public synchronized IProjectContainerManager connectToService(String serverUri) throws CoronaException {
 		try {
 			// try to connect to Project Container Manager service.
+			lastTry = serverUri;
 			projectContainerManager = ServiceConnectionUtility.connectToProjectContainerManagerService(serverUri);
 			String oldServerName = connectedToServer;
 			connectedToServer = serverUri;
@@ -145,7 +148,7 @@
 		}
 		//create local projectContainerManager if creating project container manager fails.
 		//for now method will throw an exception if it happens.
-		return projectContainerManager ;
+		return getProjectContainerManager() ;
 	}
 
 	/**
@@ -195,10 +198,10 @@
 	/**
 	 * 
 	 */
-	public void joinProject(String containerUri, IRepositoryResource memberObject) {
+	public void joinProject(String containerUri, IRepositoryResource memberObject) throws CoronaException {
 			Activator.getLogService().entering("joinProject(String containerUri, IRepositoryResource memberObject)");
 
-			projectContainerManager.joinProject(containerUri, memberObject);
+			getProjectContainerManager().joinProject(containerUri, memberObject);
 
 			
 			Activator.getLogService().exiting("joinProject(String containerUri, IRepositoryResource memberObject)");
@@ -209,11 +212,11 @@
 	 * 
 	 */
 	public ProjectContextContainer openProjectContainerForMember(
-			String containerUri, String memberName) throws NoTeamRepositoryException, ConfigurationException {
+			String containerUri, String memberName) throws NoTeamRepositoryException, CoronaException {
 
 		Activator.getLogService().entering("openProjectContainerForMember(String containerUri, String memberName)");
 
-		ProjectContextContainer projectContextContainer = projectContainerManager.openProjectContainerForMember(containerUri, memberName);			
+		ProjectContextContainer projectContextContainer = getProjectContainerManager().openProjectContainerForMember(containerUri, memberName);			
 		
 		 if (projectContextContainer != null){
 			 	cachedContainers.put(containerUri, projectContextContainer);
@@ -231,10 +234,10 @@
 	/**
 	 * 
 	 */
-	public void unjoinProject(String containerUri, String memberName) {
+	public void unjoinProject(String containerUri, String memberName) throws CoronaException {
 		Activator.getLogService().entering("unjoinProject(String containerUri, String memberName)");
 
-		projectContainerManager.unjoinProject(containerUri, memberName);
+		getProjectContainerManager().unjoinProject(containerUri, memberName);
 		
 		Activator.getLogService().exiting("unjoinProject(String containerUri, String memberName)");
 	}
@@ -242,10 +245,10 @@
 	/**
 	 * @throws ConfigurationException 
 	 */
-	public void addRelatedContainerUri(String containerUri, String relatedContainerUri) throws ConfigurationException {
+	public void addRelatedContainerUri(String containerUri, String relatedContainerUri) throws CoronaException {
 
 		Activator.getLogService().entering("addRelatedContainerUri(String containerUri, String relatedContainerUri)");
-		projectContainerManager.addRelatedContainerUri(containerUri, relatedContainerUri);
+		getProjectContainerManager().addRelatedContainerUri(containerUri, relatedContainerUri);
 		Activator.getLogService().exiting("addRelatedContainerUri(String containerUri, String relatedContainerUri)");
 
 	}
@@ -253,10 +256,10 @@
 	/**
 	 * 
 	 */
-	public void close() {
+	public void close() throws CoronaException {
 
 		Activator.getLogService().entering("close()");
-		projectContainerManager.close();
+		getProjectContainerManager().close();
 		Activator.getLogService().exiting("close()");
 	}
 
@@ -264,11 +267,11 @@
 	 * @throws ConfigurationException 
 	 * 
 	 */
-	public void closeContainer(String containerUri) throws ConfigurationException {
+	public void closeContainer(String containerUri) throws CoronaException {
 
 		Activator.getLogService().entering("closeContainer(String containerUri)");
 
-		projectContainerManager.closeContainer(containerUri);
+		getProjectContainerManager().closeContainer(containerUri);
 		
 //		ContextContainer container = cachedContainers.get(containerUri);
 //
@@ -288,19 +291,19 @@
 
 	// TODO I will have to think about whether the proxy will provide this
 	// method or not
-	public void configure(IContainerConfiguration config) {
+	public void configure(IContainerConfiguration config) throws CoronaException {
 		
 		Activator.getLogService().entering("configure(IContainerConfiguration config)");
-		projectContainerManager.configure(config);
+		getProjectContainerManager().configure(config);
 		Activator.getLogService().exiting("configure(IContainerConfiguration config)");
 	}
 
 	/**
 	 * 
 	 */
-	public String getHomeIdentifier() {
+	public String getHomeIdentifier() throws CoronaException {
 		Activator.getLogService().entering("getHomeIdentifier()");
-		String homeIdentifier = projectContainerManager.getHomeIdentifier();
+		String homeIdentifier = getProjectContainerManager().getHomeIdentifier();
 		Activator.getLogService().exiting("getHomeIdentifier()");
 		return homeIdentifier;
 	}
@@ -308,9 +311,9 @@
 	/**
 	 * 
 	 */
-	public Map getNameToContainerUriMap() {
+	public Map getNameToContainerUriMap() throws CoronaException {
 		Activator.getLogService().entering("getNameToContainerUriMap()");
-		Map nameToUriMap = projectContainerManager.getNameToContainerUriMap();
+		Map nameToUriMap = getProjectContainerManager().getNameToContainerUriMap();
 //		HashMap nameToUriMap = new HashMap();
 //		
 //		String[] containerUriArray = projectContainerManager.getContainerUriArray();
@@ -327,9 +330,9 @@
 	/**
 	 * 
 	 */
-	public Object getService(Bundle bundle, ServiceRegistration registration) {
+	public Object getService(Bundle bundle, ServiceRegistration registration) throws CoronaException {
 		Activator.getLogService().entering("getNameToContainerUriMap()");
-		Object serviceObj = projectContainerManager.getService(bundle, registration);
+		Object serviceObj = getProjectContainerManager().getService(bundle, registration);
 		Activator.getLogService().exiting("getNameToContainerUriMap()");
 		return serviceObj;
 	}
@@ -339,9 +342,9 @@
 	 * @throws ConfigurationException 
 	 * 
 	 */
-	public List listRelatedContainerUris(String containerUri) throws ConfigurationException {
+	public List listRelatedContainerUris(String containerUri) throws CoronaException {
 		Activator.getLogService().entering("listRelatedContainerUris(String containerUri)");
-		List relatedContainerUris = projectContainerManager.listRelatedContainerUris(containerUri);
+		List relatedContainerUris = getProjectContainerManager().listRelatedContainerUris(containerUri);
 		Activator.getLogService().exiting("listRelatedContainerUris(String containerUri)");
 		return relatedContainerUris;
 	}
@@ -350,9 +353,9 @@
 	 * @throws ConfigurationException 
 	 * 
 	 */
-	public List listAllRelatedContainerUris(String startContainerUri) throws ConfigurationException {
+	public List listAllRelatedContainerUris(String startContainerUri) throws CoronaException {
 		Activator.getLogService().entering("listAllRelatedContainerUris(String startContainer)");
-		List relatedContainers = projectContainerManager.listAllRelatedContainerUris(startContainerUri);
+		List relatedContainers = getProjectContainerManager().listAllRelatedContainerUris(startContainerUri);
 		Activator.getLogService().exiting("listAllRelatedContainerUris(String startContainer)");
 		return relatedContainers;
 	}
@@ -381,9 +384,9 @@
 	 * @throws ConfigurationException 
 	 * 
 	 */
-	public List listContainerUris() throws ConfigurationException {
+	public List listContainerUris() throws CoronaException {
 		Activator.getLogService().entering("listContainerUris()");
-		List containerUrisList = projectContainerManager.listContainerUris();
+		List containerUrisList = getProjectContainerManager().listContainerUris();
 		Activator.getLogService().exiting("listContainerUris()");
 		return containerUrisList;
 	}	
@@ -394,9 +397,9 @@
 	 * this shows a list of ContextContainers from the Corona SERVER not
 	 * client
 	 */
-	public List listOpenContainers() {
+	public List listOpenContainers() throws CoronaException {
 		Activator.getLogService().entering("listOpenContainers()");
-		List containerObjects = projectContainerManager.listOpenContainers();
+		List containerObjects = getProjectContainerManager().listOpenContainers();
 		Activator.getLogService().exiting("listOpenContainers()");
 		return containerObjects;
 	}
@@ -404,7 +407,7 @@
 	/**
 	 * @return a list of locally cached ContextContainers
 	 */
-	public List<ContextContainer> listCachedContainers() {
+	public List<ContextContainer> listCachedContainers() throws CoronaException {
 		Activator.getLogService().entering("listOpenContainers()");
 		List<ContextContainer> cachedContainerList = new ArrayList<ContextContainer>();
 		
@@ -427,7 +430,7 @@
 	 * This method lists locally cached Container Names
 	 * @return List of containers Names that are opened locally
 	 */
-	public List listCachedContainerNames() {
+	public List listCachedContainerNames() throws CoronaException {
 		Activator.getLogService().entering("listCachedContainerNames()");
 		
 		Collection<ContextContainer> values = cachedContainers.values();
@@ -451,7 +454,7 @@
 	 * This method lists locally cached Containers Uris
 	 * @return List of containers Uris that are opened locally
 	 */
-	public List<String> listCachedContainerUris() {
+	public List<String> listCachedContainerUris() throws CoronaException {
 		Activator.getLogService().entering("listOpenContainerUris()");
 				
 	    Set<String> keys = cachedContainers.keySet();
@@ -466,9 +469,9 @@
 
 	// TODO I will have to think about whether the proxy will provide this
 	// method or not
-	public IContainerConfiguration loadConfiguration(String containerPath) throws ConfigurationException {
+	public IContainerConfiguration loadConfiguration(String containerPath) throws CoronaException {
 		Activator.getLogService().entering("loadConfiguration(String containerPath)");
-		IContainerConfiguration config = projectContainerManager.loadConfiguration(containerPath);
+		IContainerConfiguration config = getProjectContainerManager().loadConfiguration(containerPath);
 		Activator.getLogService().exiting("loadConfiguration(String containerPath)");
 		return config;
 	}
@@ -478,10 +481,10 @@
 	 * 
 	 */
 	
-	public ContextContainer openContainer(String containerUri) throws ConfigurationException {
+	public ContextContainer openContainer(String containerUri) throws CoronaException {
 		Activator.getLogService().entering("openContainer(String containerUri)");
 				
-		ContextContainer container = projectContainerManager.openContainer(containerUri);
+		ContextContainer container = getProjectContainerManager().openContainer(containerUri);
 		cachedContainers.put(containerUri, container);
 		
 		Activator.getLogService().entering("openContainer(String containerUri)");
@@ -495,13 +498,13 @@
 	 * @throws ConfigurationException
 	 */
 	public ProjectContextContainer openProjectContainer(String containerUri)
-			throws ConfigurationException {
+				throws CoronaException {
 		Activator.getLogService().entering(
 				"openProjectContainer(String containerUri)");
 
 		ContextContainer container = null;
 		ProjectContextContainer projectContainer = null;
-		container = projectContainerManager.openContainer(containerUri);
+		container = getProjectContainerManager().openContainer(containerUri);
 
 		cachedContainers.put(containerUri, container);
 		
@@ -528,18 +531,18 @@
 	 * @throws ConfigurationException 
 	 * 
 	 */	
-	public void removeRelatedContainerUri(String containerUri, String relatedContainerUri) throws ConfigurationException {
+	public void removeRelatedContainerUri(String containerUri, String relatedContainerUri) throws CoronaException {
 		Activator.getLogService().entering("removeRelatedContainerUri(String containerUri, String relatedContainerUri)");
-		projectContainerManager.removeRelatedContainerUri(containerUri, relatedContainerUri);
+		getProjectContainerManager().removeRelatedContainerUri(containerUri, relatedContainerUri);
 		Activator.getLogService().exiting("removeRelatedContainerUri(String containerUri, String relatedContainerUri)");
 	}
 
 	/**
 	 * 
 	 */
-	public Object resolveContainer(String containerUri, IContainerConfiguration config) {
+	public Object resolveContainer(String containerUri, IContainerConfiguration config) throws CoronaException {
 		Activator.getLogService().entering("resolveContainer(String containerUri, IContainerConfiguration config)");
-		Object containerObject = projectContainerManager.resolveContainer(containerUri, config);
+		Object containerObject = getProjectContainerManager().resolveContainer(containerUri, config);
 		Activator.getLogService().exiting("resolveContainer(String containerUri, IContainerConfiguration config)");
 		return containerObject;
 	}
@@ -548,19 +551,16 @@
 	 * @throws ConfigurationException 
 	 * 
 	 */
-	public void saveContainer(String containerName) throws ConfigurationException {
+	public void saveContainer(String containerName) throws CoronaException {
 		Activator.getLogService().entering("saveContainer(String containerName)");
-		projectContainerManager.saveContainer(containerName);
+		getProjectContainerManager().saveContainer(containerName);
 		Activator.getLogService().exiting("saveContainer(String containerName)");
 	}
 
 	// TODO this should not be exposed
-	public void ungetService(Bundle bundle, ServiceRegistration registration, Object service) {
-
+	public void ungetService(Bundle bundle, ServiceRegistration registration, Object service) throws CoronaException {
 		Activator.getLogService().entering("ungetService(Bundle bundle, ServiceRegistration registration, Object service)");
-
-		projectContainerManager.ungetService(bundle, registration, service);
-
+		getProjectContainerManager().ungetService(bundle, registration, service);
 		Activator.getLogService().exiting("ungetService(Bundle bundle, ServiceRegistration registration, Object service)");
 		
 	}
@@ -568,10 +568,10 @@
 	/**
 	 * 
 	 */
-	public Map getUriToContainerNameMap() {
+	public Map getUriToContainerNameMap() throws CoronaException {
 		Activator.getLogService().entering("getUriToContainerNameMap()");
 		
-		Map uriToNameMap = projectContainerManager.getUriToContainerNameMap();
+		Map uriToNameMap = getProjectContainerManager().getUriToContainerNameMap();
 		Activator.getLogService().exiting("getUriToContainerNameMap()");
 		return uriToNameMap;
 	}
@@ -580,10 +580,10 @@
 	 * @throws ConfigurationException 
 	 * 
 	 */
-	public void closeProjectContainerForMember(String containerUri, String memberName) throws ConfigurationException {
+	public void closeProjectContainerForMember(String containerUri, String memberName) throws CoronaException {
 		Activator.getLogService().entering("closeProjectContainerForMember(String containerUri, String memberName)");
 		
-		projectContainerManager.closeProjectContainerForMember(containerUri, memberName);
+		getProjectContainerManager().closeProjectContainerForMember(containerUri, memberName);
 		
 		ContextContainer container = cachedContainers.get(containerUri);
 
@@ -603,9 +603,9 @@
 	/**
 	 * 
 	 */
-	public List listActiveMembers(String containerUri) {
+	public List listActiveMembers(String containerUri) throws CoronaException {
 		Activator.getLogService().entering("listActiveMembers(String containerUri)");
-		List activeMembers = projectContainerManager.listActiveMembers(containerUri);
+		List activeMembers = getProjectContainerManager().listActiveMembers(containerUri);
 		Activator.getLogService().exiting("listActiveMembers(String containerUri)");
 		
 		return activeMembers;
@@ -619,9 +619,9 @@
 	 * in the ContextContainer
 	 * @return List of ContextContainers that include a RepositoryDescriptor with the specified name
 	 */
-	public List listOpenContainersWithRepository(String repositoryName) {
+	public List listOpenContainersWithRepository(String repositoryName) throws CoronaException {
 		Activator.getLogService().entering("listOpenContainersWithRepository(String repositoryName)");
-		List openContainersWithRepository = projectContainerManager.listOpenContainersWithRepository(repositoryName);
+		List openContainersWithRepository = getProjectContainerManager().listOpenContainersWithRepository(repositoryName);
 		Activator.getLogService().exiting("listOpenContainersWithRepository(String repositoryName)");
 		return openContainersWithRepository;
 	}
@@ -634,7 +634,7 @@
 	 * in the ContextContainer
 	 * @return List of ContextContainers that include a RepositoryDescriptor with the specified name
 	 */
-	public List listCachedContainersWithRepository(String repositoryName) {
+	public List listCachedContainersWithRepository(String repositoryName) throws CoronaException {
 		Activator.getLogService().entering("listCachedContainersWithRepository(String repositoryName)");
 		
 		List openContainers = listCachedContainers();
@@ -706,7 +706,7 @@
 			try {
 				refresh();
 				propagateEvent(event);
-			} catch (ConfigurationException e) {
+			} catch (CoronaException e) {
 				// property changed to incorrecty directory.
 				// do not notify the listeners.
 			}
@@ -745,9 +745,9 @@
 	/**
 	 * {@inheritDoc}
 	 */
-	public void refresh() throws ConfigurationException {
+	public void refresh() throws CoronaException {
 		Activator.getLogService().entering("refresh()");
-		projectContainerManager.refresh();
+		getProjectContainerManager().refresh();
 		Activator.getLogService().exiting("refresh()");
 	}
 
@@ -778,5 +778,16 @@
 		return connectedToServer;
 	}
 
+	IProjectContainerManager getProjectContainerManager() throws CoronaException {
+		if (projectContainerManager == null) {
+			connectToService(lastTry);
+			//FIXME shoudl be done in more clear way, for now getProjectContainerManager method tries to create connection too.
+			if (projectContainerManager == null) {
+				throw new CoronaException("Corona is not connected to server. Connect to server.");
+			}
+		}
+		return projectContainerManager;
+	}
+
 
 }
Index: src/org/eclipse/corona/container/manager/IContainerManager.java
===================================================================
RCS file: /cvsroot/technology/org.eclipse.corona/plugins/org.eclipse.corona.container.manager/src/org/eclipse/corona/container/manager/IContainerManager.java,v
retrieving revision 1.8
diff -u -r1.8 IContainerManager.java
--- src/org/eclipse/corona/container/manager/IContainerManager.java	31 Oct 2006 12:08:41 -0000	1.8
+++ src/org/eclipse/corona/container/manager/IContainerManager.java	6 Nov 2006 13:00:01 -0000
@@ -19,6 +19,7 @@
 
 import java.util.List;
 
+import org.eclipse.corona.core.CoronaException;
 import org.eclipse.corona.core.resources.IContainerConfiguration;
 import org.eclipse.corona.core.resources.exceptions.ConfigurationException;
 import org.eclipse.corona.model.container.ContextContainer;
@@ -35,7 +36,7 @@
 	 * @return the ContainerConfiguration object
 	 * @throws ConfigurationException if configuration cannot be read.
 	 */
-	public IContainerConfiguration loadConfiguration(String containerUri) throws ConfigurationException;
+	public IContainerConfiguration loadConfiguration(String containerUri) throws CoronaException;
 
 
 	/**
@@ -46,7 +47,7 @@
 	 * @param containerConfig the configuration object for this this type of Container
 	 * @return resolved container.
 	 */
-	public Object resolveContainer(String containerUri, IContainerConfiguration containerConfig);
+	public Object resolveContainer(String containerUri, IContainerConfiguration containerConfig) throws CoronaException;
 	
 	/**
 	 * Open an existing ContextContainer, 
@@ -54,7 +55,7 @@
 	 * @return ContextContainer object
 	 * @throws ConfigurationException if configuration cannot be read.
 	 */
-	public ContextContainer openContainer(String containerUri) throws ConfigurationException;
+	public ContextContainer openContainer(String containerUri) throws CoronaException;
 	
 	/**
 	 * serializes the ContextContainer object to disk location specified in the ContainerConfiguration
@@ -62,7 +63,7 @@
 	 * @param containerUri uri used to uniquely identify the ContextContainer
 	 * @throws ConfigurationException if configuration is 
 	 */
-	public void saveContainer(String containerUri) throws ConfigurationException;
+	public void saveContainer(String containerUri) throws CoronaException;
 	
 	/**
 	 * Close the ContextContainer (however, a reference count of Container users
@@ -74,7 +75,7 @@
 	 *             when closeContainer is called on uninitialized
 	 *             configuration.
 	 */
-	public void closeContainer(String containerUri) throws ConfigurationException;
+	public void closeContainer(String containerUri) throws CoronaException;
 
 
 	/**
@@ -91,8 +92,8 @@
 	 */
 	//public Map getUriToContainerNameMap();
 
-	public String[] getContainerUriArray();
-	public String[] getContainerNameArray();
+	public String[] getContainerUriArray() throws CoronaException;
+	public String[] getContainerNameArray() throws CoronaException;
 
 	
 
@@ -105,7 +106,7 @@
 	 * @return List of String of related Containers' uris
 	 * @throws ConfigurationException if method is called when configuration is uninitialized.
 	 */
-	public List<String> listRelatedContainerUris(String containerUri) throws ConfigurationException;
+	public List<String> listRelatedContainerUris(String containerUri) throws CoronaException;
 	
 	/**
 	 * Get a list of the containers list as related to this container.  This list 
@@ -115,7 +116,7 @@
 	 * @param container ContextContainer object
 	 * @return List of String of related Containers' uris
 	 */
-	public List<ContextContainer> listRelatedContainers(ContextContainer container)throws ConfigurationException;
+	public List<ContextContainer> listRelatedContainers(ContextContainer container) throws CoronaException;
 	
 	/**
 	 * Get a list of all containers directly and indirectly related to this container.  This list 
@@ -129,7 +130,7 @@
 	 * not included in the list.
 	 * @throws ConfigurationException if method is called on uninitialized configuration.
 	 */
-	public List<String> listAllRelatedContainerUris(String startContainerUri) throws ConfigurationException;
+	public List<String> listAllRelatedContainerUris(String startContainerUri) throws CoronaException;
 	
 	/**
 	 * Get a list of all containers directly and indirectly related to this container.  This list 
@@ -142,7 +143,7 @@
 	 * not included in the list.
 	 * @throws ConfigurationException if method is called on uninitialized configuration.
 	 */
-	public List<ContextContainer> listAllRelatedContainers(ContextContainer startContainer) throws ConfigurationException;
+	public List<ContextContainer> listAllRelatedContainers(ContextContainer startContainer) throws CoronaException;
 	
 
 	/**
@@ -152,7 +153,7 @@
 	 * @param relatedContainerUri uri used to uniquely identify the related ContextContainer
 	 * @throws ConfigurationException if method is called on uninitialized configuration.
 	 */
-	public void addRelatedContainerUri(String containerUri, String relatedContainerUri) throws ConfigurationException;
+	public void addRelatedContainerUri(String containerUri, String relatedContainerUri) throws CoronaException;
 	
 	/**
 	 * Remove a containerUri String from the list of related Containers in specified ContextContainer
@@ -161,26 +162,26 @@
 	 * @param relatedContainerUri uri used to uniquely identify the related ContextContainer
 	 * @throws ConfigurationException if method is called on uninitialized configuration.
 	 */
-	public void removeRelatedContainerUri(String containerUri, String relatedContainerUri) throws ConfigurationException;
+	public void removeRelatedContainerUri(String containerUri, String relatedContainerUri) throws CoronaException;
 
 	/**
 	 * Use this method with caution it will cause all of the ContextContainer opened by ALL users to be serialized
 	 * from the Corona Server to the Corona Client
 	 * @return List of ContextContainers
 	 */
-	public List<ContextContainer> listOpenContainers();
+	public List<ContextContainer> listOpenContainers() throws CoronaException;
 
 	/**
 	 * Returns a List of ContextContainer Names (not Uris)
 	 * @return List of ContextContainer Names (not Uris)
 	 */
-	public List<String> listOpenContainerNames();
+	public List<String> listOpenContainerNames() throws CoronaException;
 	
 	/**
 	 * Return a List of ContextContainer Uris (not Names)
 	 * @return List of ContextContainer Uris (not Names)
 	 */
-	public List<String> listOpenContainerUris() throws ConfigurationException;	
+	public List<String> listOpenContainerUris() throws CoronaException;	
 
 	/**
      * Find a list of ProjectContextContainer names which contain a RepositoryDescriptor with the given name
@@ -189,32 +190,32 @@
 	 * @return a list of Strings of ProjectContextContainer Names which hold a RepositoryDescriptor with the 
 	 * name repositoryName 
 	 */
-	public List<String> listOpenContainersWithRepository(String repositoryName);
+	public List<String> listOpenContainersWithRepository(String repositoryName) throws CoronaException;
 	
 	/**
 	 * Method returns list of Container uris. 
 	 * @return list of Container uris.
 	 * @throws ConfigurationException if configuration could not be read correctly.
 	 */
-	public List<String> listContainerUris() throws ConfigurationException;
+	public List<String> listContainerUris() throws CoronaException;
 
 	/**
 	 * return the uri identifier for the ContainerManager, ContainerManager is a singleton
 	 * @return uri of the ContainerManager
 	 */
-	public String getHomeIdentifier();
+	public String getHomeIdentifier() throws CoronaException;
 
 	/**
 	 * return the webservice uri of the ContainerManager Server, Container manager is a server side component
 	 * @return uri of the ContainerManager
 	 */
-	public String getContainerManagerHomeUri();
+	public String getContainerManagerHomeUri() throws CoronaException;
 	
 	/**
 	 * Not sure how configuration of the ContainerManager is really going to work.
 	 * @param config
 	 */
-	public void configure(IContainerConfiguration config);
+	public void configure(IContainerConfiguration config) throws CoronaException;
 	
 	/**
 	 * Close the ContainerManager.
@@ -223,7 +224,7 @@
 	 * closed and no longer needed.  It provides the opportunity
 	 * for the container manager to clean-up and close its resources.
 	 */
-	public void close();
+	public void close() throws CoronaException;
 
 	/**
 	 * 
@@ -231,7 +232,7 @@
 	 * @param registration
 	 * @return
 	 */
-	public Object getService(Bundle bundle, ServiceRegistration registration);
+	public Object getService(Bundle bundle, ServiceRegistration registration) throws CoronaException;
 	
 	/**
 	 * 
@@ -239,13 +240,13 @@
 	 * @param registration
 	 * @param service
 	 */
-	public void ungetService(Bundle bundle, ServiceRegistration registration, Object service);
+	public void ungetService(Bundle bundle, ServiceRegistration registration, Object service) throws CoronaException;
 
 	/**
 	 * Dummy method which checks whether ContainerManager is accessible from
 	 * the client side.
 	 */
-	public void checkConnection();
+	public void checkConnection() throws CoronaException;
 
 //	public Resource getResource(EndpointReference epr);
 

Back to the top