geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "mika" <mika.wo...@gentlemansclub.de>
Subject Re: Deploying an J2EE JAR needs GBean ???
Date Fri, 21 Jul 2006 06:17:38 GMT
web.xml:
========
<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN' 'http://java.sun.com/dtd/web-app_2_3.dtd'>

<web-app>
  <display-name>Services</display-name>
  
  <!--  this parameters defines the TransConnect service components
        and must be defined gapless in ascending order -->
  <context-param>
    <param-name>Service1</param-name>
    <param-value>com.myApp.OutboundServer</param-value>
  </context-param>
  <context-param>
    <param-name>Service2</param-name>
    <param-value>com.myApp.MessageQueueService</param-value>
  </context-param>
  <context-param>
    <param-name>Service3</param-name>
    <param-value>com.myApp.SchedulingService</param-value>
  </context-param>
  <context-param>
    <param-name>Service4</param-name>
    <param-value>com.myApp.HL7Service</param-value>
  </context-param>
  <context-param>
    <param-name>Service5</param-name>
    <param-value>com.myApp.CacheService</param-value>
  </context-param>
  <context-param>
    <param-name>Service6</param-name>
    <param-value>com.myApp.FileService</param-value>
  </context-param>
  <context-param>
    <param-name>Service7</param-name>
    <param-value>com.sqlgmbh.tcsap.ha.ProxyHeartbeat</param-value>
  </context-param>
  <!--
  <context-param>
    <param-name>Service8</param-name>
    <param-value>com.myApp.DICOMServer</param-value>
  </context-param>
  -->
  <!--
  <context-param>
    <param-name>Service9</param-name>
    <param-value>com.myApp.HCMService</param-value>
  </context-param>
  -->
  
  <!-- TransConnect startup handler -->
  <listener>
    <listener-class>com.myApp.ServiceEventListener</listener-class>
  </listener>
  
  <!-- declare servlets/JSPs -->
  <servlet>
    <servlet-name>SaveKey</servlet-name>
    <display-name>SaveKey</display-name>
    <jsp-file>/SaveKey.jsp</jsp-file>
  </servlet>
  <servlet>
    <servlet-name>ServiceServlet</servlet-name>
    <display-name>ServiceServlet</display-name>
    <servlet-class>com.myApp.ServiceServlet</servlet-class>
  </servlet>
  <servlet>
    <servlet-name>ShowId</servlet-name>
    <display-name>ShowId</display-name>
    <jsp-file>/ShowId.jsp</jsp-file>
  </servlet>
  <servlet>
    <servlet-name>HttpClientInterface</servlet-name>
    <display-name>HttpClientInterface</display-name>
    <servlet-class>com.myApp.HttpClientInterface</servlet-class>
  </servlet>
  <servlet>
    <servlet-name>ClientInterfaceForm</servlet-name>
    <display-name>ClientInterfaceForm</display-name>
    <jsp-file>/ClientInterfaceForm.jsp</jsp-file>
  </servlet>
  
  <!-- map servlets/JSPs to URL patterns-->
  <servlet-mapping>
    <servlet-name>SaveKey</servlet-name>
    <url-pattern>/SaveKey</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>ServiceServlet</servlet-name>
    <url-pattern>/init</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>ShowId</servlet-name>
    <url-pattern>/ShowId</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>HttpClientInterface</servlet-name>
    <url-pattern>/HttpClientInterface</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>ClientInterfaceForm</servlet-name>
    <url-pattern>/Testform</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>ClientInterfaceForm</servlet-name>
    <url-pattern>/Test</url-pattern>
  </servlet-mapping>
  
  <!-- define session timeout -->
  <session-config>
    <session-timeout>300</session-timeout>
  </session-config>
  
  <!-- define index page -->
  <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
  </welcome-file-list>
  
  <!-- map EJB references -->
  <ejb-ref>
    <ejb-ref-name>ejb/clientInterface</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <home>com.myApp.EJBClientInterfaceHome</home>
    <remote>com.myApp.EJBClientInterface</remote>
  </ejb-ref>
  
  <!-- specify login method -->
  <login-config>
        <auth-method>BASIC</auth-method>
        <realm-name>connector</realm-name>
  </login-config>
  
  <!-- list roles for this website -->
  <security-role>
        <role-name>UserRole</role-name>
  </security-role>
  <security-role>
        <role-name>AdminRole</role-name>
  </security-role>
  
  <!-- secure all sites and grant access to the roles -->
  <security-constraint>
        <web-resource-collection>
            <web-resource-name>TransConnect ClientInterface</web-resource-name>
            <url-pattern>/*</url-pattern>
        </web-resource-collection>
        <auth-constraint>
            <role-name>UserRole</role-name>
        </auth-constraint>
  </security-constraint>
  <security-constraint>
        <web-resource-collection>
            <web-resource-name>TransConnect ClientInterface</web-resource-name>
            <url-pattern>/ShowId</url-pattern>
            <url-pattern>/SaveKey</url-pattern>
        </web-resource-collection>
        <auth-constraint>
            <role-name>AdminRole</role-name>
        </auth-constraint>
  </security-constraint>
  
</web-app>
--------------------------------------------------------------------------
geronimo-web.xml:
=================
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.1">
    <environment>
        <moduleId>
            <artifactId>mySERVERwebAPP</artifactId>
        </moduleId>
    </environment>

    <context-root>/connector</context-root>

    <security-realm-name>geronimo-properties-realm</security-realm-name>
    <security>
        <default-principal>
            <principal name="anonymous"
class="org.apache.geronimo.security.realm.providers.GeronimoUserPrincipal"
            />
        </default-principal>
        <role-mappings>
            <role role-name="AdminRole">
                <principal name="administrators" designated-run-as="true"
class="org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal"
                />
                <principal name="root"
class="org.apache.geronimo.security.realm.providers.GeronimoUserPrincipal"
                />
            </role>
        </role-mappings>
    </security>

  <ejb-ref>
     <ref-name>ejb/clientInterface</ref-name>
     <pattern>
        <artifactId>ejb</artifactId>
        <name>ClientInterfaceJAR/EJBClientInterfaceEJB</name>
     </pattern>
  </ejb-ref>
<!--
  <gbean name="ejb/clientInterface" class="com.myApp.EJBClientInterfaceHome" />
-->
</web-app>
--------------------------------------------------------------------------
> and my error-message:
> =====================
> Using GERONIMO_BASE:   C:\ApplicationServers\geronimo-1.1
> Using GERONIMO_HOME:   C:\ApplicationServers\geronimo-1.1
> Using GERONIMO_TMPDIR: C:\ApplicationServers\geronimo-1.1\var\temp
> Using JRE_HOME:        C:\Programme\Java\jre1.5.0_06
>     Error: Unable to distribute transconnect.ear: Unable to initialize
>     webapp GBean for myserver.war
>
>         Qualifier patterns in the URLPatternSpec cannot match the first
>     URLPattern

I've made some little changes, but they should not be significant.

I hope you can help me...

As I said I am totally new at Geronimo. The purpose of it is to deploy an EAR in the common
application servers. And Geronimo is such a one.

BTW, I use G 1.1!

Thanks,
mika
-- 


Echte DSL-Flatrate dauerhaft für 0,- Euro*!
"Feel free" mit GMX DSL! http://www.gmx.net/de/go/dsl

Mime
View raw message