Warn on startup if EAP/WildFly too old

Well, perhaps, but it's only two lines, and both objects are used again, so
I can't extract them as a method without introducing something like a
closure/anon interface.

On 19 November 2014 09:43, Carlos Munoz <notifications@github.com> wrote:

> In zanata-war/src/main/java/org/zanata/ZanataInit.java:
>
> > +                return Optional.absent();
> > +            }
> > +            String version = (String) (server.getAttribute(name, "productVersion"));
> > +            return Optional.of(new DefaultArtifactVersion(version));
> > +        } catch (Exception e) {
> > +            log.debug(e.toString(), e);
> > +            return Optional.absent();
> > +        }
> > +    }
> > +
> > +    private Optional<DefaultArtifactVersion> getReleaseVersion()
> > +            throws AttributeNotFoundException, MBeanException,
> > +            ReflectionException, InstanceNotFoundException,
> > +            MalformedObjectNameException {
> > +        MBeanServer server = ManagementFactory.getPlatformMBeanServer();
> > +        ObjectName name = new ObjectName("jboss.as:management-root=server");
>
> Should we factor out this code and make it part of some JMXUtils class?
> Sounds like the kind of thing we should be using more and more.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/zanata/zanata-server/pull/636/files#r20548457>.
>