JDEV 10.1.3 How to manipulate/Debug IndirectList from ejb 3.0 session bean

I was debugging my session bean a seen that element data for the employeesCollection was empty.
I didn't understood why my java client was throwing an error when i accessed manually the Departments collection and get the employeeCollection from the first entry in the collection. What was confusing me was that my master/detail jfs application was displaying these data. From where ? how was it possible ? it was the same session bean !
This is the reason i debugged the session bean return object and seen that the collection was also empty as the from executing from my java client application. I have seen the type of the object that was not a collection but IndirectList.
So my question ! how is it possible to load the collection of this type ? Which method the data control is executing to load it ? Where may i found a description of this very interesting process ?

Hi Frank.
plain English - on plan :).
I create managed bean with function which do access to LDAP and this function 'return List<Users>'.
In JDeveloper :) on managed bean(java class) i create "Create Data Control"... after, from Data Controls i drop on page this data(create ADF Table with selectOne)...
First Page Ready!
Second page... i need to know which option selected on first page. This option(row) contains, UserName and etc... On second page i again fetch data, from LDAP, associated with this concrete UserName... Because i fetch data using managed bean :) i need to know this username in my managed bean...
May be :) im wrong...
sessionAttribute - like this? ->
* Convenience method for setting Session variables
* @param ctx FacesContext
* @param key object key
* @param object value to store
public static void storeOnSession(FacesContext ctx, String key, Object object) {
Map sessionState = ctx.getExternalContext().getSessionMap();
sessionState.put(key, object);
* Convenience method for getting Session variables
* @param ctx FacesContext
* @param key object key
public static Object getFromSession(FacesContext ctx, String key) {
Map sessionState = ctx.getExternalContext().getSessionMap();
return sessionState.get(key);
}

Similar Messages

  • How to lookup a EJB 3.0 session bean which is deployed in WebLogic 10.3

    Now Jdeveloper 11.1.1, is giving WebLogic server 10.3.
    With internal WebLogic server, when I created a Sample client, it generated code as:
    private static Context getInitialContext() throws NamingException {
        Hashtable env = new Hashtable();
        // WebLogic Server 10.x connection details
        env.put( Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory" );
        env.put(Context.PROVIDER_URL, "t3://127.0.0.1:7101");
        return new InitialContext( env );
    public static void main(String [] args) {
        try {
            final Context context = getInitialContext();
            DefaultSession defaultSession = (DefaultSession)context.lookup("property-DefaultSession#com.vs.property.model.session.DefaultSession");
        } catch (Exception ex) {
    }How to update the above code to lookup the EJB 3.0 session beans with an external WebLogic server 10.3?
    Is there any documentation available on how to install weblogic, troubleshoot, debug, WebLogic server 10.3?
    regds
    -raju

    Raju,
    Hi, to start, here is a tutorial on a quickstart web application using an EJB 3.0 stateless session bean that fronts a container managed EclipseLink JPA entity manager on WebLogic 10.3, you will find references there to other general WebLogic documentation.
    [http://wiki.eclipse.org/EclipseLink/Examples/JPA/WebLogic_Web_Tutorial]
    using @EJB injection on the client instead of a JNDI lookup as below
    [http://edocs.bea.com/wls/docs103/ejb30/annotations.html#wp1417411]
    1) in your second env.put I noticed that your t3 port is 7101, I usually use the default 7001 - but It looks like this port is valid for the JDeveloper embedded version of WebLogic server runs - just verify that it matches the port of your server.
    2) your name#qualified-name lookup looks ok. Verify that the jndi-name element is set in your weblogic-ejb-jar.xml for non injection clients like the following
    &lt;weblogic-ejb-jar&gt;
    &lt;weblogic-enterprise-bean&gt;
    &lt;ejb-name&gt;ApplicationService&lt;/ejb-name&gt;
    &lt;jndi-name&gt;ApplicationService&lt;/jndi-name&gt;
    3) as a test outside of your application - launch the WebLogic admin console and goto the testing tab of your bean in [Home &gt; Summary of Deployments &gt; "application" &gt; "session bean name"
    thank you
    /michael : http://www.eclipselink.org                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How create  EJB 2.1 Stateful Session Bean in a EJB 3.0 Session Bean

    Hi All,
    We have been developing on EJB 2.1. We are now adding a module on EJB 3.0.
    How can we "create" a stateful session bean with create method signature similar to create(String id)?
    We have tried
    // this is the remote interface
    @EJB AddressBean abean;
    But not working
    Any help will be appreciated.

    There is no explicit create() call for EJB 3.0 session beans. It doesn't really matter though
    since you can accomplish the same thing by defining your own business method to act
    as an initializer for whatever state you'd like. E.g.
    @Remote
    public interface FooInterface {
    public void initialize(String id);
    // ... other business methods
    @EJB FooInterface fooRef;
    fooRef.initialize("foo");
    --ken                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How to Stop Firefox 18 From Restoring the Previous Session After a Crash

    Firefox 18.0.1 running on Windows 7
    When Firefox crashes, the next time it opens it tries to restore the previous session. I do not want Firefox to restore the previous session after a crash. How do I prevent Firefox from restoring the previous session after a crash?
    Please note:
    1- My home page is set to "blank page"
    2- I have configured Firefox to NOT remember my browsing history, download history, form fields and passwords.
    3- Even in Safe Mode (i.e., with all add-ons disabled), Firefox STILL restores the previous session after a crash.

    hello Bulldogger, please try the following in order to switch off sessionrestore completely: enter '''about:config''' into the firefox location bar (confirm the info message in case it shows up) & search for the preferences named '''browser.sessionstore.max_tabs_undo''' and '''browser.sessionstore.max_windows_undo'''. double-click on those entries and change both of their values to '''0'''.
    http://kb.mozillazine.org/Browser.sessionstore.max_tabs_undo
    http://kb.mozillazine.org/Browser.sessionstore.max_windows_undo

  • How to output debug text from script?

    How do you output some debugging text from a script? I'm looking for the equivalent of <c:out> from JSTL. I would like to be able to output the value of a "#{variable}". Thanks.

    Isn't h:outputText sufficient? Furthermore, if you're using JSF 1.2 / JSTL 1.2 with unified EL, then c:out will also work for "JSF EL".

  • How can i design a EJB application using session Beans?

    Hello,
    I am designing a Find application using EJB. Here a user is prompted a search page, where he can enter the search criteria's. Then on click of submit, the query is formed at the server side depending on what criteria's were selected. Then a jdbc query is performed and the results are returned back to the user. Here no session is maintained for the users. Can anyone suggest me how to design this application using EJB. Should i use entity beans for this or session beans will suffice? Should the jdbc query be performed in the bean itself or should it be outside in a helper class? Please kindlu suggest me the design for this application...
    Regards,
    Subbu

    Hi,
    First of all, I'm unable to figure out why you need to use EJB for this scenario. You can write a helper class to frame and execute the query.
    If you really want to use EJB, then I suggest you use a stateless Session Bean with transaction attribute as TX_NOT_SUPPORTED. From the session bean, you can call the helper class. But, by avoiding the session bean, you can eliminate remote calls, thus improving your performance. Also, check if the database & the db driver you are using supports sql caching.
    Regards,
    Raj.

  • How do I stop Firefox from trying to restore session every time I turn on my computer?

    How do I stop Firefox from doing this?

    Make sure that Firefox closes properly and that there isn't a hanging Firefox or plugin-container process left in the task manager.
    Use "Firefox/File > Exit" (Mac: "Firefox > Quit"; Linux: "File > Quit") to close Firefox if you are currently doing that by clicking the close X on the title bar.
    See also:
    *"Hang at exit": http://kb.mozillazine.org/Firefox_hangs
    *"Firefox hangs when you quit it": https://support.mozilla.org/kb/Firefox+hangs
    There are other things that need your attention.
    Please Update to the latest Firefox 17.0.x version.
    *Help > About Firefox
    *https://support.mozilla.org/kb/update-firefox-latest-version
    The Firefox Firefox 12.0 version that you currently run is no longer supported with security updates.<br />
    It is important to update Firefox and add-ons to the latest versions to get the latest bug fixes and security updates.

  • How do I lookup an EJB 3.0 Session bean from servlet or JSP?

    Does anyone knows how can I invoke an EJB from a servlet or JSP ?
    I deployed a simple EJB on a Oracle Application Server 10g release 10.1.3 and I'm working with JDeveloper 10.1.3. I deployed the files via JDeveloper, and I didn´t specify any orion-ejb-jar.xml or ejb-jar.xml file
    After deployment, the orion-ejb-jar.xml look like this in the server:
    <?xml version="1.0" encoding="utf-8"?>
    <orion-ejb-jar xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/oracleas/schema/orion-ejb-jar-10_0.xsd" deployment-version="10.1.3.0.0" deployment-time="10b49516c8f" schema-major-version="10" schema-minor-version="0" >
    <enterprise-beans>
    <session-deployment name="HolaMundoEJB" location="HolaMundoEJB" local-location="HolaMundoEJB_HolaMundoEJBLocal" local-wrapper-name="HolaMundoEJBLocal_StatelessSessionBeanWrapper6" remote-wrapper-name="HolaMundoEJB_StatelessSessionBeanWrapper7" persistence-filename="HolaMundoEJB.home_default_group_1">
    </session-deployment>
    </enterprise-beans>
    <assembly-descriptor>
    <default-method-access>
    <security-role-mapping name="<default-ejb-caller-role>" impliesAll="true" />
    </default-method-access>
    </assembly-descriptor>
    </orion-ejb-jar>
    I'm trying to invoke the ejb in a servlet by doing the following:
    public void doGet(HttpServletRequest request, ....
    Context context = new InitialContext();
    HolaMundoEJB helloWorld =
    (HolaMundoEJB)context.lookup("java:com/env/ejb/HolaMundoEJB");
    String respuesta = helloWorld.sayHello("David");
    When i invoke the servlet I catch a NamingException whose message says something
    like this ....java:com/env/ejb/HolaMundoEJB not found in webLlamaEJB
    I tried different paths for the lookup but nothing....
    Can anyone help me with this topic? Thank you.

    Please try the following code:
    HelloEJBBean.java:
    @Stateless(name="Hello")
    @Remote(value={Hello.class})
    public class HelloEJBBean implements Hello {  ... }
    hello.jsp:
    Context ctx = new InitialContext();
    Hello h = (Hello)ctx.lookup("ejb/Hello");
    web.xml:
    <ejb-ref>
    <ejb-ref-name>ejb/Hello</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <remote>fi.kronodoc.test.model.Hello</remote>
    </ejb-ref>
    i think you should also define jndi mappings for the references in orion-ejb-jar.xml and orion-web.xml but for some reason it seems to be working also without these.

  • How to refer utitlity jar from EJB jar in ear?

    hi, all,
    I want to refer an existing jar file from EJB, but i do not know how to do it? please help!
    Thanks.

    I am using weblogic 6.1

  • How to access external jars from ejb jars

    All,
    This is my first visit/post to this group. What I'd like to know is how
    an external jar file with common, shared classes can be access by a
    session bean in an ejbc'd jar. I'm running WLS 6.1 and have some DAO
    and other classes in a common.jar that I'd like all my ejbc'd jars to
    have access to. Any help would be appreciated!
    -Keith

    Keith,
    "Keith" <[email protected]> wrote in message news:[email protected]..
    This is my first visit/post to this group. What I'd like to know is how
    an external jar file with common, shared classes can be access by a
    session bean in an ejbc'd jar. I'm running WLS 6.1 and have some DAO
    and other classes in a common.jar that I'd like all my ejbc'd jars to
    have access to. Any help would be appreciated!I'd recommend packaging your application as an EAR - than your
    ejbjars will have access to utility jars.
    Regards,
    Slava Imeshev

  • JDev 10.1.3 how to invoke oc4j_remote_deploy.jar from command line?

    Hi, does anyone know how to invoke the JDev 10.1.3 oc4j_remote_deploy.jar from the command line? We have it working for 10.1.2, for automated deployment scripts.
    If I try the same thing for 10.1.3, I get an error.
    See below my command line and the output.
    I think the error is in the Oc4jDcmServlet URL, the format seems to have changed from 10.1.2 to 10.1.3.
    I tried to reverse-engineer by using an HTTP tracer, but that did not help.
    Any help would be much appreciated.
    Regards, Maarten Brugman
    ======================== command line: ==================
    "C:\j2sdk1.4.2_09\bin\java.exe" -Djava.protocol.handler.pkgs=HTTPClient -jar C:\jdev-work\ebrp-new\ear\target\installer\oc4j_remote_deploy.jar http://lnvx0027:29805/Oc4jDcmServletAPI/ oc4jadmin ***** listApplications /oracle/oaedv03/oracle/oas/10.1.3/ontwj2e1013 UNDEFINED UNDEFINED OC4J_OEBRP
    ============ output: ====================================
    Initializing log
    Servlet interface for OC4J DCM commands
    Command timeout defined at 600 seconds
    Executing DCM command...
    Executing command listApplications /oracle/oaedv03/oracle/oas/10.1.3/ontwj2e1013
    UNDEFINED UNDEFINED OC4J_OEBRP
    Command = LISTAPPLICATIONS
    Opening connection to Oc4jDcmServlet
    Setting userName to oc4jadmin
    Sending command to DCM servlet
    **** Could not check HTTP response code
    ** Thread[main,5,main] ** Fri May 11 17:18:13 CEST 2007 ** ** EXCEPTION: java.
    net.SocketException: Unexpected end of file from server
    java.net.SocketException: Unexpected end of file from server
    at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:822)
    at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:711)
    at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:820)
    at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:711)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLCon
    nection.java:635)
    at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:272
    at oracle.j2ee.tools.remote_deploy.Oc4jDcmClient.isHttpResponseOk(Unknow
    n Source)
    at oracle.j2ee.tools.remote_deploy.Oc4jDcmClient.sendCommand(Unknown Sou
    rce)
    at oracle.j2ee.tools.remote_deploy.Oc4jDcmCommand.execute(Unknown Source
    at oracle.j2ee.tools.remote_deploy.Oc4jDcmCommand.listApplications(Unkno
    wn Source)
    at oracle.j2ee.tools.remote_deploy.Oc4jDcmMain.main(Oc4jDcmMain.java:71)
    #### HTTP response is NOT ok
    Closing connection to Oc4jDcmServlet
    #### DCM command did not complete successfully (-1)
    #### HTTP return code was -1
    ============ end output =================================

    In my opinion, you will succeed in handling linefeeds in output texts by using an <tt><af:outputFormatted></tt> tag in conjuction with a JSF converter that replaces the linefeeds with a <tt>&lt;br></tt> tag in the text. You will have to implement a custom converter class (this is quite simple, see below) and to set it to the <tt>converter</tt> attribute of the <tt><af:outputFormatted></tt>. The converter class should look like:
    public class MyLinefeedConverter implements javax.faces.convert.Converter
      public MyLinefeedConverter() {
      public Object getAsObject(FacesContext context, UIComponent component, String value) {
        return value;
      public String getAsString(FacesContext context, UIComponent component, Object value) {
        if (value==null) return "";
        if (value instanceof String) return ((String)value).replace("\n", "<br>");
        return value.toString();
    }In this way the linefeeds in your text values will be replaced by <tt>&lt;br></tt>, which will be rendered by the corresponding <af:outputFormatted> tag as line breaks.

  • How to manipulate a number from a string

    Hi All
    I am using CRXI and have designed a report that will list all of our fleet starting with the 'Fleet No.' The fleet no. field is a string so that the fleet no.s weren't displaying in numerical order. I converted the field to a number and it then worked fine. Now, of course, the boffins have decided to create new fleet no's '7110.1'. With the field being a number these weren't displaying on my report. I thought if I played with the 'decimal points' that would help. My report now has '101.0' instead of '101' as well as displaying '7110.1'. Is there a formula to suppress the decimal point if it is zero?
    Thanks in advance for your help

    Please try this:
    1.     Right click on the field (formula field for FleetNo - {@numFleetNo})
    2.     Select Format field.
    3.     Select the Number Tab
    4.     Click on Customize...
    Write the following formula in front of Decimals and Rounding by clicking on X-2 editor of both.
    if {@numFleetNo} - Floor ({@numFleetNo}) = 0 then
        0
    Else
        1
    Hope this will help.

  • How to recieve Debug-Information from XMLEncoder and XMLDecoder.

    Hi, ist there any way to get Informations about the current class/object (methods that are called) the XML-Dencoder is currently working on?
    Cause my stack-trace gives no hint and I'm loading (XML-file looks fine) a very complex structure with only one handle to the whole, so debbuging is quite impossible.
    Thanks a lot in advance.
    Greetings Michael

    Hi,
    Use the Views:
    VIAUFKS and VIAUF_AFVC
    for getting the required Info.
    Get the material from above and the text from MAKT.
    reward if useful
    regards,
    ANJI

  • How to get selected items from a tree in backing bean without adfbc

    Hi ADF Experts,
    Below is my code for af:tree. My question is how can I get selected Items from the selectionListener (without adf bc) this uses formation of tree from backing bean.
    Using Jdev 11.1.1.7.0
    <af:tree var="node" value="#{pageFlowScope.MerchandizeBean.model}"
                      binding="#{pageFlowScope.MerchandizeBean.treeModel}"     id="tree" immediate="true" autoHeightRows="0"
                           styleClass="AFStretchWidth" rowSelection="multiple"
                           selectionListener="#{pageFlowScope.MerchandizeBean.treeNodeSelection}">
                    <f:facet name="nodeStamp">
                      <af:commandLink text="#{node.classDescription}"
                           actionListener="#{pageFlowScope.MerchandizeBean.createListManyItemForMerchandise}"           id="displayTable" partialSubmit="true">
                      </af:commandLink>
                    </f:facet>
                  </af:tree>
        public void treeNodeSelection(SelectionEvent selectionEvent) {
            // Add event code here...
            RichTree tree = (RichTree)selectionEvent.getSource();
                    TreeModel model = (TreeModel)tree.getValue();
                    //get selected value
    Thanks
    Roy

    Hi,
    in a multi select case, try
    RowKeySet rks = tree.getSelectedRowKeys();
    Iterator iter = rks.iterator();
    while(iterator.hasNext()){
    Object aKey = iterator.next();
    tree. setRowKey(aKey);
    Object rowData ? tree.getRowData();
      .... do something with the data here ...
    Frank

  • How to develop EJB 3.0  Session Beans under WL Workshop 10.3?

    Hi there,
    I know the theory about EJB, no problem there, but I've been trying to develop some EJB's on WLW, and I'd like to ask you two things:
    1. Is there any guide to follow? I found this web page, but I feel it's not quite enough.
    2. How do you do to make code-completion working for the EJB (or any other) annotations? I write @javax. CTRL-Space and it starts completing, but it does not add the founded class to the class' imports.
    Thanks in advance for any tip!
    Andrés

    Hi,
    You may have better luck posting this question to the Workshop forum: Workshop
    - Matt

Maybe you are looking for

  • K8N NEO2 Platinum rebooting

    Hi all,just got myself a 64bit MSI K8N NEO2 Platinum board & a 3200+,am happy with it but a couple of days ago i got a blue screen with a long message that i didnt have time to read before the pc rebooted,after the reboot i checked the event viewer l

  • How to restrict the changes in Relesed PO?.

    Hi all, How to restrict the users to make a changes in the Released PO?. User should make the changes only if it is unreleased by the respective codes. 1. Is there any user parameters like functional authorisation? 2. I have already suggested two sol

  • A critical error has occurred in BEX Analyzer

    We have recently upgraged the SAP GUI to 710 Patch 12 Excel 2003 on Excel 2007 BW is on SAP_BW at 700with Patch2-bi710sp08_800-10004472 When I am trying to execute a query through BEx Analyzer and i am getting the error:u201DSystem Exception thrown w

  • HP -Other hardware, printer - Null Fax - HP Officejet 8610

    I recently update to Windows 8.1 from Windows 8 on a desk top machine. Everything went well until Windows is trying to install an update for this printer (HP Officejet 8610). It is getting error 8007002. I checked the Windows site to find a fix and f

  • Macbook won't boot, Blue Screen in Safe Mode

    Having a couple of issues at the moment. To start off, woke my MacBook from sleep mode and found the screen had shimmering edges, the screen was also displaced (part of the left of the screen was showing on the right. Decided to reboot to solve the i