1

Is there anyway to automatically create resources mentioned in glassfish-resources.xml when the app is deploying. I know the way of creating resources via command line. But what i need is to create them automatically on the deploy

Gayan Dinuzhka
  • 331
  • 2
  • 5
  • 16

1 Answers1

1

Deployment Descriptor. An application-scoped resource is defined in the glassfish-resources.xml deployment descriptor file. This file is placed in the META-INF directory of the module or application archive. For web applications or modules, this file is placed in the WEB-INF directory. If any submodule archives of an enterprise application archive have their own glassfish-resources.xml files, the resource definitions are scoped to those modules only. For more information about the glassfish-resources.xml file, see Appendix B, GlassFish Server Deployment Descriptor Files and Appendix C, Elements of the GlassFish Server Deployment Descriptors.

Read more at Application-Scoped Resources.

Also check out (from the same guide) Deploying a Connector Module

You can also do it via annotations on a bean: How to create a jms Topic and TopicConnectionFactory programatically?

Community
  • 1
  • 1
John Manko
  • 1,828
  • 27
  • 51