Path setting for DLL's in JBOSS 7.1.1

前端 未结 1 1514
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-03 06:03

We have some DLL\'s which are related to Java,VB. In Joss 4.X , We used to place in bin directory under Application Server.

We migrated to

1条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-03 06:52

    Configure module.xml as below:

    
        
            
            
            
        
    
       
           
        
    
    

    Put the DLLs into the directory lib/win-x86_64. Check the another dependencies of your project.

    In WEB-INF of your application creating the file jboss-deployment-structure.xml and put the content below:

    
      
         
            
         
      
    
    

    That's all.

    Another Question: How can you make these properties files accessible to applications deployed on JBoss 7?

    create a custom module where you put your properties files and put jboss-deployment-structure.xml to your application archive (WAR/EAR) to use that custom module.

    Create the new module directory under $JBOSS_HOME/modules(using app/conf in this example)

    mkdir -p $JBOSS_HOME/modules/app/conf/main/properties/
    

    Put your properties files in $JBOSS_HOME/modules/app/conf/main/properties/

    Create a module.xmlhere $JBOSS_HOME/modules/app/conf/main/module.xml

    
       
          
       
    
    

    put the following jboss-deployment-structure.xml in WEB-INF:

    
    
       
          
                
       
       
    
    

    Then you can access your properties files using thecode below (example assumes you have a example.propertiesfile in $JBOSS_HOME/modules/app/conf/main/properties/)

    Thread.currentThread().getContextClassLoader().getResource("example.properties");
    

    Ps: I used JBoss AS 7.1.2 ( JBoss EAP 6 )

    Regards Mauricio Magnani

    0 讨论(0)
提交回复
热议问题