Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EJB3 node identifier configuration #288

Open
eugenpro opened this issue Jan 23, 2024 · 1 comment
Open

EJB3 node identifier configuration #288

eugenpro opened this issue Jan 23, 2024 · 1 comment

Comments

@eugenpro
Copy link

Hello, when I'm using operator EJB3 identifier by default for each pod in statefulset is app-0.app-headless.app-namespace.svc.cluster.local,
Due to some local limitation I need it to be basically app-0 for instance. I've tried to reconfigure it through cli script with /subsystem=transactions:write-attribute(name=node-identifier,value="${jboss.hostname}"), but it does not affect. Is there any way to fix it? WildFly Core 15.0.32

@yersan
Copy link
Collaborator

yersan commented Jan 26, 2024

Hello @eugenpro

when I'm using operator EJB3 identifier by default for each pod in statefulset is app-0.app-headless.app-namespace.svc.cluster.local

The operator configures the client-mapping for the socked-binding used by the EJBs and uses the headless service name created for the StatefulSet. This configuration maps the StatefulSet pod DNS address as the destination address for the clients that use this socket.

This configuration is not exposed in the Operator custom resource, so if you need to change it, I think you will need to modify the socket-binding client-mapping configured on your server. I am not an EJB expert, but I think your EJB3 identifier is being calculated using this client-mapping. By default, this configuration is done under the /socket-binding-group=standard-sockets/socket-binding=http.

Due to some local limitation I need it to be basically app-0 for instance. I've tried to reconfigure it through cli script with /subsystem=transactions:write-attribute(name=node-identifier,value="${jboss.hostname}"), but it does not affect.

I guess you will need to continue using the name derived from the headless service to avoid any load balancing done by Kubernetes and to make the clients connect directly to the pod. I am not sure if using only the hostname will work, in addition, as soon as you need to call the EJB from a different namespace, it won't work either. I am being speculative here.

Maybe @tadamski can provide you with more information about how these EJB identifiers are calculated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants