tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mansour Al Akeel <mansour.alak...@gmail.com>
Subject Re: Telnet server
Date Tue, 17 Jan 2012 22:10:15 GMT
It looks like the code is there already. Just needs to be registered.
I am wondering if that's all it needs.

http://svn.apache.org/repos/asf/openejb/trunk/sandbox/inactive/openejb-telnet/src/main/java/org/apache/openejb/server/telnet/GroovySh.java



On Tue, Jan 17, 2012 at 2:33 PM, Romain Manni-Bucau
<rmannibucau@gmail.com> wrote:
> sure (for the jira)
>
> if it can help:
> -> in the pom:
>    <dependency>
>      <groupId>org.codehaus.groovy</groupId>
>      <artifactId>groovy-all</artifactId>
>      <version>2.0.0-beta-1</version>
>    </dependency>
>
> -> in the code:
>        final Binding binding = new Binding();
>        // for all ejb
>               binding.setVariable(ejbname, ejbproxy);
>        shell = new GroovyShell(binding);
>
> then to get the result:
>
> private String result(final String value) {
>        final Object out = shell.evaluate(value);
>
>        if (out == null) {
>            return "null";
>        }
>        if (out instanceof Collection) {
>            final StringBuilder builder = new StringBuilder();
>            for (Object o : (Collection) out) {
>                builder.append(string(o));
>            }
>        }
>        if (out != null) {
>            return string(out);
>        }
>        return null;
>    }
>
>    private static String string(Object out) {
>        if (!out.getClass().getName().startsWith("java")) {
>            return ToStringBuilder.reflectionToString(out,
> ToStringStyle.SHORT_PREFIX_STYLE);
>        }
>        return out.toString();
>    }
>
>
> - Romain
>
>
> 2012/1/17 Mansour Al Akeel <mansour.alakeel@gmail.com>
>
>> I prefer to add it to the standalone server.
>> In fact I don't even see a reason to use telnet or ssh. It can be done
>> directly from the command line, after the server initialization.
>> I am looking at the code now, and will see if I can get it done.
>>
>> Do you think a JIRA ticket should be open as a feature request? Since
>> it will help using it for development.
>>
>>
>>
>> On Tue, Jan 17, 2012 at 2:06 PM, Romain Manni-Bucau
>> <rmannibucau@gmail.com> wrote:
>> > that's funny,
>> >
>> > today (@work) to avoid to develop a GUI i created a kind of webapp
>> console
>> > using groovy to execute code.
>> >
>> > that's not a bad idea to add this kind of tool to the webapp (for tomee)
>> or
>> > to a ssh server (probably using mina sshd)
>> >
>> > i'm currently looking something else but i could have a look in some
>> days.
>> >
>> > - Romain
>> >
>> >
>> > 2012/1/17 Mansour Al Akeel <mansour.alakeel@gmail.com>
>> >
>> >> I tried placing openejb-telnet-3.1.4.jar in "lib" directory for 4.0.0
>> >> beta-1.
>> >> It started the telnet server, and I am able to connect, but the
>> >> "system" command is not working.
>> >>
>> >> Romain, I am evaluating the options I have to use openEJB for
>> >> development. I am looking to create a setup, where I can modify EJB
>> >> code, recompile, redeploy, connect and query the beans for debugging
>> >> using telnet. It will be nice to be able to use something like groovy
>> >> to query and invoke EJBs methods.
>> >>
>> >>
>> >>
>> >> On Mon, Jan 16, 2012 at 10:46 AM, Romain Manni-Bucau
>> >> <rmannibucau@gmail.com> wrote:
>> >> > Hi,
>> >> >
>> >> > telnet module moved to the inactive branch:
>> >> > https://svn.apache.org/repos/asf/openejb/trunk/sandbox/inactive/
>> >> >
>> >> > so it is no more included in the trunk.
>> >> >
>> >> > Maybe adding old modules to the current version can be enough, i have
>> to
>> >> > admit i didn't try.
>> >> >
>> >> > - Romain
>> >> >
>> >> >
>> >> > 2012/1/16 Mansour Al Akeel <mansour.alakeel@gmail.com>
>> >> >
>> >> >> I don't see openejb 4, standalone has the telnet server. The file
>> under
>> >> >> conf/README.txt
>> >> >>
>> >> >> This directory contains nothing but this readme file at the time
>> >> >> OpenEJB is unpacked.  The first time OpenEJB is started however,
>> these
>> >> >> files will be created:
>> >> >>
>> >> >>  conf/
>> >> >>    openejb.xml                (main config file)
>> >> >>
>> >> >>    logging.properties         (log levels and files)
>> >> >>
>> >> >>    login.config               (jaas config file)
>> >> >>    users.properties           (users that can log in)
>> >> >>    groups.properties          (groups in which users belong)
>> >> >>
>> >> >>    admin.properties           (network socket for administration)
>> >> >>    ejbd.properties            (network socket for ejb invocations)
>> >> >>    hsql.properties            (network socket for hsql
client access)
>> >> >>    httpejbd.properties        (network socket for ejb invocations
>> over
>> >> >> http)
>> >> >>    telnet.properties          (network socket for telnet
"server")
>> >> >>
>> >> >>
>> >> >> But the telnet.properties is not created and copying and old one
does
>> >> not
>> >> >> solve the issue. Is this still supported in openEJB 4 ?
>> >> >>
>> >>
>>

Mime
View raw message