eclipse-tradista / tradista

Tradista: the first open source Financial Risk Management Solution
Apache License 2.0
9 stars 2 forks source link

Refactor TradistaServiceLocator #62

Closed oasuncion closed 1 year ago

oasuncion commented 2 years ago

There are redundant code in TradistaServiceLocator, this is a problem for the good maintenance of the class.

Use only the getService method to perform JNDI lookups, this for all services. Ensure to have the services static variables assigned with the result of the lookup, for example:

userService = (UserService) getService(userService, APP, CORE_EJB, USER_SERVICE_PACKAGE, "UserService");

Check again which is the best JNDI namespace(s) to use in this getService method (ejb: and/or java:global, other ?). For this, performance and portability are important aspects to consider. We also need to ensure that the service will be found for any kind of EJB clients in Tradista (these clients can be located in the same app, a different one, in the same app but in a different module, in a JavaFX client, etc...)

oasuncion commented 2 years ago

There is an issue with the ejb: JNDI namespace in WildFly 18.0.1.Final: https://issues.redhat.com/browse/WFLY-17178

The issue is not reproducible with WildFly 27.0.0.Beta1, so we will upgrade our WildFly version to 27 Final before implementing this ticket.

oasuncion commented 1 year ago

Explanation on the "ejb:" prefix: https://docs.jboss.org/author/display/AS72/JNDI%20Reference.html

oasuncion commented 1 year ago

TradistaServiceLocator has been refactored. This ticket will be delivered in v2.0.0.