You can annotate your config properties in the resource adapter with the
@ConfigProperty annotation, which enables you to set them via the admin
console or via REST while the glassfish is running and the JCA connector is
deployed. This will work by creating a resource-adapter-config (either via
asadmin with "asadmin create-resource-adapter-config" or the admin console or
via REST. The spec gives you hints on what you need to specify as parameters.
But keep in mind that the connector will be restarted after you set or alter
a resource-adapter-config... And you have to manually restart all
applications that use the connector, as glassfish will not deploy them (the
JCA spec also is a little unclear about this).
So if it is alright for you to restart at least the application(s), then you
could go with that. Let me know if you need some help on how to create a
resource-adapter-config via REST, as I think this is the best way to do that
programmatically...
And if you want to move your sun-ejb-jar stuff into the EJB, just use the
following annotation in your "implements ResourceAdapter" class:
@ConfigProperty
private Integer port = 5006;
@ConfigProperty
private String url = localhost;
These can be overridden with the resource-adapter-config.
Hope, I could help a little :-)
Regards,
Julius
--
[Message sent by forum member 'juliusblank']
View Post: http://forums.java.net/node/875933