[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[dsdp-tm-dev] RE: RSE Sample Subsystem "daytime"
|
Hi Dave's,
here comes - as promised - the daytime example I've created.
Please have a look at it and give me feedback regarding the
"known problems", which ones I should file in bugzilla against
the RSE, and which ones you think are bugs in my implementation.
The example contains a very simple subsystem for retrieving a
remote computer's time of day via TCP port 13, and it might
serve as a good starting point for all of us as we start
jumping on RSE.
Although the example is small, it does contain quite a few
classes in order to support the full RSE infrastructure.
This is good, since it helps anyone looking at it to adapt
it to their needs for more complex tasks. Still, I think
that for a tutorial, we should probably start with an even
simpler example that comes with the bare minimal infrastructure -
just a subsystem but no service, no adapters, no ConnectorService,
no ConnectorServiceManager - and then gradually expand it to
introduce the full infrastructure.
A few more notes:
Usage:
* The subsystem is registered against the "Unix" systemtype only.
So in order to test it, you need to create a "Unix" type connection.
* When you test the example, keep in mind that TCP port 13 is disabled
on most modern distributions. On a Linux host running xinetd, edit
/etc/xinetd.d/daytime and set "disable=no".
* You can also test it locally on Windows with the Cygwin system, when
you get the Net / xinetd package. Just configure in /etc/xinetd.d
and then start bin/xinetd.exe -- you can then connect to "localhost"
using the "Unix" systemtype.
* The subsystem was deliberately declared such that you explicitly
need to connect it before you get any results. Select "Daytime"
in the RSE view and choose right-click > connect. Enter just any
username and password.
* Once connected, you need to refresh the subsystem node again
(Right-click > Refresh) in order to be able to expand the child
node.
IP/Legal:
* Where I took existing IBM code and modified it, I kept the IBM
copyright notice and added my name / Wind River as contributor /
additional copyright owner.
* Where I just derived from an RSE abstract class, implemented an
interface or an extension point; but the entire "new" code came
from me, I used the WR-only copyright notice. This notice says
"initial API and implementation by (me)" -- I understand that this
applies to any additional (currently not existing) APIs in the
given file. Since the APIs that I just implement are defined in
other files, it doesn't apply to those of course.
* The 3 icons were copied from TPTP. As I understand EPL'd icons,
it is allowed to copy and re-use them in other projects.
Known Problems (potentially to be filed in bugzilla):
* It should not be necessary to enter username and password. I
guess the culprit code is in RSE's
SubSystem.setSubSystemConfiguration()
where supportsUserId() is used to check if a subsystem supports
connecting or not. This check doesn't seem appropriate to me,
since it might make sense to support connect/disconnect even
when no password is used. I ended up having to enable
supportsUserId() in the SubsystemConfiguration, otherwise the
"Connect" action would have been disabled in the UI.
* Trying to connect to a not existing host returns a rather ugly
error message. This should be improved, since the exception
returned from the daytime service is more informational than
what is currently displayed.
When I try to connect to a host that doesn't have port 13 enabled,
I get "Connection refused: connect" which is basically fine -- the
problem here is that the error message doesn't indicate which
connection or subsystem it applies to. This is problematic when
multiple subsystems / connections are connected at once. Since the
connect jobs may take a while to execute, we need to make sure that
the error messags tell us what they apply to.
* When I start trying to connect a non existing host, the "Connect" UI
action is still enabled while the connect job is executing. Using
it, launches another job. This is problematic. The UI action should
only provide "Disconnect" or, better yet, "Cancel connect", while
a connect job is already running.
* Once the Daytime subsystem connects to a remote host, it does not
refresh automatically, so the child nodes are not shown. How can
I force it to refresh the viewer (or the node) once it is connected?
* When I show a successfully connected daytime subsystem in the remote
monitor, I get a refreshed result (current time) in the remote
monitor but the RSE treeview is not updated. Is this deliberate?
I think that when our model is updated, we should also update the
tree in order to keep views in sync.
As soon as I enable the "Poll" checkbox, the treeviewer gets updated
together with the remote monitor.
* When I disconnect the Daytime Subsystem with the Remote Monitor
opened, I get an error message "Internal error occurred during:
Querying Daytime Subsystem".
java.lang.NullPointerException
at org.eclipse.rse.ui.view.monitor.MonitorViewPage$PollingThread
$1.run(MonitorViewPage.java:146)
* Could it be that some message translations are still missing?
In the PDE Runtime Error Log, I got "RSEG1022E"
* Suppose I'd want to use an unchanged RSE Release in my product,
but not want to see the default System Types (Unix,AIX, ...).
But I would want to use the Files subsystem for a different
(my own) system type. How would I get rid of the System Types
being shown?
* I noticed that //$NON-NLS-1$ is not used in RSE. We'd probably
want to use it in order to allow people to use the Preferences
/ Java Compiler / Errors / Externalized Strings warning.
I think that all those problems I found should be translated into
test cases we'd want to execute as part of our release test plans
(connect to non-existing; connect with remote ports disabled;
check refreshing and update policies).
So that's become a long E-Mail, but I hope you find
the example helpful!
Cheers,
Martin
--
Martin Oberhuber - WindRiver, Austria
+43(662)457915-85
Attachment:
rse_daytime_example.zip
Description: rse_daytime_example.zip