Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Java Server Toolkit and services ...

4 views
Skip to first unread message

ash

unread,
Mar 28, 1998, 3:00:00 AM3/28/98
to

hi everyone,

I have been trying to write a new service using the Sun
JavaServerToolkit. Has anyone else done that ?

As suggested in the help with the toolkit, I tried implementing an
EchoOne service. I tried implementing the EndPointHandler Protocol.It
compiles fine but I am not able to run it. I tried running by copying
the jserv file which comes with the toolkit and substitituting
EchoOneServiceHandler for the server name to run. I run it I get the
following
message

ld.so.1: /usr/local/jdk1.1.5/bin/sparc/green_threads/java: fatal:
libserver.so:
can't open file: errno=2 (libserver.so)
Unknown Product UNRECOVERABLE ERROR: Cannot start services.
java.lang.Exception: Server EchoServiceHandler has no property
directory.
Please check that the server name is correct.
at
com.sun.server.ServiceManager.loadServiceNames(ServiceManager.java:836)
at
com.sun.server.ServiceManager.startServices(ServiceManager.java:344)
at com.sun.server.ServerProcess.main(ServerProcess.java:229)

It would be great if anyone could tell me more about this. Any
ideas/input would be greatly appreciated.

Thankx a lot in advance ...

have a nice day ...

- Ash


ash

unread,
Mar 28, 1998, 3:00:00 AM3/28/98
to

ash

unread,
Mar 28, 1998, 3:00:00 AM3/28/98
to

ash

unread,
Mar 28, 1998, 3:00:00 AM3/28/98
to

ash

unread,
Mar 28, 1998, 3:00:00 AM3/28/98
to

David Harvey-George

unread,
Mar 30, 1998, 3:00:00 AM3/30/98
to swa...@cs.uga.edu


ash wrote:

> hi everyone,
>
> I have been trying to write a new service using the Sun
> JavaServerToolkit. Has anyone else done that ?

Yup, I've written an SMTP service and a database middle tier. There are a
few nits.

> As suggested in the help with the toolkit, I tried implementing an
> EchoOne service. I tried implementing the EndPointHandler Protocol.It
> compiles fine but I am not able to run it. I tried running by copying
> the jserv file which comes with the toolkit and substitituting
> EchoOneServiceHandler for the server name to run. I run it I get the
> following
> message

>

blah blah blah deleted

> - Ash

The Sun documentation is pish poor, but what's new? Try the following
these notes(example is for an imaginary QuzaCMS server, just substitute
your own names) . When I get a chance I'll tidy this and put it on my Web
site:-


================= cut here =================

Creating Services with the Java Server Toolkit
(c) David Harvey-George
http://www.threewiz.demon.co.uk/
Version 0.1
Status: under construction
Created: Tuesday, 24 February 1998
Last Update: Tuesday, 24 February 1998

Under the directory: <server_root>/properties/server/javaserver, you will
have the following files
administer_services.properties
adminservice
secureservice
server.properties
webpageservice
QuzaCMS

Edit: administer_services.properties:
Add the QuzaCMS service to the list of services, The name corresponds
to the directory name.
server.service.administer=webpageservice secureservice adminservice
QuzaCMS

Edit: server.properties:
Add the QuzaCMS service to the list of servers to be started
automatically:

# Services to start automatically
server.service.autostart=adminservice webpageservice QuzaCMS


Under the directory: QuzaCMS, you will create:
adminUI.properties
endpoint.properties
service.properties

Create: adminUI.properties:
# adminUI.properties
#

# Categories
admin.ui.Category.1.config.Setup=images/SetupIcon.gif

# Sections
admin.ui.config.1.Basic=com.sun.server.admin.toolkit.BasicEndpoint
admin.ui.config.2.Tuning=com.sun.server.admin.toolkit.EndpointTuning

Create: endpoint.properties:

# endpoint.properties
#
# Endpoint properties
#
endpoint.main.class=com.sun.server.TcpServiceEndpoint
endpoint.main.handler=com.quza.cmt.QuzaCMTService
endpoint.main.interface=*
endpoint.main.port=2000

endpoint.main.backlog=50
endpoint.main.min.threads=3
endpoint.main.max.threads=10

# handler expire timeout in seconds
endpoint.main.timeout=300

# service shutdown grace period in seconds.
endpoint.main.grace=30

Create: service.properties NOTE here we use Sun's Service class, you may
subclass this to do your own stuff here. My RDBMS middle-tier has a
database update thread started from here.
:
# service.properties
#
# Echo Service Properties
#

# Service information
service.name=QuzaCMS
service.description=Quza CMS
service.vendor=Quza (Racal-Integralis Ltd)
service.version=0.11
service.class=com.sun.server.Service


Under the directory: <server_root>/lib

Stop server

Kill –9 <pid> # UNIX

Or

Net stop JavaServerToolkit # NT

Unpack jst.jar –

Jar xf jst.jar
Copy your new service's classes into tree –
Cp <dev_root>/com/quza/cmt/*.class <server_root>/lib/com/quza/cmt

Archive classes
Jar cf jst.jar

Start Server
Jserv # Unix

Or

Net start JavaServerToolkit # NT


That's it!


David


David Harvey-George

unread,
Mar 30, 1998, 3:00:00 AM3/30/98
to
0 new messages