AndreasFagschlunger / O2Xfs

Java API for accessing CEN/XFS API, EMV Level 2 Kernel
47 stars 28 forks source link

services.properties file name is mismatch #50

Closed jifffffy closed 6 years ago

jifffffy commented 6 years ago

Hi, I found https://github.com/AndreasFagschlunger/O2Xfs/blob/develop/at.o2xfs.operator/src/main/java/at/o2xfs/operator/task/xfs/PropertiesServiceLookup.java load the name of file is 'service.properties'. but https://github.com/AndreasFagschlunger/O2Xfs/blob/develop/at.o2xfs.xfs.service/src/main/java/at/o2xfs/xfs/service/lookup/impl/PropertiesXfsServiceLookupImpl.java load the name of the file is 'services.properties'. Please confirm whether these two files are the same file?

AndreasFagschlunger commented 6 years ago

Hello James!

Basically they are the same. In at.o2xfs.xfs.service it's a feature to open and register services automatically. This may be convenient, but in order to display the status/outcome for open and register o2xfs-operator utilizes it's own properties file.

jifffffy commented 6 years ago

Thank you for your reply! I encountered two problem:

  1. In at.o2xfs.xfs.service it opens all services by default. I want to open only a special service.
  2. In at.o2xfs.operator , The result of the task is displayed on the UI. I want to get the result in my own thread. Could you provide some suggestions?
AndreasFagschlunger commented 6 years ago

Hello!

As long as you don't provide a proper configuration (xfs.properties with XfsServiceLookup.Class entry), at.o2xfs.xfs.service shouldn't open any service per default.

So you have to call XfsServiceManager.openAndRegister(String, Class<? extends XfsService>) by yourself, which is exactly what at.o2xfs.operator does in its XfsStartUpTask.

jifffffy commented 6 years ago

Thanks, I will try it!