AnsweredAssumed Answered

AbstractWebScript in JAR

Question asked by exel88 on Feb 25, 2011
Latest reply on Mar 24, 2011 by openpj
Buongiorno ragazzi,

scusandomi per il precedente thread che sono riuscito a risolvere da solo, vi scrivo per chiedervi un'informazione su come completare il deploy di un Web Script (abstract!) scritto in JAVA e impacchettato in un JAR.

Il mio albero delle directory interne al JAR, che poi inserisco in WEB-INF/lib di Alfresco, è la seguente:

. alfresco/
     . extension/
           . module-context-xml
           . module.properties
           . nomeDelWS.post.desc.xml
. it/
   . a/
       . b/
           . nomeDelWS/
                  . dao (contiene .class)
                          . maps (contiene gli xml di ibatis)
                  . domain (contiene .class)
                  . support (contiene .class)
                  . util (contiene .class)
                  . webscript
                        . ProtocolloFileUpload.class

Il file di configurazione module-context è:


<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans>
   <bean id="webscript.it.a.b.nomeDelWS.webscript.ProtocolloFileUpload.post" class="it.a.b.nomeDelWS.webscript.ProtocolloFileUpload"
      parent="webscript">

      <property name="authenticationService" ref="authenticationService" />
      <property name="nodeService" ref="nodeService" />
      <property name="namespaceService" ref="namespaceService" />
      <property name="fileFolderService" ref="fileFolderService" />
      <property name="contentService" ref="contentService" />
      <property name="searchService" ref="searchService" />
      <property name="authorityService" ref="authorityService" />
      <property name="transactionService" ref="transactionService" />
      <property name="permissionService" ref="permissionService" />
      <property name="categoryService" ref="categoryService" />
   </bean>

   <!– Parametri di connessione al DB –>
   <bean id="dataSourceProtocolloAlfrescoInsiel" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
      <property name="driverClassName" value="oracle.jdbc.driver.OracleDriver" />
      <property name="url" value="jdbc:oracle:thin:@xxx:1521:E3" />
      <property name="username" value="xxx" />
      <property name="password" value="xxx" />
   </bean>
   
   <bean id="transactionManagerProtocolloAlfrescoInsiel" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
      <property name="dataSource" ref="dataSourceProtocolloAlfrescoInsiel" />
   </bean>

   <bean id="sqlMapClientProtocolloAlfrescoInsiel" class="org.springframework.orm.ibatis.SqlMapClientFactoryBean">
      <property name="configLocation" value="classpath:sql-map-config.xml" />
      <property name="dataSource" ref="dataSourceProtocolloAlfrescoInsiel" />
   </bean>

   <bean id="daoSupportProtocolloAlfrescoInsiel" class="it.insiel.archprot.protocolloAlfrescoInsiel.dao.DAOUtils">
      <property name="sqlMapClient" ref="sqlMapClientProtocolloAlfrescoInsiel" />
   </bean>

   <bean id="interactionsDAOProtocolloAlfrescoInsiel" class="it.insiel.archprot.protocolloAlfrescoInsiel.dao.InteractionsDAO">
      <property name="support" ref="daoSupportProtocolloAlfrescoInsiel" />
   </bean>

</beans>


e



<?xml version="1.0" encoding="UTF-8"?>

<webscript>
   <shortname>nome del ws</shortname>
   <description>bla bla bla</description>
   <url>a/b/nomeDelWS</url>
   <authentication>none</authentication>
</webscript>


Probabilmente sbaglio la locazione dei file di configurazione. Il mio problema è di cercare di mantenere tutti i file dentro il JAR. E' possibile? Grazie,


Andrea

Outcomes