geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From IƱigo <...@nodo50.org>
Subject deploy a client application
Date Tue, 30 Aug 2005 18:03:12 GMT
Hello!
    Well, I am now deploying a client application. I want the 
application to use a pool connection to MySQL deployed in Geronimo. To 
achieve that, I think in the deployment plan file 
(geronimo-application-client.xml) I should refer to that resource (the 
pool connection) Here's how I have done that:

<?xml version="1.0" encoding="UTF-8"?>
<application-client 
xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-client"
clientConfigId="ejemplo/musica"
configId="EjemploCliente"
parentId="org/apache/geronimo/Server">
    <resource-ref>
        <ref-name>jdbc/DataSource</ref-name>
        <target-name>MySQL</target-name>
    </resource-ref>
    <resource>
        
<external-rar>c:/geronimo-1.0-M4/tranql/rars/tranql-connector-1.0-20050716.rar</external-rar>
        <connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector"
        version="1.5" configId="MySQLPool" 
parentId="org/apache/geronimo/Server">
        <dependency>
            
<uri>c:/geronimo-1.0-M4/repository/mysql/jars/mysql-connector-java-3.0.16-ga-bin.jar</uri>
        </dependency>

        <resourceadapter>
            <outbound-resourceadapter>
                <connection-definition>
                    
<connectionfactory-interface>javax.sql.DataSource</connectionfactory-interface>
                    <connectiondefinition-instance>
                        <name>MySQL</name>
                        <config-property-setting 
name="UserName">shevek</config-property-setting>
                        <config-property-setting 
name="Password">anarres</config-property-setting>
                        <config-property-setting 
name="Driver">org.gjt.mm.mysql.Driver</config-property-setting>
                        <config-property-setting 
name="ConnectionURL">jdbc:mysql://localhost:3306/prueba
                        </config-property-setting>
                        <connectionmanager>
                            <single-pool>
                                <max-size>10</max-size>
                                <min-size>2</min-size>
                                <match-one />
                            </single-pool>
                        </connectionmanager>
                        <global-jndi-name>MySQLPool</global-jndi-name>
                    </connectiondefinition-instance>
                </connection-definition>
            </outbound-resourceadapter>
        </resourceadapter>
        </connector>
    </resource>
</application-client>

and in the application-client deployment descriptor:
<?xml version="1.0" encoding="UTF-8" ?>
<application-client version="1.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee/application-client 1 
4.xsd">
    <display-name>Ejemplo de aplicacion cliente</display-name>
    <resource-ref>
        <res-ref-name>MySQL</res-ref-name>
        <res-type>javax.sql.DataSource</res-type>
        <res-auth>Container</res-auth>
    </resource-ref>
</application-client>

When I deploy the application the output is:

C:\geronimo-1.0-M4>java -jar bin\deployer.jar --user system --password 
manager deploy ../musica/dist/ejemploMusica.jar
    Error: Unable to distribute ejemploMusica.jar: App client module jar
    does not have Main-Class defined in the manifest:
    
C:\DOCUME~1\IIGOMU~1\CONFIG~1\Temp\deployer38933.tmpdir\ejemploMusica.jar

I suppose it's necessary to define the main class in the deployment 
descriptor, isn't it? Appart from that, I'm afraid I have something else 
wrong in the descriptors, but as usual I am not sure. Perhaps I have put 
too unnecesary data, I'm sorry.

Mime
View raw message