3 Replies Latest reply on Feb 27, 2008 2:55 PM by Srinivasan N. Raguraman

    Getting the Seam Component Names that were configured via components.xml

    Srinivasan N. Raguraman Newbie

      I have to create configurable infrastructure component. Also multiple instances of this component exist with different names throughout the application.

      So I created a seam component without @Name annotation. And registered multiple instances of the same component by giving them unique name in components.xml

      Install classes with no @Name annotation as Seam components—this is most useful for certain kinds of infrastructural components which can be installed multiple times different names (for example Seam-managed persistence contexts).

      In the create method, I verify whether the component is configured correctly. If it doesn't have the required parameters not set through components.xml, I would like through an exception saying: Your component : 'ComponentName' not configured correctly. Please check you components.xml

      But, I cannot get the name of the component through any API call.


      This works only if the name is provided through @Name annotation. The names of components that are only configured through components.xml are not available on this API call, also causes exception saying '@Name annotation not found.'

      We also need to be able to access the name of the configured components, for maintaining list of particular components registered via components.xml.

      It will be better if the name of the components that configured only through components.xml are also made available by the same API.

      Any thoughts?