Select Your Language

Infrastructure and Management

Cloud Computing

Storage

Runtimes

Integration and Automation

  • Comments
  • How to access propeties from module in ejb-jar.xml

    Posted on

    We are using MDB and Message Listener and in ejb-jar.xml we have to set MDB related properties using property file in the ejb-jar.xml file. These property files are defined in the JBOSS module.
    Could you please let me know how to access these properties in the ejb-jar.xml using JBOSS module.

    As a temporary solution, we have added system properties in the standalone-full.xml and we are using these system properties in the ejb-jar.xml file, however we have to read these properties from the property file using JBOSS module.

    Working code sample

    ejb-jar.xml
    
      
        PSInboundMessageListener
                com.xx.MessageListener
                Container
                
                    
                        destination
                        ${jndi.queue}
                    
                    
                        destinationType
                        ${destinationtype}
                    
                    
                        hostName
                        ${hostname}
                    
                    
                        port
                        ${mqconnection.port}
                    
                    
                        queueManager
                        ${queuemanager}
                    
                    
                        sslCipherSuite
                        ${sslCipherSuite}
                    
                    
                        useJNDI
                        true
                    
                    
                        channel
                        ${channel}
                    
                
    
                 
                    ejb/BeanFactoryPath
                    java.lang.String
                    applicationContext_File.xml
                 
        
    
    Standalone-full.xml
    
      
            
            
            
            
            
             
             
        
            
            
            
            
            
        
    
    Expected 
    
    
            
                
                    
                
            
      
    
    
    code from module.xml
    
     
         
             
    
         
    
    

    How to access properties defined in referencedata.xx.properties module in ejb-jar.xml for MDB configuration? or Is there any other way to access it to configure MDB?

    Appreciate your help and time.

    Thanks

    by

    points

    Responses

    Red Hat LinkedIn YouTube Facebook X, formerly Twitter

    Quick Links

    Help

    Site Info

    Related Sites

    © 2025 Red Hat