Return-Path: X-Original-To: apmail-openejb-users-archive@www.apache.org Delivered-To: apmail-openejb-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6C52B97FE for ; Tue, 17 Jan 2012 19:34:32 +0000 (UTC) Received: (qmail 43829 invoked by uid 500); 17 Jan 2012 19:34:32 -0000 Delivered-To: apmail-openejb-users-archive@openejb.apache.org Received: (qmail 43763 invoked by uid 500); 17 Jan 2012 19:34:31 -0000 Mailing-List: contact users-help@openejb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@openejb.apache.org Delivered-To: mailing list users@openejb.apache.org Received: (qmail 43752 invoked by uid 99); 17 Jan 2012 19:34:31 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Jan 2012 19:34:31 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of rmannibucau@gmail.com designates 209.85.216.176 as permitted sender) Received: from [209.85.216.176] (HELO mail-qy0-f176.google.com) (209.85.216.176) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Jan 2012 19:34:25 +0000 Received: by qcsp19 with SMTP id p19so2805123qcs.35 for ; Tue, 17 Jan 2012 11:34:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=EBx3zwVPRilgLycPAWeBcAtXULXCGlEz4ygDqCcj8Ow=; b=n0k9iSWnlCxUPo/xIEvDcgPYTyX2s5vzw+Ocet32v5/WYo8ZufvIOKXXNU2NoXX2wN mt5xwzl+NhLdn9pKJKsUUQBsGbWmi0tuAb/9bnQZ2srrIlrqUf1kCpLbleKX+frdVXTZ 3uDMH6WtNcAuSk03/0Zm2msS3qZ8r7qsEXYyc= Received: by 10.229.76.202 with SMTP id d10mr6837548qck.21.1326828844304; Tue, 17 Jan 2012 11:34:04 -0800 (PST) MIME-Version: 1.0 Received: by 10.229.192.21 with HTTP; Tue, 17 Jan 2012 11:33:43 -0800 (PST) In-Reply-To: References: From: Romain Manni-Bucau Date: Tue, 17 Jan 2012 20:33:43 +0100 Message-ID: Subject: Re: Telnet server To: users@openejb.apache.org Content-Type: multipart/alternative; boundary=e0cb4e5934f2f14a7004b6be6956 --e0cb4e5934f2f14a7004b6be6956 Content-Type: text/plain; charset=ISO-8859-1 sure (for the jira) if it can help: -> in the pom: org.codehaus.groovy groovy-all 2.0.0-beta-1 -> 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 > 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 > 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 > > > >> 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 > >> 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 > >> > > >> >> 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 ? > >> >> > >> > --e0cb4e5934f2f14a7004b6be6956--