EJB 3.0 Bean name

Is there a way that we can override the EJB 3.0 Bean name in the deployment descriptor? I know we can provide the name in the Annotation via @MessageDriven(name="bar").
For example, if I have the following Bean,
package com.example;
@MessageDriven
public class Foo implements MessageListener {
When deployed, it always deploys as Foo, even if I have the following in my ejb-jar.xml and weblogic-ejb-jar.xml:
<mesage-driven>
<ejb-name>Bar</ejb-name>
<ejb-class>com.example.Foo</ejb-class>
<destination-type>javax.jms.Topic</destination-type>
<subscription-durablility>Durable</subscription-durablity>
</message-driven>
<mesage-driven>
<ejb-name>Baz<r</ejb-name>
<ejb-class>com.example.Foo</ejb-class>
<destination-type>javax.jms.Queue</destination-type>
</message-driven>
There seems no way I can re-use the Same bean class with EJB 3.0 if I needed to. If there is anyway, the ejb-name can be used please let me know.
Thanks

Hi,
For a JEE5 EJB module, rather than using EJBGen, you can use WLS specific annotations for configuring common settings. If you follow the link below, you can see a list of supported EJB annotations. Disregard the fact that the documentation section title is WebLogic Kodo Annotations. That is incorrect and I've filed a bug for it.
http://edocs.bea.com/wls/docs103/ejb30/annotations.html#wp1438036.
Unfortunately, we don't yet support setting all weblogic-ejb-jar.xml configuration values via annoations so in some cases a weblogic-ejb-jar.xml is still required.
You can hand edit your weblogic-ejb-jar.xml and the example you posted below should work fine.
- Matt

Similar Messages

  • Failed to call EJB from Managed Bean in user interface

    Hi,
    I'm very new to JDeveloper and EJB. I'm now in learning stage. I managed to find a simple example for me to get started. But I encountered errors.
    This is the tutorial that I have followed -> http://www.packtpub.com/article/Building-JSF-EJB3-Applications
    When we create an application, the application will consist of EJBModel and Interface (JSF View)
    In my EJB Model, I have session bean name myappejb.ejb.QuestionSessionBean and one Entity bean name myappejb.entities.Question
    In my User Interface, I have created a managed bean name QuestionController and I try to call QuestionSessionLocal in the EJBModel, but before I can compile, there are systaxs errors. I can't import the import javax.ejb.EJB and myappejb.ejb.QuestionSessionBean, stated not found. In other words I can't call all the beans that I have created in EJBModel from java class that I have ceated in UserInterface.
    Please advise, I'm lost.
    WenXin
    I really confuse how exactly it works
    Edited by: user8989450 on Jan 14, 2010 12:57 AM

    Hi,
    The problem has been solved. I found the solution, this is due to the "dependencies", must "Checked" the EJBModel.jpr.
    Thanks.
    Wen Xin

  • Remote and local interface on same ejb 3.0 bean instance

    Hi,
    Is it posible to get remote and local interface on same ejb 3.0 bean instance.
    For example get local interface of a bean and than pass it as remote to client.
    Both interfaces must operate on same bean instance.
    Thanks
    Zlaja

    yes. You can implement multiple interfaces on a single class, so you can add a local and a remote interface. One trick to avoid duplicate code is to simply make the remote interface extend the local interface; then you only have to add the @Remote annotation and you're done.
    For example get local interface of a bean and than pass it as remote to client.You don't pass an instances to a client, a client looks up a remote instance of the bean through JNDI.

  • Pass Bean Name as a parameter?

    Hi,
    Is it possible to pass the bean name as a parameter to the method? In that case, we can pass the bean name as a String to the calling method?
    Thanks
    Aishu

    You can use f:param, f:attribute or f:setPropertyActionListener to pass "parameters" to the method.
    Also see [http://balusc.blogspot.com/2006/06/communication-in-jsf.html].

  • Managed Bean "Name" Access  with in the Managed Bean

    Hi,
    I have faces-config.xml in which I have registered a managed bean
    and I have a base class for all the managed bean.
    The JSP's invoke the action/method defined in the base bean and I want to remove the managed bean from session upon a particular event.
    To remove the managed bean from session, as far as I know - we need to know the managed-bean-name in the faces config.
    I wanted to know if there is any way to get the name of the managed bean in the faces-config.xml at run time?.
    Thanks,

    Thanks for your recommendations. The issue that I get stuck on is how to call this method that retrives employee data. When I had the code in the constructor, it executed when I accessed the view.jsp page. Then I populated the fields from the Employee class fields. But once I create non-constructor method, how do I invoke it from my JSF page.

  • How to get the modified bean name in WLS?

    Hi,
    We have a product that persists the beans in an object database.
    I am looking for a way a way for a client to know the name of
    the bean, dynamically(rather than providing it manually), so that
    it can do a query for the bean( in the database).
    Seems, like this name keeps changing from one version to another.
    The dynamic bean names generated in WLS6.1 is not the same as
    those for WLS7.0. And WLS5.1 didn't have this behavior.
    Thanks,
    Gurdev

    Hi,
    Using the Context interface (listBindings()) you can get all bindings under a
    context. One can enumerate through the returned enumeration and go down the tree
    if required.
    S
    "Gurdev Parmar" <[email protected]> wrote:
    >
    Hi,
    We have a product that persists the beans in an object database.
    I am looking for a way a way for a client to know the name of
    the bean, dynamically(rather than providing it manually), so that
    it can do a query for the bean( in the database).
    Seems, like this name keeps changing from one version to another.
    The dynamic bean names generated in WLS6.1 is not the same as
    those for WLS7.0. And WLS5.1 didn't have this behavior.
    Thanks,
    Gurdev

  • Find the bean name in the server environment

    Hi,
    I'm trying to get the bean name (Session or Entity) that had called another bean.
    I mean, there is a method in my entity bean the ask the following: "Hey, who called
    me?"
    I think it's so easy :)
    Could anybody help me?

    If you mean that you want the username of the person who used the bean, you
    can get that by entitycontext.getCallerPrincipal(). If you want to know
    what's the class/method that called, it's not possible without tapping into
    the low-level guts, which is not something that a vendor would document
    openly. More easy is developing it yourself:
    void doSomething() {
    StatefulHome home= ...
    Stateful sfb = home.create(this.Class().toString(), //caller class
    "thisEJB" //caller's JNDI name
    Emmanuel
    "Denis" <[email protected]> wrote in message
    news:3d418e31$[email protected]..
    >
    The entity bean that had been called has a column in the database (aforeign key,
    for example) that represents the caller.
    Did you understand me?
    Rob Woollen <[email protected]> wrote:
    It's not so easy :< What are you trying to achieve? Something for
    security purposes or something else?
    -- Rob
    Denis wrote:
    I have to get also the EJBModule name.
    Thanks!
    "Denis" <[email protected]> wrote:
    Hi,
    I'm trying to get the bean name (Session or Entity) that had called
    another
    bean.
    I mean, there is a method in my entity bean the ask the following:"Hey,
    who called
    me?"
    I think it's so easy :)
    Could anybody help me?

  • Example of binding an object(just a java class not an EJB) to a JNDI name

    Hi,
    I would appreciate your help if you could give me some pointers regarding where
    to find any examples which uses objects ( a java class not an EJB) to a JNDI name.
    I could get an example to work using String but it doesnt work with a java class
    object.
    Thanks a lot,
    Sunitha

    Try making the java object serializable.
    - Naresh
    "sunitha" <[email protected]> wrote:
    >
    Hi,
    I would appreciate your help if you could give me some pointers regarding
    where
    to find any examples which uses objects ( a java class not an EJB) to
    a JNDI name.
    I could get an example to work using String but it doesnt work with a
    java class
    object.
    Thanks a lot,
    Sunitha

  • Get Managed bean name while running tests.

    hi,
    while running web application,i can able get managed name.
    but how to get managed bean name while running unit tests.
    thanks
    siva

    public String getManagedBeanName() {
        String managedBeanName = null;
        HttpServletRequest request =
            (HttpServletRequest) FacesContext
                .getCurrentInstance()
                    .getExternalContext()
                        .getRequest();
        // lookup bean in request scope
        Enumeration requestAttributeNames = request.getAttributeNames();
        while (requestAttributeNames.hasMoreElements()) {
            String requestAttribute = (String) requestAttributeNames.nextElement();
            Object object = request.getAttribute(requestAttribute);
            if (object instanceof MyBean) {
                managedBeanName = requestAttribute;
                break;
        if (managedBeanName == null) {
            // lookup bean in session scope
            Enumeration sessionAttributeNames = request.getSession().getAttributeNames();
            while (sessionAttributeNames.hasMoreElements()) {
                String sessionAttribute = (String) sessionAttributeNames.nextElement();
                Object object = request.getSession().getAttribute(sessionAttribute);
                if (object instanceof MyBean) {
                    managedBeanName = sessionAttribute;
                    break;
        return managedBeanName;
    }Sorry, don't know other ways.

  • Cannot find bean: "bean name" in any scope???? plsssssssssss  Urgent!

    Hi!
    I have a jsp with Combo boxes, when i select a value of one combo box
    OnChnage of it the 2nd combo box gets its value dynamically from the
    database..
    Here is my JSP..............................
    <script language="JavaScript">
    function ELMORG_MNEMONIC1Changed() {
    var frm = document.RetrieveReportDynaForm;
         frm.actionType.value = "1";
         frm.submit();
    function ELMORG_MNEMONIC2Changed(){
         var frm = document.RetrieveReportDynaForm;
         frm.actionType.value = "2";
         frm.submit();
    function ELMORG_MNEMONIC3Changed(){
         var frm = document.RetrieveReportDynaForm;
         frm.actionType.value = "3";
         frm.submit();
    </script>
    </head>
    <body>
    <table>
    <html:form action="/RetrieveReport.do" styleId="RetrieveReportDynaForm">
    <input type="hidden" name="actionType" value="">
    <table cellspacing=0 cellpadding=2 border=0 class="table_data" id="TABLE1" >
         <tr>
                        <td height="20px" colspan="5" class="table_top_td">Telecom DashBoard</td>
              </tr>
    <tr >     
         <tr class="table_data">
                   <td width="90px"></td>
                        <td class="smalltext" width="75px" align="right"><b>Organizational Element1</b></td>
                        <td>
                        <html:select property="ELMORG_MNEMONIC1" styleClass="mediumtext" style="width:120px; height:30px" onchange="ELMORG_MNEMONIC1Changed()">
                        <html:option value="">Select</html:option>
                        <html:optionsCollection name="reportlist" label="ELMORG_MNEMONIC1" value="ELMORG_MNEMONIC1"/>
                        </html:select>
                   </td>
         </tr>
    <tr class="table_data">
                   <td width="90px"></td>
                        <td class="smalltext" width="75px" align="right"><b>Organizational Element2</b></td>
                        <td>
                        <html:select property="ELMORG_MNEMONIC2" styleClass="mediumtext" style="width:120px; height:30px" onchange="ELMORG_MNEMONIC2Changed()">
                        <html:optionsCollection name="mnemonic1" label="ELMORG_MNEMONIC2" value="ELMORG_MNEMONIC2"/>
                        </html:select>
                   </td>
         </tr>     
         <tr class="table_data">
                   <td width="90px"></td>
                        <td class="smalltext" width="75px" align="right"><b>Organizational Element3</b></td>
                        <td>
                        <html:select property="ELMORG_MNEMONIC3" styleClass="mediumtext" style="width:120px; height:30px" onchange="ELMORG_MNEMONIC3Changed()">
                        <html:optionsCollection name="mnemonic2" label="ELMORG_MNEMONIC3" value="ELMORG_MNEMONIC3"/>
                        </html:select>
                   </td>
         </tr>
         <tr class="table_data">
                   <td width="90px"></td>
                        <td class="smalltext" width="75px" align="right"><b>Organizational Element4</b></td>
                        <td>
                        <html:select property="RC_MNEMONIC" styleClass="mediumtext" style="width:120px; height:30px" onchange="RC_MNEMONICChanged()">
                        <html:optionsCollection name="mnemonic3" label="RC_MNEMONIC" value="RC_MNEMONIC"/>
                        </html:select>
                   </td>
         </tr>
         <tr>
                   <td></td>
                   <td><html:submit/></td>
         </tr>
    </table>
    </html:form>          
    </body>
    </html:html>
    I am getting a error....
    javax.servlet.jsp.JspException: Cannot find bean: "mnemonic2" in any scope
         at org.apache.struts.taglib.TagUtils.lookup(TagUtils.java:935)
         at org.apache.struts.taglib.html.OptionsCollectionTag.doStartTag(OptionsCollectionTag.java:173)
         at org.apache.jsp.jsp.reportParameter_jsp._jspx_meth_html_optionsCollection_2(reportParameter_jsp.java:469)
         at org.apache.jsp.jsp.reportParameter_jsp._jspx_meth_html_select_2(reportParameter_jsp.java:438)
         at org.apache.jsp.jsp.reportParameter_jsp._jspx_meth_html_form_0(reportParameter_jsp.java:210)
         at org.apache.jsp.jsp.reportParameter_jsp._jspService(reportParameter_jsp.java:130)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
         at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
         at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
         at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
         at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1085)
         at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:398)
         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:241)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
    when i execute this page..
    I am using struts action where i am setting the "mnemonic2" variable in a session....................................
         if ("2".equals(actionType)){
              String MNEMONIC1 = request.getParameter("ELMORG_MNEMONIC1");
              String MNEMONIC2 = request.getParameter("ELMORG_MNEMONIC2");
              if(MNEMONIC2==""){
                   request.getSession().removeAttribute("mnemonic2");
                   }else{
                        ArrayList reportParam1 = (ArrayList)this.reportService.getELMORG_MNEMONIC3(MNEMONIC1,MNEMONIC2);
                        System.out.println("The arraysize in the Action class2 is"+reportParam1.size());
                        request.getSession().setAttribute("mnemonic2", reportParam1);
    Can any one pls tell me why m i getting this error???

    hi enoch!
    yeah definitely...
    <action path="/FourthAction" name="RetrieveReportDynaForm"
                   type="org.springframework.web.struts.DelegatingActionProxy" >
                   <forward name="success" path="/jsp/reportParameter.jsp"></forward>
                   <forward name="failure" path="/jsp/reportParameter.jsp"></forward>
              </action>
    <form-bean name="RetrieveReportDynaForm"
                   type="org.apache.struts.validator.DynaValidatorForm">
                   <form-property name="GRP_MNEMONIC" type="java.lang.String"
                        initial="" />
                   <form-property name="POL_MNEMONIC" type="java.lang.String"
                        initial="" />
                   <form-property name="GRP_MNEMONIC1" type="java.lang.String"
                        initial="" />
                   <form-property name="ELMORG_MNEMONIC1" type="java.lang.String"
                        initial="" />
                   <form-property name="GRP_MNEMONIC2" type="java.lang.String"
                        initial="" />
                   <form-property name="ELMORG_MNEMONIC2" type="java.lang.String"
                        initial="" />
                   <form-property name="GRP_MNEMONIC3" type="java.lang.String"
                        initial="" />
                   <form-property name="ELMORG_MNEMONIC3" type="java.lang.String"
                        initial="" />
                   <form-property name="GRP_MNEMONIC4" type="java.lang.String"
                        initial="" />
                   <form-property name="ELMORG_MNEMONIC4" type="java.lang.String"
                        initial="" />
                   <form-property name="GRP_MNEMONIC5" type="java.lang.String"
                        initial="" />
                   <form-property name="ELMORG_MNEMONIC5" type="java.lang.String"
                        initial="" />
                   <form-property name="GRP_MNEMONIC6" type="java.lang.String"
                        initial="" />
                   <form-property name="RC_MNEMONIC" type="java.lang.String"
                        initial="" />
                   <form-property name="RC_LABEL" type="java.lang.String"
                        initial="" />
                   <form-property name="RC_MANAGER" type="java.lang.String"
                        initial="" />
                   <form-property name="RC_CODE" type="java.lang.String"
                        initial="" />
                   <form-property name="RC_MANAGER_EMAIL" type="java.lang.String"
                        initial="" />
                   <form-property name="actionType" type="java.lang.String"
                        initial="" />
              </form-bean>

  • [jwsc] error: Response wrapper bean names must be unique ?

    I am trying to use wsdlc and jwsc on my existing WSDL file, with "type=JAXWS", I am getting this error
    "[jwsc] error: Response wrapper bean names must be unique and must not clash with other generated classes"
    What does it mean? And how can I resolve this?
    Here is the full stack trace:
    build-service:
    [jwsc] JWS: processing module /com/covergence/ws/callouts/CallOutsServiceImpl
    [jwsc] Parsing source files
    [jwsc] Parsing source files
    [jwsc] 1 JWS files being processed for module /com/covergence/ws/callouts/CallOutsServiceImpl
    [jwsc] JWS: C:\source_tree\b3.3\ss\java\ws\sdk\build\weblogic\src\com\covergence\ws\callouts\CallOutsServiceImpl.java Validated.
    [jwsc] Processing 1 JAX-WS web services...
    [jwsc] error: Response wrapper bean names must be unique and must not clash with other generated classes. Class: com.covergence.ws.callouts.CallOutsPortType method getConfig(javax.xml.ws.Holder<java.util.List<com.covergence.ws.callouts.ConfigClassesType>>)
    [jwsc] Problem encountered during annotation processing;
    [jwsc] see stacktrace below for more information.
    [jwsc] [failed to localize] modeler.nestedGeneratorError(java.lang.IllegalArgumentException: trying to create the same field twice: config)
    [jwsc] at com.sun.tools.ws.processor.modeler.annotation.WebServiceWrapperGenerator.generateWrappers(WebServiceWrapperGenerator.java:302)
    [jwsc] at com.sun.tools.ws.processor.modeler.annotation.WebServiceWrapperGenerator.processMethod(WebServiceWrapperGenerator.java:154)
    [jwsc] at com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.visitMethodDeclaration(WebServiceVisitor.java:449)
    [jwsc] at com.sun.tools.apt.mirror.declaration.MethodDeclarationImpl.accept(MethodDeclarationImpl.java:41)
    [jwsc] at com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.processMethods(WebServiceVisitor.java:374)
    [jwsc] at com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.postProcessWebService(WebServiceVisitor.java:338)
    [jwsc] at com.sun.tools.ws.processor.modeler.annotation.WebServiceWrapperGenerator.postProcessWebService(WebServiceWrapperGenerator.java:125)
    [jwsc] at com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.visitInterfaceDeclaration(WebServiceVisitor.java:120)
    [jwsc] at com.sun.tools.apt.mirror.declaration.InterfaceDeclarationImpl.accept(InterfaceDeclarationImpl.java:32)
    [jwsc] at com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.inspectEndpointInterface(WebServiceVisitor.java:420)
    [jwsc] at com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.visitClassDeclaration(WebServiceVisitor.java:141)
    [jwsc] at com.sun.tools.apt.mirror.declaration.ClassDeclarationImpl.accept(ClassDeclarationImpl.java:95)
    [jwsc] at com.sun.tools.ws.processor.modeler.annotation.WebServiceAP.buildModel(WebServiceAP.java:300)
    [jwsc] at com.sun.tools.ws.processor.modeler.annotation.WebServiceAP.process(WebServiceAP.java:224)
    [jwsc] at com.sun.mirror.apt.AnnotationProcessors$CompositeAnnotationProcessor.process(AnnotationProcessors.java:60)
    [jwsc] at com.sun.tools.apt.comp.Apt.main(Apt.java:454)
    [jwsc] at com.sun.tools.apt.main.JavaCompiler.compile(JavaCompiler.java:448)
    [jwsc] at com.sun.tools.apt.main.Main.compile(Main.java:1075)
    [jwsc] at com.sun.tools.apt.main.Main.compile(Main.java:938)
    [jwsc] at com.sun.tools.apt.Main.processing(Main.java:95)
    [jwsc] at com.sun.tools.apt.Main.process(Main.java:43)
    [jwsc] at com.sun.tools.apt.Main.main(Main.java:34)
    [jwsc] Caused by: java.lang.IllegalArgumentException: trying to create thesame field twice: config
    [jwsc] at com.sun.codemodel.JDefinedClass.field(JDefinedClass.java:392)
    [jwsc] at com.sun.codemodel.JDefinedClass.field(JDefinedClass.java:363)
    [jwsc] at com.sun.tools.ws.processor.modeler.annotation.WebServiceWrapperGenerator.writeMembers(WebServiceWrapperGenerator.java:419)
    [jwsc] at com.sun.tools.ws.processor.modeler.annotation.WebServiceWrapperGenerator.generateWrappers(WebServiceWrapperGenerator.java:299)

    I am starting from WSDL and below are the corresponding elements from WSDL
        <message name="getConfig">
            <part name="parameters" element="tns:getConfig"/>
        </message>
        <message name="getConfigResponse">
            <part name="result" element="tns:getConfigResponse"/>
        </message>
        <portType name="CallOutsPortType">
            <operation name="getConfig">
                <input message="tns:getConfig">
                </input>
                <output message="tns:getConfigResponse">
                </output>
                <fault name="callOutFault" message="tns:callOutFault"/>
            </operation>
        <binding name="CallOutsBinding" type="tns:CallOutsPortType">
            <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
            <operation name="getConfig">
                <soap:operation soapAction="getConfig"/>
                <input>
                    <soap:body use="literal"/>
                </input>
                <output>
                    <soap:body use="literal"/>
                </output>
                <fault name="callOutFault">
                    <soap:fault name="callOutFault" use="literal"/>
                </fault>
            </operation>

  • Dynamic managed bean names

    Hi!!
    in my application i make code that must be present in every JSP pages. For that, i put it into a separated JSP page who is included in the other JSP (using <jsp:include> tag).
    My problem is that each JSP who include the repetitive JSP, uses a different managed bean name.
    For example, the page who is included is:
    <f:subview id="navigation">
          <h:inputText value="#{name-of-bean.navigation}" styleClass="inputNav" readonly="true" />
    </f:subview>When this code is included into the pages, each page must use a different "name-of-bean".
    I try with:
    <jsp:include page="navigation.jsp">
         <jsp:param name="beanName" value="AlfaBean" />
    </jsp:include>and in the child JSP:
    <h:inputText value="#{requestScope[param.beanName].navigation}"
    styleClass="inputNav" readonly="true" />but dont work.
    I try with:
    <h:inputText value="#{resources[param.beanName].navigation}"
    styleClass="inputNav" readonly="true" />but dont work.
    Some body can help me??
    PD: Sorry my bad english!!

    JSF creates a managed bean at the time when firstly it evaluates the
    corresponding value binding expression, such as "#{AlfaBean.someProp}".
    Your JSP files include no expression including the name of the bean.
    Although it may be a very tricky code, here is a sample used for you problem:<h:outputText value="" rendered="#{AlfaBean.someProp != null}"/>
    <jsp:include page="navigation.jsp">
         <jsp:param name="beanName" value="AlfaBean" />
    </jsp:include>

  • Adding Set of Session Beans generates client with wrong session bean names

    Hi,
    I am trying to import a set of session beans deployed on Sun Java Sever 8.2 using Netbeans 6.0. on windows XP.
    The problem is that the imported set generated by the IDE has wrong session bean names and out of 8 session beans in the client jar only 6 are shown (and different 6 every time). Also the remote methods of one bean are associated with another bean and every time its a different set of bean clients generated.
    I am really perplexed with this behavior. Any help on this issue will be highly appreciated.

    An RMI/IIOP parameter type must meet one of thefollowing criteria:
    It must be a primitive type, or it must implementeither java.rmi.Remote or java.io.Serializable,
    or it must be an interface for which the runtime typesatisfies the previous criteria,
    or it must be an array containing elements thatsatisfy the previous criteria.This tells you exactly what you need to do.

  • Urgent help please : useBean: Duplicate bean name error

    hi,
    i am trying to add a record to data base and my bean name is
    DBConn. when i try instantiate it is giving error. help imm.
    code:
    <%@ page import="java.sql.*" %>
    <jsp:useBean id="DConn" scope="request" class="src.DBConn" />
    <%
         try {
         ResultSet rsa;
         String sclName = request.getParameter("SclName");
         String sclMissing = request.getParameter("SclMissing");
         int intMeasure= Integer.parseInt(request.getParameter("SclMeasure"));
         String sclMeasure = "";     
         boolean     flag=false;
         switch(intMeasure) {
         case 0:     
              sclMeasure="O";
              break;
         case 1:
              sclMeasure="M";     
              break;
         case 2:
              sclMeasure="N";
              break;
         String RecValue[]= new String [3];
         RecValue[0]=sclName;
         RecValue[1]=sclMeasure;
         RecValue[2]=sclMissing;
         flag=DConn.Execute("SCAMI1", new String[] { RecValue[0], RecValue[1],RecValue[2]});
         if (flag) {
         catch(Exception e) {
              System.out.println(e);
    %>

    i am mention the same bean in this page and after this, when i press the add button, i will move for another html page and from that page it will go to the bean which is given error.
    Code: Page1:
    =============
    <html><head><title>JSP Page</title>
    <%@ page language="java" import="java.sql.*" session ="true" %>
    <script type="text/javascript" >
         function AddSubmit()
         document.OutCome.action = "OutAddScale.html";
         document.OutCome.submit();
         function openModHtml()
              window.open ("OutModScale.html");          
         function openDelHtml()
              window.open ("OutDelScale.html");          
         function getRecord(thecaller) {
              (thecaller.value);
    </script>
    </head>
    <body>
    <FORM name=OutCome method="GET" >
    <P align=center><STRONG><FONT color=#000000>Out Come</FONT></STRONG> </P>
    <INPUT id=btnAdd name=btnAdd type=button value=Add onclick ="AddSubmit()" style="HEIGHT: 24px; WIDTH: 65px">
    <INPUT id=btnMod name=btnMod type=submit value=Modify style="LEFT: 136px; TOP: 381px" > 
    <STRONG><FONT color=#000000> </FONT></STRONG>
    <INPUT id=btnDelete name=btnDelete onclick ="openDelHtml()" type=button value=Delete style="LEFT: 190px; TOP: 381px">
    <p></p>
    <!-- data base connection. ->
    <jsp:useBean id="DConn" scope="page" class="src.DBConn" />
    <%
         DConn.DBConnect("MSSql","sun.jdbc.odbc.JdbcOdbcDriver","jdbc:odbc:ews","sa","sakshi123");
         response.setContentType("text/html");
         ResultSet rsa;
         String PSId="";
         String CSId="";
         try {
    %>
         <Table border="1" width=400>
         <tr>
         <td><b>Select</b></td>
         <td><b>Scale</b></td>
              <td><b>Measure</b></td>
              <td><b>Missing</b></td>
              <td><b>Options</b></td>
         </tr>     
    <%
              rsa=DConn.getRs("SCAMS1",new String[]{""});
              while(rsa.next()) {
                   CSId=     rsa.getString("ScaleId");
                   String id= rsa.getString("ScaleId");
                   String name= rsa.getString("ScaleName");
                   String measure= rsa.getString("Measure");
                   int missing = rsa.getInt("Missing");
                   String label= rsa.getString("Label");
                   int sclIndex = rsa.getInt("ScaleIndex");
                   if (measure.equals("O")) {
                        measure="Ordinal";
                   }else if ( measure.equals("M") ) {
                        measure="Metric";
                   }else if ( measure.equals("N") ) {
                        measure="Nominal";
                   if (!CSId.equals(PSId)) {
                        PSId=CSId;
    %>
                   <tr >
                        <Td><Input Type="Radio" name ="RSel" id="RSel" value= <%= CSId %> onClick="return getRecord(this )" ></td>
                        <td> <%= name %></td>
                        <td> <%= measure %></td>          
                        <td> <%= missing %></td>
                        <td> <%= sclIndex %> - <%= label %></td>
                   </tr>
    <%                         
                   }else {
    %>     
                   <tr>
                        <td></td>
                        <td></td><td></td><td></td>
                        <td><%= sclIndex %> - <%= label %></td>
                   </tr>
    <%
                   }     // else condition close          
         }     // while loop
    %>
         </table>
    <%
         }catch(Exception e){
              System.out.println(e);
              // e.printStackTrace();
    finally{      
    %> </form></body></html>
    code page2:
    ============
    <HTML><HEAD><TITLE>Add Scale</TITLE>
    <script language=javascript src="..\JScript\Validation.js">     
    </script>
    <script language=javascript src="..\JScript\Common.js">     
    </script>
    </HEAD>
    <body >
    <FORM name=AddScale method="GET" >
    <P align=center><STRONG>Add Scale</STRONG></P>
    <FONT color=darkblue>Scale Name 
    </FONT>   
    <INPUT id=SclName name=SclName onkeypress="return validateCharKeyPress(event)" style="WIDTH: 160px; HEIGHT: 18px"><P>
    <FONT color=darkblue>Scale Measure </FONT>
    <SELECT id=SclMeasure name=SclMeasure style="LEFT: 105px; WIDTH: 92px; TOP: 96px; HEIGHT: 22px">
                        <OPTION selected>ORDINAL</OPTION>
                        <OPTION>NOMINAL</OPTION>
                        <OPTION>METRIC</OPTION>
                        </SELECT></P>
    <p><FONT color=darkblue>Scale Missing</FONT>  
    <INPUT id=SclMissing name=SclMissing onkeypress="return validateNumberKeyPress(event)" style="LEFT: 98px; WIDTH: 155px; TOP: 101px; HEIGHT: 19px" align=right></p>
    <HR>
    <P><FONT color=darkblue><STRONG> Scale Options</STRONG></FONT></P>
    <SELECT id=SelScaleOpt name=SelScaleOpt onClick="SelList()" onChange="SelList()" size=2 style="WIDTH: 313px; HEIGHT: 114px" >
    <OPTION selected>1=Male</OPTION>
    <OPTION >2=FeMale</OPTION>
    </SELECT> 
    <p><FONT color=darkblue>                        
    <INPUT id=btnUp name=btnUp type=button value=UP onclick="LstUp()" style="WIDTH: 45px; HEIGHT: 24px" >
    <INPUT id=btnDown name=btnDown type=button value=Down onclick="LstDown()" style="LEFT: 67px; TOP: 436px" > </FONT></p>
    <p><FONT color=darkblue>Scale Option    </FONT>
    <INPUT id=txtScaleOpt name=txtScaleOpt onkeypress="return validateCharKeyPress(event)" style="WIDTH: 152px; HEIGHT: 20px"></p>
    <p>  
    <INPUT id=SclOptAdd name=SclOptAdd type=button value=Add onclick="addToList()" style="WIDTH: 65px; HEIGHT: 24px"> 
    <INPUT id=btnMod name=button1 style="LEFT: 136px; TOP: 381px" type=button value=Modify onclick="ModToList()" >
    <INPUT id=SclOptRemove name=SclOptRemove type=button value=Remove onClick="DelList()" style="LEFT: 190px; TOP: 381px"></p>
    <HR>
    <P>         
    <INPUT id=SclOk name=Ok type=button value=Save OnClick="ChkFields()" style ="WIDTH: 64px; HEIGHT: 24px">
    <INPUT id=SclCan name=Cancel style="WIDTH: 64px; HEIGHT: 24px" type=reset value=Cancel></P>
    </FORM>
    </body>
    </HTML>
    code page3 in this page its giving error
    ====================================================
    it is saying
    <jsp:useBean id="DConn" scope="page" class="src.DBConn" />
    <%     
         try {
         ResultSet rsa;
         String sclName = request.getParameter("SclName");
         String sclMissing = request.getParameter("SclMissing");
         String sclMeasure= request.getParameter("SclMeasure");
         if (sclMeasure.equals("ORDINAL")) {
              sclMeasure="O";
         }else if (sclMeasure.equals("METRIC")) {
              sclMeasure="M";     
         }else if (sclMeasure.equals("NOMINAL")) {
              sclMeasure="N";     
         String RecValue[]= new String [3];
         RecValue[0]=sclName;
         RecValue[1]=sclMeasure;
         RecValue[2]= sclMissing;          
    flag=DConn.Execute("SCAMI1", new String[]{RecValue[0],RecValue[1],RecValue[2]});
         if (flag) {
              out.println("tru");
         }else {
              out.write("false");
         catch(Exception e) {
              System.out.println(e);
    %>

  • Error getting the EJB Handle for context name: User

    I am getting EJB Handle for context name: User.
    1) I specified ejb's and datasource in the ejb-jar.xml in the session tags.
    <session> </session>
    and I also included ejb's and datasource in the sun-ejb-jar.xml still I am getting the above error I am new to EJB how can I resolve this?

    What is the Oracle application server version?
    JDeveloper 11g supports direct deployment to Oracle Application Server 11g
    http://www.oracle.com/technology/products/jdev/collateral/papers/11/newfeatures/index.html

Maybe you are looking for