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. ============================================= 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 <[email protected]> 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 (cf > Deployer in osgi module) or a lookup. > > > > - Romain > > > 2012/1/17 Mansour Al Akeel <[email protected]> > >> 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 >> <[email protected]> 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 <[email protected]> >> > >> >> 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 >> >> <[email protected]> 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 <[email protected]> >> >> > >> >> >> 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 >> >> >> <[email protected]> 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 <[email protected]> >> >> >> > >> >> >> >> 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 ? >> >> >> >> >> >> >> >> >> >>
