users@glassfish.java.net

RE: RE: RE: add enterprise app to composite app

From: Martin, Ray <armart3_at_tycho.ncsc.mil>
Date: Wed, 4 Mar 2009 10:01:57 -0500

in an attempt to learn more about the problem i did the following:
 
created a second session bean named TryThisBean with a Local interface.
copied all the code from ConfigBean to TryThisBean including Seam's
@Name("config") annotation.
deleted ConfigBean and ConfigLocal
deployed
 
now i get the error that there are two beans with the same name -
"config". (this NOT true.)
 
so, i put ConfigBean and ConfigLocal back to enterprise app
in ConfigBean, i set @Name("configBean")
delete TryThisBean and TryThislocal
 
deploy
get error, IllegalArgumentException: no such setter method:
viewHandlers.TryThisBean.mappedName
 
 
TryThisBean does not even exist any longer. i don't get it.

________________________________

From: Martin, Ray
Sent: Wednesday, March 04, 2009 9:02 AM
To: users_at_glassfish.dev.java.net
Subject: RE: RE: add enterprise app to composite app


Thank you - that is a lot of info - i am trying to understand how that
info fits into my world. i have my use cases that i am trying to solve
with a SOA grid. my processing requirements are only semi-cloud. i am
trying to utilize glassfish,openesb, and netbeans as a basis for solving
my reqs. it is not possible for me to dig to the lowest level of detail
on every subject.
 
According to suggestions made on this thread, i am now trying to deploy
a composite app containing an enterprise app (whereas, previously, i was
trying to deploy the composite app containing the ejb and war module
taken from the enterprise app).
 
to do this, i did:
replace Remote interfaces with Local interfaces
remove mapped-name tags from ejb-jar.xml
remove (mappedName="x") from the session bean
go to glassfish's domain1 directory and assure that ALL files have been
removed from the subdirectories that were relative to my composite app.
 
on deploy, i get:
java.lang.IllegalArgumentException: no such setter method:
viewHandlers.ConfigBean.mappedName
 
 
(viewHandlers.ConfigBean is the actual name for what i have been
referring to as "x").
i admit that in the stack trace, Seam's Reflections.getSetterMethods is
at the top of the stack.
 
but, my problem is this:
where is the information stored for the global JNDI stuff???
i mean, why else would the mappedName be hanging around - it has been
totally removed from my code.

________________________________

From: Martin Gainty [mailto:mgainty_at_hotmail.com]
Sent: Tuesday, March 03, 2009 11:34 AM
To: Users GlassFish.dev.java.net
Subject: RE: add enterprise app to composite app


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\in
stall_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-bind
ing/install_root/workspace"
install-root="%GLASSFISH_HOME%\domains\domain1/jbi/components/sun-http-b
inding/install_root" state="Shutdown" name-ref="sun-http-binding"/>
            <component-ref
workspace="%GLASSFISH_HOME%\domains\domain1/jbi/components/sun-javaee-en
gine/install_root/workspace"
install-root="F:\GlassFish\domains\domain1/jbi/components/sun-javaee-eng
ine/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</componen
t-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.JavaEESe
rviceEngineBootstrap</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\in
stall_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(tm) Groups: Create an online spot for your favorite groups
to meet. Check it out.
<http://windowslive.com/online/groups?ocid=TXT_TAGLM_WL_groups_032009>