You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
This uses a horrible workaround with reflection but there doesn't
appear to be another solution until
epics-base/epicsCoreJava#100 is addressed.
The other option would be to skip these tests but they are fairly
essential to the Malcolm scanning infrastructure.
Change-Id: I3c96eb2de4b5133659854c74427bb993f9443e8e
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 toServerContextImpl
(which has a useful factory method to start the server and give access to theServerContextImpl
in order to call e.gshutdown
ordestroy
). This is because the containing package is namedorg.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 viaServerFactory
? TheServerContext
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. CallingServerFactory.start()
creates a new server every time.The text was updated successfully, but these errors were encountered: