Skip to content

Provide functionality to stop pva server when running in OSGi #100

@joeshannon

Description

@joeshannon

A pva server can be created using ServerFactory.start() however, unless I am missing something, there doesn't appear to be any way to stop the server.

As we are consuming org.epics.pvaccess as an OSGi bundle for use in an Eclipse application we don't have access to ServerContextImpl (which has a useful factory method to start the server and give access to the ServerContextImpl in order to call e.g shutdown or destroy). This is because the containing package is named org.epics.pvaccess.server.impl.remote and therefore (by default) the maven-bundle-plugin doesn't export this as it contains 'impl'.

One solution might be to return a reference to the new ServerContext instance created via ServerFactory? The ServerContext interface is already importable/usable in OSGi as it's not in the 'impl' package.

This would be useful for tests where the server should be able to be started (@Before) and stopped (@After) in order to not interfere with other tests in the same execution. Calling ServerFactory.start() creates a new server every time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions