users@glassfish.java.net

RE: add enterprise app to composite app

From: Martin Gainty <mgainty_at_hotmail.com>
Date: Tue, 3 Mar 2009 11:34:02 -0500

Here is a hopefully inuitive example of an external library configured as a jbi shared-library
named sun-wsdl-library to be used by javaee_service_engine

--configure the component (in this case sun-wsdl-library)
$GLASSFISH_HOME\domains\domain1\jbi\shared-libraries\sun-wsdl-library\install_root\META-INF\jbi.xml

--contents of jbi.xml are (notice the name of sun-wsdl-library)
<?xml version="1.0"?>
<!-- jbi.xml file for a sample shared library. -->
<jbi
    version="1.0"
    xmlns="http://java.sun.com/xml/ns/jbi"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<!-- identification information about this shared library-->
    <shared-library>
        <identification>
            <name>sun-wsdl-library</name>
            <description>This library provides WSDL 1.1/2.0 parsing support and message-wrapping utilities used to send WSDL 1.1-defined messages over the Normalized Message Router (NMR).</description>
        </identification>
        <shared-library-class-path>
            <path-element>wsdl11-wrapper.jar</path-element>
            <path-element>wsdl2.jar</path-element>
            <path-element>wsdl4j.jar</path-element>
         </shared-library-class-path>
    </shared-library>
</jbi>

--register the jbi component
$GLASSFISH_HOME\domains\domain1\jbi\config\jbi-registry.xml

--contents of jbi-registry.xml (notice the shared-library of sun-wsdl-library)
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<jbi xmlns="http://java.sun.com/xml/ns/jbi/registry">
    <components>
        <component default-install="true" timestamp="1234825940187" file-name="httpbc.jar" name="sun-http-binding"/>
        <component default-install="true" timestamp="1234825940281" file-name="appserv-jbise.jar" name="sun-javaee-engine"/>
    </components>
    <shared-libraries>
        <shared-library default-install="true" timestamp="1234825940312" file-name="wsdlsl.jar" name="sun-wsdl-library"/>
    </shared-libraries>
    <servers>
        <server name-ref="server">
            <component-ref workspace="%GLASSFISH_HOME%\domains\domain1/jbi/components/sun-http-binding/install_root/workspace" install-root="%GLASSFISH_HOME%\domains\domain1/jbi/components/sun-http-binding/install_root" state="Shutdown" name-ref="sun-http-binding"/>
            <component-ref workspace="%GLASSFISH_HOME%\domains\domain1/jbi/components/sun-javaee-engine/install_root/workspace" install-root="F:\GlassFish\domains\domain1/jbi/components/sun-javaee-engine/install_root" state="Shutdown" name-ref="sun-javaee-engine"/>
            <shared-library-ref install-root="F:\GlassFish\domains\domain1/jbi/shared-libraries/sun-wsdl-library/install_root" name-ref="sun-wsdl-library"/>
        </server>
    </servers>
</jbi>


--find the location where you want to install (sun-javaee-engine) and install the component

$GLASSFISH_HOME\domains\domain1\jbi\components\sun-javaee-engine\install_root\META-INF\jbi.xml


--contents of jbi.xml
<?xml version="1.0"?>
<!--
 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
 
 Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
 
 The contents of this file are subject to the terms of either the GNU
 General Public License Version 2 only ("GPL") or the Common Development
 and Distribution License("CDDL") (collectively, the "License"). You
 may not use this file except in compliance with the License. You can obtain
 a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
 or glassfish/bootstrap/legal/LICENSE.txt. See the License for the specific
 language governing permissions and limitations under the License.
 
 When distributing the software, include this License Header Notice in each
 file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
 Sun designates this particular file as subject to the "Classpath" exception
 as provided by Sun in the GPL Version 2 section of the License file that
 accompanied this code. If applicable, add the following below the License
 Header, with the fields enclosed by brackets [] replaced by your own
 identifying information: "Portions Copyrighted [year]
 [name of copyright owner]"
 
 Contributor(s):
 
 If you wish your version of this file to be governed by only the CDDL or
 only the GPL Version 2, indicate your decision by adding "[Contributor]
 elects to include this software in this distribution under the [CDDL or GPL
 Version 2] license." If you don't indicate a single choice of license, a
 recipient has the option to distribute your version of this file under
 either the CDDL, the GPL Version 2 or to extend the choice of license to
 its licensees as provided above. However, if you add GPL Version 2 code
 and therefore, elected the GPL Version 2 license, then the option applies
 only if the new code is made subject to such option by the copyright
 holder.
-->

<!-- jbi.xml for JavaEE Service Engine -->
<jbi
    version="1.0"
    xmlns="http://java.sun.com/xml/ns/jbi"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/jbi ./jbi.xsd">

<!-- identification information about this binding -->
    <component
        type="service-engine">
        <identification>
            <name>sun-javaee-engine</name>
            <description> Java Enterprise Edition Service Engine
            </description>
        </identification>
        <component-class-name description="Component Class name" >com.sun.enterprise.jbi.serviceengine.core.JavaEEServiceEngine</component-class-name>
         <component-class-path>
            <path-element>javaee_service_engine.jar</path-element>
         </component-class-path>
        <bootstrap-class-name>com.sun.enterprise.jbi.serviceengine.core.JavaEEServiceEngineBootstrap</bootstrap-class-name>
<bootstrap-class-path>
<path-element>javaee_service_engine.jar</path-element>
</bootstrap-class-path>
<shared-library>sun-wsdl-library</shared-library>
    </component>
</jbi>

the parent service component
(javaee_service_engine.jar)
requires the child shared library named
sun-wsdl-library
which is earlier configured as a shared library in $GLASSFISH_HOME\domains\domain1\jbi\shared-libraries\sun-wsdl-library\install_root\META-INF\jbi.xml

hope this clears up any misconceptions or lack of documentation

Martin
______________________________________________
Disclaimer and confidentiality note
Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission.




Date: Tue, 3 Mar 2009 09:41:19 -0500
From: armart3_at_tycho.ncsc.mil
To: users_at_glassfish.dev.java.net
Subject: add enterprise app to composite app








Is it possible to
add an enterprise app to a composite app?
i am not able to do
so - i get a ZipException: ZIP_Read: error reading zip file
 
if one has a legacy
enterprise app, should one "Add JBI module" using the enterpise
app
or
should one "Add JBI
module" using the ejb and war module of the enterprise app?
 
i have spent a week
on this now - absolutely frustrating...
_________________________________________________________________
Windows Live™ Groups: Create an online spot for your favorite groups to meet.
http://windowslive.com/online/groups?ocid=TXT_TAGLM_WL_groups_032009