AnsweredAssumed Answered

Abstract Webscript and JAR

Question asked by exel88 on Feb 28, 2011
Hi everyone,

I need an information for JAR Web Script deploying.

This is my folder tree in JAR file:

. alfresco/
     . extension/
           . module-context-xml
           . module.properties
           . nameWS.post.desc.xml
. it/
   . a/
       . b/
           . nameWS/
                  . dao ( .class)
                          . maps (iBatis XMLs)
                  . domain ( .class)
                  . support (c .class)
                  . util ( .class)
                  . webscript
                        . ProtocolloFileUpload.class

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.nameWS.webscript.ProtocolloFileUpload.post" class="it.a.b.nameWS.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>


and



<?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>


Probably I wrong the places where I put the configuration files.
Can I put all inside the JAR or I must externalize some of them?

Thank you!

Outcomes