Dieter Wimberger wrote:
The problem seems to be that I designed telnetd-osgi to be generic and
modular. One of the reasons why I "ported" to OSGi was actually the
standardized configuration mechanism....
Kind of the thing that makes OSGi frustrating for me sometimes:
You know a standard solution is there (like for configuration) but you
still need to figure and implement yet another non standard way.
(No offense taken or intended; just expressing a point of view here;
perfectly understand your point too.)
I don't know how this is handled in other bundles, maybe somebody got
a hint (probably being only API bundle dependent, but not on the
service implementation and try to hack around loading some property
files?).
If absolute (i.e. no API either) ConfigurationAdmin independence is an
indispensable requirement, then I am open to discuss it and help to
make it, but I personally won't use it, because I need the genericity
of the factories for the platform I am working on.
Yep, I understand your points. Clearly, it is difficult to have one
approach that works well for everyone. I am not against using these
other services to improve the overall flexibility of the solution, but
for someone, like me, who occasionally wants remote access to a running
framework, it is nice to just be able to drop in a single bundle and get it.
I won't claim to understand your overall design enough to propose a
sensible way to achieve this. :-)
-> richard
Regards,
Dieter
Otherwise, this all seems excellent.
Thanks :)
-> richard
Dieter Wimberger wrote:
Craig:
The actual listener (in the telnetd-osgi bundle) is a
ManagedServiceFactory. This means, that you can get instances of
independent and configurable telnet/ssh listeners through the
configuration mechanism.
From a glimpse at the PAX page, you may be able to use
pax-confman-propsloader-0.2.1.jar
to load a configuration for the factory (factoryPid is
net.wimpi.telnetd.service.TelnetListenerServiceFactory).
Check out
http://wiki.ops4j.org/confluence/display/ops4j/Pax+ConfMan
for usage.
The properties file may look something like:
secure=false
connection.startshell=org.apache.felix.shellconsole.ConsoleShell
name=Telnet Service
connection.housekeeping.interval=60000
port=6667
pkeypass=
floodprotection=10
connection.idle.warning=3000000
connection.idle.logout=60000
pkey=
connection.inputmode=character
connection.max=100
listener.autostart=true
I haven't tried it, but I think it may be doable.
Regards,
Dieter
On 24 Jun 2008, at 08:30, Craig Phillips wrote:
Hi,
I have the bundles installed and started... I seemingly only needed
to grab and install "commons.collection"; I have config admin
running, although I'm not sure about metatype... everything
resolved, but that doesn't necessarily mean I'm 100% operational...
speaking of operational...
OK, I apologize but I may need a bit of hand holding here...
So, I was doing netstat -a and I don't seem to find a listen port
for which to connect to a la telnet... I noticed a config xml with
a port default of 23... I tried that to no avail... I noticed you
mention a management utility like webconsole, which I also have no
knowledge of myself...
If someone out there can give me a hand / pointer, that would be
greatly appreciated...
here's my bundle list in config.properties:
felix.auto.start.1= file:bundle/commons-collections-3.2.1.jar
file:bundle/telnetd-osgi.jar
file:bundle/org.apache.felix.shellconsole.jar
file:bundle/org.osgi.compendium-1.0.1.jar
file:bundle/org.apache.felix.shell-1.0.1.jar
file:bundle/org.apache.felix.shell.tui-1.0.1.jar
file:bundle/org.apache.felix.configadmin-1.0.1.jar
file:bundle/org.apache.felix.bundlerepository-1.0.3.jar
file:bundle/org.apache.felix.scr-1.0.0.jar
file:bundle/pax-logging-api-1.0.0.jar
file:bundle/pax-logging-service-1.0.0.jar
file:bundle/pax-confman-propsloader-0.2.1.jar
file:bundle/example00.jar
Thanks again, Craig Phillips
From: Dieter Wimberger
Sent: Tue 6/24/2008 1:54 AM
To: [email protected]
Subject: Re: Telnet bundle
Richard, Craig:
I spend some hours to hack together:
1) a telnetd-osgi bundle with the min requirements (including SSH;
but no templates, Beanshell etc.).
Imports:
org.osgi.framework,org.osgi.service.cm,javax.crypto,javax.crypto.spec,org.slf4j,org.apache.commons.collections,org.apache.commons.collections.buffer,org.apache.commons.collections.list
You'll need the metatype and the configuration admin bundles, as
well as a commons-collections bundle.
2) a shellconsole bundle that registers a simple shell that
represents a glue to the Felix Shell Service (cleanroom, no old
code used at all)
You can temporally find the two bundles here:
http://www.karanet.at/~wimpi/felix/org.apache.felix.shellconsole.jar
http://www.karanet.at/~wimpi/felix/telnetd-osgi.jar
Note that the listeners are actually configured through the CM,
which means you need some management utility (like the webconsole,
which I honestly don't manage to run in felix yet).
The configuration for the start shell is:
org.apache.felix.shellconsole.ConsoleShell
Also, character mode is required for the telnet listener to behave
correctly.
Hope that you can run it; feedback is welcome.
Regards,
Dieter