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 D57649325 for ; Tue, 17 Jan 2012 22:33:34 +0000 (UTC) Received: (qmail 85879 invoked by uid 500); 17 Jan 2012 22:33:34 -0000 Delivered-To: apmail-openejb-users-archive@openejb.apache.org Received: (qmail 85853 invoked by uid 500); 17 Jan 2012 22:33:34 -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 85845 invoked by uid 99); 17 Jan 2012 22:33:33 -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 22:33:33 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of mansour.alakeel@gmail.com designates 209.85.210.176 as permitted sender) Received: from [209.85.210.176] (HELO mail-iy0-f176.google.com) (209.85.210.176) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Jan 2012 22:33:28 +0000 Received: by iagj37 with SMTP id j37so10624544iag.35 for ; Tue, 17 Jan 2012 14:33:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=T/yPJtUTsTyFIQYGNOV+sGvMM2b16UapwmPqBxLZifI=; b=La6oaqu6ZJuHZZYwTBpD2HoJvJEzbR3JJjYKsEs5nFEgtd2YIm6xfDLwzKVu1FqYmU IVYBClUAOh9EzyTlsunxPtB+/elDM49JW9OhmLWYFB6dhMIdAsPSzOeIHFwDM85FM+sV kuDoGRBYPWL1kt50LYtYeiPKt9VtomlITLi5E= MIME-Version: 1.0 Received: by 10.50.189.194 with SMTP id gk2mr16960762igc.0.1326839587785; Tue, 17 Jan 2012 14:33:07 -0800 (PST) Received: by 10.231.207.75 with HTTP; Tue, 17 Jan 2012 14:33:07 -0800 (PST) In-Reply-To: References: Date: Tue, 17 Jan 2012 17:33:07 -0500 Message-ID: Subject: Re: Telnet server From: Mansour Al Akeel To: users@openejb.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Romain, this is a bit confusing. I was not able to find anything relevant to openejb-karaf. I grepped as well the code for "ListEJB" but no luck. The other question, why do I need to list the ejbs or binding them ? >From the page : http://groovy.codehaus.org/api/groovy/lang/Binding.html public class Binding extends GroovyObjectSupport Represents the variable bindings of a script which can be altered from outside the script object or created outside of a script and passed into it. Binding instances are not supposed to be used in a multithreaded context. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D will it be ok to use it for this ? Can you please kindly elaborate ? On Tue, Jan 17, 2012 at 5:14 PM, Romain Manni-Bucau wrote: > bindings are missing. > > in openejb-karaf-command there is a ListEJBs command, simply do the same > and add it to the bindings. to get the ejbs you can either use a proxy (c= f > Deployer in osgi module) or a lookup. > > > > - Romain > > > 2012/1/17 Mansour Al Akeel > >> 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-t= elnet/src/main/java/org/apache/openejb/server/telnet/GroovySh.java >> >> >> >> On Tue, Jan 17, 2012 at 2:33 PM, Romain Manni-Bucau >> wrote: >> > sure (for the jira) >> > >> > if it can help: >> > -> in the pom: >> > =A0 =A0 >> > =A0 =A0 =A0org.codehaus.groovy >> > =A0 =A0 =A0groovy-all >> > =A0 =A0 =A02.0.0-beta-1 >> > =A0 =A0 >> > >> > -> in the code: >> > =A0 =A0 =A0 =A0final Binding binding =3D new Binding(); >> > =A0 =A0 =A0 =A0// for all ejb >> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 binding.setVariable(ejbname, ejbproxy); >> > =A0 =A0 =A0 =A0shell =3D new GroovyShell(binding); >> > >> > then to get the result: >> > >> > private String result(final String value) { >> > =A0 =A0 =A0 =A0final Object out =3D shell.evaluate(value); >> > >> > =A0 =A0 =A0 =A0if (out =3D=3D null) { >> > =A0 =A0 =A0 =A0 =A0 =A0return "null"; >> > =A0 =A0 =A0 =A0} >> > =A0 =A0 =A0 =A0if (out instanceof Collection) { >> > =A0 =A0 =A0 =A0 =A0 =A0final StringBuilder builder =3D new StringBuild= er(); >> > =A0 =A0 =A0 =A0 =A0 =A0for (Object o : (Collection) out) { >> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0builder.append(string(o)); >> > =A0 =A0 =A0 =A0 =A0 =A0} >> > =A0 =A0 =A0 =A0} >> > =A0 =A0 =A0 =A0if (out !=3D null) { >> > =A0 =A0 =A0 =A0 =A0 =A0return string(out); >> > =A0 =A0 =A0 =A0} >> > =A0 =A0 =A0 =A0return null; >> > =A0 =A0} >> > >> > =A0 =A0private static String string(Object out) { >> > =A0 =A0 =A0 =A0if (!out.getClass().getName().startsWith("java")) { >> > =A0 =A0 =A0 =A0 =A0 =A0return ToStringBuilder.reflectionToString(out, >> > ToStringStyle.SHORT_PREFIX_STYLE); >> > =A0 =A0 =A0 =A0} >> > =A0 =A0 =A0 =A0return out.toString(); >> > =A0 =A0} >> > >> > >> > - 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 don= e >> >> 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 som= e >> >> 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 EJ= B >> >> >> code, recompile, redeploy, connect and query the beans for debuggi= ng >> >> >> using telnet. It will be nice to be able to use something like gro= ovy >> >> >> 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 fi= le >> >> under >> >> >> >> conf/README.txt >> >> >> >> >> >> >> >> This directory contains nothing but this readme file at the tim= e >> >> >> >> OpenEJB is unpacked. =A0The first time OpenEJB is started howev= er, >> >> these >> >> >> >> files will be created: >> >> >> >> >> >> >> >> =A0conf/ >> >> >> >> =A0 =A0openejb.xml =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(main config = file) >> >> >> >> >> >> >> >> =A0 =A0logging.properties =A0 =A0 =A0 =A0 (log levels and files= ) >> >> >> >> >> >> >> >> =A0 =A0login.config =A0 =A0 =A0 =A0 =A0 =A0 =A0 (jaas config fi= le) >> >> >> >> =A0 =A0users.properties =A0 =A0 =A0 =A0 =A0 (users that can log= in) >> >> >> >> =A0 =A0groups.properties =A0 =A0 =A0 =A0 =A0(groups in which us= ers belong) >> >> >> >> >> >> >> >> =A0 =A0admin.properties =A0 =A0 =A0 =A0 =A0 (network socket for= administration) >> >> >> >> =A0 =A0ejbd.properties =A0 =A0 =A0 =A0 =A0 =A0(network socket f= or ejb invocations) >> >> >> >> =A0 =A0hsql.properties =A0 =A0 =A0 =A0 =A0 =A0(network socket f= or hsql client >> access) >> >> >> >> =A0 =A0httpejbd.properties =A0 =A0 =A0 =A0(network socket for e= jb invocations >> >> over >> >> >> >> http) >> >> >> >> =A0 =A0telnet.properties =A0 =A0 =A0 =A0 =A0(network socket for= telnet "server") >> >> >> >> >> >> >> >> >> >> >> >> But the telnet.properties is not created and copying and old on= e >> does >> >> >> not >> >> >> >> solve the issue. Is this still supported in openEJB 4 ? >> >> >> >> >> >> >> >> >> >>