[ome-devel] [POC PATCH] Just try to get it to compile with Ice 3.4.1
Josh Moore
josh at glencoesoftware.com
Tue Jan 18 14:20:37 GMT 2011
Hi Johannes,
It's timely that you should have tried this out, as the core OMERO team is trying to decide which Ice versions to support:
http://www.openmicroscopy.org/site/community/minutes/conference-calls/2011/2011-01-11-tuesday-meeting
Most critical is who's running on which platforms and what is the least painful Ice installation for that platform.
As for Ice 3.4 support, I have a branch similar to yours, though I haven't updated mine since Ice-3.4-beta. The main difference is that rather than removing the fields from the *.ice files, it's possible to change the comment style in order for them to render properly. Rather than pushing anything with the 3.4b jars, I'll try to update this for 3.4.1 and make it available. But until then, here's the most useful commit on my branch:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: next-ticket1260-Ice.patch
Type: application/octet-stream
Size: 13034 bytes
Desc: not available
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-devel/attachments/20110118/f7aea925/attachment-0001.obj>
-------------- next part --------------
Cheers,
~Josh.
On Jan 14, 2011, at 12:22 AM, Johannes Schindelin wrote:
> While hackathoning, I fiddled with the compilation of OMERO last
> afternoon. This is what I came up with (it is based on r8897). It is _not_
> meant for application, just to show you what I had to change to get things
> to compile with Ice 3.4.1 (sorry, but with 3.3.1 I got way more
> compilation errors than with 3.4.1, so I did not even try to fix
> compilation with 3.3.1 as recommended).
>
> Disclaimer: my goal was just to see a "BUILD SUCCESSFUL" in the end,
> nothing more.
>
> You probably suspected that I tried to build in conjunction with Fiji, and
> that I maintain my changes in a source code repository. If you did, you
> are right on both accounts.
>
> This is where my OMERO changes live (note: this is Git, therefore expect
> the branch to be rewritten):
>
> http://pacific.mpi-cbg.de/cgi-bin/gitweb.cgi?p=omero/.git;a=shortlog;h=refs/heads/ice-3.4.1
>
> The patch in this mail reflects those changes.
>
> This is where the change to fiji.git lives (basically just a shell script
> which builds everything on a Linux/Ubuntu machine except what is safe to
> install from Ubuntu's package manager), until I am confident enough to
> merge it into our mainline:
>
> http://pacific.mpi-cbg.de/cgi-bin/gitweb.cgi?p=omero/.git;a=shortlog;h=refs/heads/ice-3.4.1
>
> I haven't dared to test things yet, but I thought that I should let you
> know of my compilation success with Ice 3.4.1. And maybe y'all want to
> tell me either that I am completely on the wrong track, or you have some
> suggestions how you'd like me to proceed.
>
> Ciao,
> Johannes
>
> .../ome/services/blitz/fire/SessionManagerI.java | 12 +-----------
> .../src/ome/services/blitz/impl/DeleteHandleI.java | 2 --
> .../src/ome/services/blitz/impl/ProjectionI.java | 4 ++--
> .../ome/services/blitz/impl/RenderingEngineI.java | 4 ++--
> .../services/blitz/util/CommonsLoggingAdapter.java | 4 ++++
> components/blitz/src/omero/client.java | 2 +-
> .../blitz/src/omero/grid/DeleteCallbackI.java | 2 +-
> 7 files changed, 11 insertions(+), 19 deletions(-)
>
> diff --git a/components/blitz/src/ome/services/blitz/fire/SessionManagerI.java b/components/blitz/src/ome/services/blitz/fire/SessionManagerI.java
> index 07f570e..9f80186 100644
> --- a/components/blitz/src/ome/services/blitz/fire/SessionManagerI.java
> +++ b/components/blitz/src/ome/services/blitz/fire/SessionManagerI.java
> @@ -120,10 +120,8 @@ public final class SessionManagerI extends Glacier2._SessionManagerDisp
>
> if (!loaded.get()) {
> WrappedCreateSessionException wrapped = new WrappedCreateSessionException();
> - wrapped.backOff = 1000L;
> wrapped.concurrency = true;
> wrapped.reason = "Server not fully initialized";
> - wrapped.type = "ApiUsageException";
> throw wrapped;
> }
>
> @@ -217,16 +215,10 @@ public final class SessionManagerI extends Glacier2._SessionManagerDisp
> else if (t instanceof ome.conditions.ConcurrencyException
> || t instanceof omero.ConcurrencyException) {
>
> - // Parse out the back off, then everything is generic.
> - long backOff = (t instanceof omero.ConcurrencyException) ? ((omero.ConcurrencyException) t).backOff
> - : ((ome.conditions.ConcurrencyException) t).backOff;
> -
> WrappedCreateSessionException wrapped = new WrappedCreateSessionException();
> - wrapped.backOff = backOff;
> - wrapped.type = t.getClass().getName();
> wrapped.concurrency = true;
> wrapped.reason = "ConcurrencyException: " + t.getMessage()
> - + "\nPlease retry in " + backOff + "ms. Cause: "
> + + "\nPlease retry in a while. Cause: "
> + t.getMessage();
> throw wrapped;
>
> @@ -254,10 +246,8 @@ public final class SessionManagerI extends Glacier2._SessionManagerDisp
> }
>
> WrappedCreateSessionException wrapped = new WrappedCreateSessionException();
> - wrapped.backOff = -1;
> wrapped.concurrency = false;
> wrapped.reason = t.getMessage();
> - wrapped.type = t.getClass().getName();
> wrapped.setStackTrace(t.getStackTrace());
> throw wrapped;
> }
> diff --git a/components/blitz/src/ome/services/blitz/impl/DeleteHandleI.java b/components/blitz/src/ome/services/blitz/impl/DeleteHandleI.java
> index c20c693..3d074f3 100644
> --- a/components/blitz/src/ome/services/blitz/impl/DeleteHandleI.java
> +++ b/components/blitz/src/ome/services/blitz/impl/DeleteHandleI.java
> @@ -282,9 +282,7 @@ public class DeleteHandleI extends _DeleteHandleDisp implements
> }
>
> LockTimeout lt = new LockTimeout();
> - lt.backOff = 5000;
> lt.message = "timed out while waiting on CANCELLED state";
> - lt.seconds = cancelTimeoutMs / 1000;
> throw lt;
>
> }
> diff --git a/components/blitz/src/ome/services/blitz/impl/ProjectionI.java b/components/blitz/src/ome/services/blitz/impl/ProjectionI.java
> index e8e0a95..ebcb9a9 100644
> --- a/components/blitz/src/ome/services/blitz/impl/ProjectionI.java
> +++ b/components/blitz/src/ome/services/blitz/impl/ProjectionI.java
> @@ -43,7 +43,7 @@ public class ProjectionI
> throws ServerError
> {
> callInvokerOnRawArgs(__cb, __current, pixelsId, pixelsType,
> - algorithm.value(), tStart, tEnd, channelList,
> + /* algorithm.value(), */ tStart, tEnd, channelList,
> stepping, zStart, zEnd, name);
> }
>
> @@ -53,7 +53,7 @@ public class ProjectionI
> Current __current) throws ServerError
> {
> callInvokerOnRawArgs(__cb, __current, pixelsId, pixelsType,
> - algorithm.value(), timepoint, channelIndex,
> + /* algorithm.value(), */ timepoint, channelIndex,
> stepping, start, end);
> }
> }
> diff --git a/components/blitz/src/ome/services/blitz/impl/RenderingEngineI.java b/components/blitz/src/ome/services/blitz/impl/RenderingEngineI.java
> index cc41ced..d257178 100644
> --- a/components/blitz/src/ome/services/blitz/impl/RenderingEngineI.java
> +++ b/components/blitz/src/ome/services/blitz/impl/RenderingEngineI.java
> @@ -374,7 +374,7 @@ public class RenderingEngineI extends AbstractAmdServant implements
> AMD_RenderingEngine_renderProjectedAsPackedInt __cb,
> ProjectionType algorithm, int timepoint, int stepping, int start,
> int end, Current __current) throws ServerError {
> - callInvokerOnRawArgs(__cb, __current, algorithm.value(), timepoint,
> + callInvokerOnRawArgs(__cb, __current, /* algorithm.value(), */ timepoint,
> stepping, start, end);
>
> }
> @@ -383,7 +383,7 @@ public class RenderingEngineI extends AbstractAmdServant implements
> AMD_RenderingEngine_renderProjectedCompressed __cb,
> ProjectionType algorithm, int timepoint, int stepping, int start,
> int end, Current __current) throws ServerError {
> - callInvokerOnRawArgs(__cb, __current, algorithm.value(), timepoint,
> + callInvokerOnRawArgs(__cb, __current, /* algorithm.value(), */ timepoint,
> stepping, start, end);
>
> }
> diff --git a/components/blitz/src/ome/services/blitz/util/CommonsLoggingAdapter.java b/components/blitz/src/ome/services/blitz/util/CommonsLoggingAdapter.java
> index bb6f860..7ddfc41 100644
> --- a/components/blitz/src/ome/services/blitz/util/CommonsLoggingAdapter.java
> +++ b/components/blitz/src/ome/services/blitz/util/CommonsLoggingAdapter.java
> @@ -31,6 +31,10 @@ public class CommonsLoggingAdapter implements Logger {
> this.log = logger;
> }
>
> + public Logger cloneWithPrefix(String prefix) {
> + throw new RuntimeException("TODO");
> + }
> +
> public void error(String message) {
> log.error(message);
> }
> diff --git a/components/blitz/src/omero/client.java b/components/blitz/src/omero/client.java
> index 9dff09a..c07f255 100644
> --- a/components/blitz/src/omero/client.java
> +++ b/components/blitz/src/omero/client.java
> @@ -619,7 +619,7 @@ public class client {
> if (!wrapped.concurrency) {
> throw wrapped; // We only retry concurrency issues.
> }
> - reason = wrapped.type + ":" + wrapped.reason;
> + reason = wrapped.reason;
> retries++;
> } catch (Ice.ConnectTimeoutException cte) {
> reason = "Ice.ConnectTimeoutException:" + cte.getMessage();
> diff --git a/components/blitz/src/omero/grid/DeleteCallbackI.java b/components/blitz/src/omero/grid/DeleteCallbackI.java
> index 2fb5b41..e181048 100644
> --- a/components/blitz/src/omero/grid/DeleteCallbackI.java
> +++ b/components/blitz/src/omero/grid/DeleteCallbackI.java
> @@ -123,7 +123,7 @@ public class DeleteCallbackI {
> int waited = (int) (ms / 1000) * loops;
> throw new LockTimeout(null, null,
> String.format("Delete unfinished after %s seconds",
> - loops, ms), 5000L, waited);
> + loops, ms));
> } else {
> return handle.report();
> }
> --
> 1.7.1.rc0.1687.g3bb03
>
> _______________________________________________
> ome-devel mailing list
> ome-devel at lists.openmicroscopy.org.uk
> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel
More information about the ome-devel
mailing list