Validating reference to remote bean

Hi,
I am writing a servlet filter, accessing a stateless session bean. The filter uses the bean to log requests.
The problem I have is that for performance I do not wish to newly lookup the home object of the bean and reinstantiate a bean upon every request or even upon each access to the bean. I want to do it upon initialization or lazy upon first request and then use the reference during subsequent requests.
However if someone redeploys the bean (which is probably more likely during development than during production use, still it is possible in both cases) the reference that my filter holds becomes invalid.
As I would consider it pretty ugly to surround each call to the bean with a try-catch block to check whether the bean is still there, I am searching for a way to find out whether the reference I have access to still points to a valid instance.
Something myLoggerBean.stillthere(), which lets me create a new one in case someone redeployed the bean.
Any chance of doing that or will I have to stick with my exception handling like:
try{
myLoggerBean.logtherequest(req);
} catch(RuntimeException e)
myLoggerBean = getNewLoggerBean();
myLoggerBean.logTheRequest(req);
Any input is appreciated, thanks in advance
Robbi

Thank you for the input.
Apparently what you are proposing and what I already almost implemented is the only way to do it. Right now I have a problem using a JBoss Bug. The reinstantiation of the bean fails after the redeployment of the bean. However this is due to the fact that the filter and the bean are in separate packages (filter is in axis.war, bean is in separate jar - file). Others have had that problem with JBoss, even though remote interface was used not local. So I will probably have to move them into one ear and then things will work.
Unfortunately we do need to log using such a heavy weight solution. Of course this is not used for all simple log output of the software. We do use Log4J for that, this solution is only for request and response SOAP.
We are creating a life science software which needs to record the webservice requests arriving at our replication. This is so that at a later point in time we can perfectly reconstruct what requests arrived and what responses were send out, in case someone blaims us to have caused harm by wrong results.
Thanks again for answering.
Greets Robbi

Similar Messages

  • Ejb-ref element references to other beans

    Hello,
    Can anyone tell me what ejb references to other beans are for? (ejb-ref element).
    I am completely missing the point and would be grateful if someone could tell me why I should have the overhead of writing this:
    <ejb-ref>
    <ejb-ref-name>ejb/waUserMgr</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <home>com.reuters.pds.webapp.bl.user.api.WAUserMgrHome</home>
    <remote>com.reuters.pds.webapp.bl.user.api.WAUserMgr</remote>
    <ejb-link>WAUserMgrEJB</ejb-link>
    </ejb-ref>
    Any comment welcome..
    Julien.

    Hi,
    The <ejb-ref> element is optional, you could use the actual JNDI name instead.
    The advantage with using <ejb-ref> is that, if you deploy the bean on another server, probably with a different JNDI name,
    your code can still continue using the same name as defined by <ejb-ref-name>.
    Internally, the <ejb-ref-name> will be mapped to the actual JNDI location, maybe using symbolic links.

  • Error deploying Bean using Remote Bean

    Hi,
    i have a problem deploying an EntityBean having a relationship to a remote
    bean.
    I can compile the bean with weblogic.ejbc without any problems but then i
    try
    to deploy the bean i get an exeception saying that the ejb reference has no
    JNDI name
    but it has one. In my opinion everything is ok with the deployment
    descriptors. Can anybody help?
    Exception:
    <02.04.2001 13:35:08 GMT+02:00> <Error> <J2EE> <Error deploying EJB
    Component : Status
    weblogic.ejb20.EJBDeploymentException: EJB Deployment Error:; nested
    exception is:
    weblogic.deployment.EnvironmentException: EJB Reference has no JNDI
    name set
    weblogic.deployment.EnvironmentException: EJB Reference has no JNDI name set
    at
    weblogic.ejb20.deployer.EnvironmentBuilder.addEJBReferences(EnvironmentBuild
    er.java:121)
    at
    weblogic.ejb20.deployer.Deployer.setupEnvironmentContext(Deployer.java:152)
    at
    weblogic.ejb20.deployer.Deployer.deployDescriptor(Deployer.java:1096)
    at weblogic.ejb20.deployer.Deployer.deploy(Deployer.java:908)
    at weblogic.j2ee.EJBComponent.deploy(EJBComponent.java:31)
    at weblogic.j2ee.Application.addComponent(Application.java:126)
    at weblogic.j2ee.J2EEService.addDeployment(J2EEService.java:115)
    at
    weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentT
    arget.java:283)
    at
    weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentT
    arget.java:109)
    at java.lang.reflect.Method.invoke(Native Method)
    at
    weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl
    .java:562)
    at
    weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:5
    48)
    at
    weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBea
    nImpl.java:285)
    at
    com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
    at
    com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
    at
    weblogic.management.internal.ConfigurationMBeanImpl.updateConfigMBeans(Confi
    gurationMBeanImpl.java:409)
    at
    weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBea
    nImpl.java:287)
    at
    com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
    at
    com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
    at
    weblogic.management.internal.DynamicMBeanImpl.addDeployment(DynamicMBeanImpl
    .java:866)
    at
    weblogic.management.internal.DynamicMBeanImpl.addDeployment(DynamicMBeanImpl
    .java:853)
    at
    weblogic.management.internal.DynamicMBeanImpl.add(DynamicMBeanImpl.java:838)
    at
    weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl
    .java:566)
    at
    weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:5
    48)
    at
    weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBea
    nImpl.java:285)
    at
    com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
    at
    com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
    at
    weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:437)
    at
    weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:178)
    at $Proxy21.addTarget(Unknown Source)
    at
    weblogic.management.mbeans.custom.ApplicationManager.autoDeploy(ApplicationM
    anager.java:486)
    at
    weblogic.management.mbeans.custom.ApplicationManager.addApplication(Applicat
    ionManager.java:557)
    at
    weblogic.management.mbeans.custom.ApplicationManager.addApplication(Applicat
    ionManager.java:504)
    at
    weblogic.management.mbeans.custom.ApplicationManager.poll(ApplicationManager
    .java:428)
    at
    weblogic.management.mbeans.custom.ApplicationManager.poll(ApplicationManager
    .java:380)
    at
    weblogic.management.mbeans.custom.ApplicationManager.update(ApplicationManag
    er.java:152)
    at
    weblogic.management.mbeans.custom.ApplicationManager.startAdminManager(Appli
    cationManager.java:205)
    at
    weblogic.management.mbeans.custom.ApplicationManager.start(ApplicationManage
    r.java:120)
    at java.lang.reflect.Method.invoke(Native Method)
    at
    weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl
    .java:562)
    at
    weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:5
    48)
    at
    weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBea
    nImpl.java:285)
    at
    com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
    at
    com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
    at
    weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:437)
    at
    weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:178)
    at $Proxy2.start(Unknown Source)
    at
    weblogic.management.Admin.startApplicationManager(Admin.java:1034)
    at weblogic.management.Admin.finish(Admin.java:491)
    at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:429)
    at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:170)
    at weblogic.Server.main(Server.java:35)
    >
    <02.04.2001 13:35:08 GMT+02:00> <Error> <J2EE> <Error deploying application
    Status: Could not deploy: 'Status.jar'
    ejb-jar.xml:
    <relationships>
    <ejb-entity-ref>
    <remote-ejb-name>Kategorien</remote-ejb-name>
    <ejb-ref-name>ejb/Kategorien</ejb-ref-name>
    <home>de.virtual_ivy_league.virtHo.EntityBean.Kategorien.KategorienHome</hom
    e>
    <remote>de.virtual_ivy_league.virtHo.EntityBean.Kategorien.KategorienRemote<
    /remote>
    </ejb-entity-ref>
    <ejb-relation>
    <ejb-relation-name>Status-Kategorie</ejb-relation-name>
    <ejb-relationship-role>
    <ejb-relationship-role-name>Status-Hat-Kategorie</ejb-relationship-role-name
    >
    <multiplicity>one</multiplicity>
    <role-source>
    <ejb-name>Status</ejb-name>
    </role-source>
    <cmr-field>
    <cmr-field-name>iDtblKategorien</cmr-field-name>
    </cmr-field>
    </ejb-relationship-role>
    <ejb-relationship-role>
    <ejb-relationship-role-name>Kategorie-Hat-Status</ejb-relationship-role-name
    >
    <multiplicity>one</multiplicity>
    <role-source>
    <remote-ejb-name>Kategorien</remote-ejb-name>
    </role-source>
    </ejb-relationship-role>
    </ejb-relation>
    </relationships>
    weblogic-ejb-jar:
    <relationship-descriptor>
    <ejb-entity-ref-description>
    <remote-ejb-name>Kategorien</remote-ejb-name>
    <jndi-name>de.virtual_ivy_league.virtHo.EntityBean.Kategorien</jndi-name>
    </ejb-entity-ref-description>
    </relationship-descriptor>
    weblogic-cmp-rdbms-jar.xml:
    <weblogic-rdbms-relation>
    <relation-name>Status-Kategorie</relation-name>
    <weblogic-relationship-role>
    <relationship-role-name>Status-Hat-Kategorie</relationship-role-name>
    <column-map>
    <foreign-key-column>[IDtblKategorien]</foreign-key-column>
    </column-map>
    </weblogic-relationship-role>
    <weblogic-relationship-role>
    <relationship-role-name>Kategorie-Hat-Status</relationship-role-name>
    </weblogic-relationship-role>
    </weblogic-rdbms-relation>

    try :
    p.stepid and p.stepversion are correct insert into &lt;cmp-field&gt; ?
    and Processparameter is the correct name of &lt;abstract-schema-name&gt;?
    is your &lt;ejb-ql&gt; insert in the right &lt;entity&gt; ?
    findByProcessStep(Integer, Integer) is the unique name in your ejb-jar? and in the (LocalHome ||RemoteHome)

  • Y-intercept calculation problem: "A2:A7" isn't a valid reference

    This is actually a problem I have with many calculations in Numbers but I will use the following as an example:
    I am trying to calculate the y-intercept and slope for a set of data. Table 1 contains the raw data with each data point in triplicate. In Table 2, column 1 is the ordinate value and column 2 is the abscissa value, which is the average of the triplicates. I would like to place the calculation for the y-intercept in column 3 and the slope in column 4, but always get the error, "A2:A7" isn't a valid reference" for a result. Instead, I have to have a third table for just the y-int and slope. Why isn't A2:A7 a valid reference?

    No, I didn't; I only had a 5 rows but I made it 7 rows - so it was a 4 column x 7 row table - and then the formulas worked. The odd thing is that there was still only data in the first 5 rows and, after I set up the formulas, I reduced the table back to 4x7 and the formulas remained unchanged. Thanks for the help.

  • "Cost" isn't a valid reference ...

    I'm new to Numbers - lifelong Excel user/developer. 
    I'm trying to do something which I beleive should be extremely simple.  I have two spreadsheets, one called "Expenses" and one called "Summary."  Revenues has three tables. 
    In the "Summary" spreadsheet, I'm in a table and I'm trying to multiply a cell from the "Fixed Costs" table in "Expenses" by 12 to get the annual fixed costs.
    When I type "=" and then use my mouse to select any cell in the "Fixed Costs" table in the "Expenses" spreadsheet, it fails to return a valid reference. 
    Instead of a valid reference, it just the text "Y1 Cost" ... which generates the error in the subject of this discussion.  (See graphic).
    All of the other tables in "Expenses" return proper cell references (see below).
    I've verified that the cell in question is numeric (its a formula itself). 
    I've deleted the table and re-created it.
    If I try to create a sum (=sum( ... .and then select B2:B3)... it works.  But selecting a single cell does not.
    Its making me a bit crazy. 
    I can work around it ... but I'd sure appreciate understanding why its behaving this way, so I can avoid it in the future. 

    "I have two spreadsheets, one called "Expenses" and one called "Summary."  Revenues has three tables."
    "Spreadsheet" = "Document"?
    Or do you mean "My document has two Sheets, "Expenses" and "Summary"
    What is "Revenues"? Another Sheet in the current Document? A separate Document?
    Is your profile accurate? It lists Mac OS X v10.4.10, one update before the final one for v10.4. Unlikely to be a contributing factor, but possible.
    I don't see a reason for the failure. I would suggest turning off 'Use header cell names as references' while building formulas/tables, but that may just be personal preference on my part.
    Regards,
    Barry
    PS: Answers to the questions may help someone come to an AHA! moment before I get back to this.
    B

  • Calling a remote bean from JCAPS 5.1.3 JCD

    Hi all,
    we have JCAPS 5.1.3.
    From a JCD we want to call a remote bean that is running on a Glassfish domain.
    Do call the remote bean from a NetBeans project (as a standalone client) I know you have to put the "org.omg.CORBA.ORBInitialHost" and "org.omg.CORBA.ORBInitialPort" in the InitialContext together with the factory. Doing this it works from NetBeans 6.5.1. So we know that our remote beans are accessible and working.
    Doing the same it wont wrok from a JCAPS 5.1.3 JCD. I receive the message that the remote bean cant be found. I know for sure I have configured the ORBInitalHost and Port the same as in NetBeans. It looks like that JCAPS 5.1.3 may use some other InitialContext settings.
    My questions are:
    - which settings I have to put into the InitialContext (in the JCD code or in a local JCAPS 5.1.3 JNDI resource)?
    - which jar files I have to use in JCAPS 5.1.3? The jar files from the remote Glassfish application server or from JCAPS 5.1.3 ( the jars like "appserv-rt.jar")
    - any other thing I have to be aware of?
    Thanks in advance.
    Madere.

    Hi all,
    we have JCAPS 5.1.3.
    From a JCD we want to call a remote bean that is running on a Glassfish domain.
    Do call the remote bean from a NetBeans project (as a standalone client) I know you have to put the "org.omg.CORBA.ORBInitialHost" and "org.omg.CORBA.ORBInitialPort" in the InitialContext together with the factory. Doing this it works from NetBeans 6.5.1. So we know that our remote beans are accessible and working.
    Doing the same it wont wrok from a JCAPS 5.1.3 JCD. I receive the message that the remote bean cant be found. I know for sure I have configured the ORBInitalHost and Port the same as in NetBeans. It looks like that JCAPS 5.1.3 may use some other InitialContext settings.
    My questions are:
    - which settings I have to put into the InitialContext (in the JCD code or in a local JCAPS 5.1.3 JNDI resource)?
    - which jar files I have to use in JCAPS 5.1.3? The jar files from the remote Glassfish application server or from JCAPS 5.1.3 ( the jars like "appserv-rt.jar")
    - any other thing I have to be aware of?
    Thanks in advance.
    Madere.

  • Not allowed to look up a remote bean

    Hello everyone,
    I am getting the following error when I am attempting to do a remote lookup of a bean deployed within the same computer but in another OC4J instance. So I am using OC4J embedded into OracleAS.
    [ApplicationServerThread] DEBUG game.GameManager 2003-04-23 11:30:20,625 - Game Driver URL = localhost:3111/loto User= admin Pass:admin
    [ApplicationServerThread] DEBUG game.GameManager 2003-04-23 11:30:20,625 - Get Initial Context
    [ApplicationServerThread] DEBUG game.GameManager 2003-04-23 11:30:20,625 - Context Lookup ID=loto
    [ApplicationServerThread] ERROR game.GameManager 2003-04-23 11:30:20,640 - Game (loto)Driver Loading Error
    java.lang.SecurityException: Not allowed to look up loto, check the namespace-access tag setting in orion-application.xml for details
         at com.evermind.server.rmi.RMIConnection.EXCEPTION_ORIGINATES_FROM_THE_REMOTE_SERVER(RMIConnection.java:1530)
         at com.evermind.server.rmi.RMIConnection.lookup(RMIConnection.java:1701)
         at com.evermind.server.rmi.RMIServer.lookup(RMIServer.java:470)
         at com.evermind.server.rmi.RMIContext.lookup(RMIContext.java:109)
         at javax.naming.InitialContext.lookup(InitialContext.java:350)
         at com.mot.vla.game.GameManager.getGameDriverFromURL(GameManager.java:286)
         at com.mot.vla.game.GameManager.getGameDriver(GameManager.java:262)
         at com.mot.vla.game.GameManager.getGameDesc(GameManager.java:78)
         at com.mot.vla.kernel.VlaPlayerKernel.getGameDescription(VlaPlayerKernel.java:147)
         at VlaPlayerKernelRemote_StatefulSessionBeanWrapper8.getGameDescription(VlaPlayerKernelRemote_StatefulSessionBeanWrapper8.java:1039)
         at com.mot.vla.ui.core.CoreServices.getGameDescription(CoreServices.java:677)
         at com.mot.vla.ui.core.CoreEngine.actionDispatcher(CoreEngine.java:163)
         at com.mot.vla.ui.core.CoreEngine.renderDocument(CoreEngine.java:122)
         at com.mot.vla.ui.core.CoreEngine.processRequest(CoreEngine.java:106)
         at com.mot.vla.ui.servlet.RequestHandler.doPost(RequestHandler.java:204)
         at com.mot.vla.ui.servlet.RequestHandler.doGet(RequestHandler.java:179)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:244)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:59)
         at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:283)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:523)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:269)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:735)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:151)
         at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:64)
    I do not what is wrong with my code or other files. I included them for reference.
    static public Context getInitialContext(String url, String user,
    String password) throws Exception {
    Hashtable env = new Hashtable();
    // set the environment properties
    //env.put(Context.INITIAL_CONTEXT_FACTORY,"com.evermind.server.ApplicationClientInitialContextFactory");
    System.out.println("Get Initial Context");
    logger.debug("Get Initial Context");
    env.put(Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.rmi.RMIInitialContextFactory");
    env.put(Context.SECURITY_PRINCIPAL, "jazn.com/"+user);
    env.put(Context.SECURITY_CREDENTIALS, password);
    env.put(Context.PROVIDER_URL, "ormi://"+url);
    env.put("dedicated.connection","true");
    //env.put("dedicated.rmicontext","true");
    try {
    // create an initial context using the above environment properties
    return (new InitialContext(env));
    catch (Exception e) {
    System.out.println("Context initializtion error");
    e.printStackTrace();
    logger.error("Context initializtion error", e);
    return null;
    public GameDriverRemote getGameDriverFromURL(String id, String url,
    String user, String password) {
    try {
    Context context = getInitialContext(url, user, password);
    logger.debug("Context Lookup ID="+id);
    Object obj = context.lookup(id);
    if (obj!=null) {
    logger.debug("Context Lookup found :"+id+" Class Name = "+obj.getClass().getName());
    GameDriverHome gameDriverHome = (com.mot.vla.game.GameDriverHome) PortableRemoteObject.narrow(obj, com.mot.vla.game.GameDriverHome.class);
    if (gameDriverHome != null) {
    System.out.println("Game (" + id + ") Driver Home Interface Found");
    logger.debug("Game (" + id + ") Driver Home Interface Found");
    GameDriverRemote gameDriverRemote = (com.mot.vla.game.GameDriverRemote) PortableRemoteObject.narrow(gameDriverHome.create(), com.mot.vla.game.GameDriverRemote.class);
    return gameDriverRemote;
    catch (Exception e) {
    logger.error("Game (" + id + ")Driver Loading Error", e);
    return null;
    here are the parameters being passed
    url= localhost:3111/loto user = admin password=admin
    and here is my orion-application.xml
    <?xml version = '1.0'?>
    <!DOCTYPE orion-application PUBLIC "-//Evermind//DTD J2EE Application runtime 1.2//EN" "http://xmlns.oracle.com/ias/dtds/orion-application.dtd">
    <orion-application deployment-version="9.0.2.0.0" default-data-source="jdbc/OracleDS">
         <ejb-module remote="false" path="LotoGameDriver.jar"/>
         <persistence path="persistence"/>
         <principals path="principals.xml"/>
         <jazn provider="XML" location="jazn-data.xml"/>
         <log>
              <file path="application.log"/>
         </log>
         <namespace-access>
              <read-access>
                   <namespace-resource root="">
                        <security-role-mapping name="&lt;jndi-user-role>">
                             <group name="jazn.com/administrators"/>
                        </security-role-mapping>
                   </namespace-resource>
              </read-access>
              <write-access>
                   <namespace-resource root="">
                        <security-role-mapping name="&lt;jndi-user-role>">
                             <group name="jazn.com/administrators"/>
                        </security-role-mapping>
                   </namespace-resource>
              </write-access>
         </namespace-access>
    </orion-application>
    Any help would be appreciated

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by Bernie Yee ([email protected]):
    If you want to lookup an environment variable from a remote client, you need to set "namespace-access" tag in orion-applica
    tion.xml. Otherwise, you will have no access to the jndi namespace.<HR></BLOCKQUOTE>
    I added this xml part to my orion-application.xml and it is working now. In the default application only the administrators group have access to the context.
    <namespace-access>
    <read-access>
    <namespace-resource root="">
    <security-role-mapping >
    <group name="users" />
    </security-role-mapping >
    </namespace-resource>
    </read-access>
    <write-access>
    <namespace-resource root="">
    <security-role-mapping >
    <group name="users" />
    </security-role-mapping >
    </namespace-resource>
    </write-access>
    </namespace-access>
    I found no documentation about this topic.

  • Avi valid reference

    An AVI file can created or opened via "IMAQ AVI Create" or "IMAQ AVI Open," respectively.  Each of these subVIs produce an AVI File Reference.  Is there any way to check if that reference is valid?  The "Not a NaN/Path/Ref?" primitive always returns true for this datatype, regardless of whether the AVI file reference refers to a valid open file or not.  I have also tried other methods, all unsuccessful:
    1)  I saw that the AVI file reference is really just a strictly typed datalog file reference (with datatype int32), but trying to typecaste it to a datalog reference and checking that reference for validity did not work. 
    2)  You can typecaste the AVI file ref to an int32 that produces the same number as the probe of the reference, but this number stays the same whether the AVI reference is open or closed, so it does not help
    3)  I tried to use the "IMAQ AVI Get Info" subVI so that I can trap an error and determine if the reference was valid, but this only works for read sessions of the AVI file reference (i.e., created with "IMAQ AVI Open").  A reference created by "IMAQ AVI Create" is a write session, and cannot be checked this way.
    It seems like this should have already been implemented, but I guess LabVIEW treats the AVI file refernce quite uniquely.  Many of the primitives that work on references do not work on this datatype.  Is there any way to reproduce the functionality of "Not a NaN/Path/Ref?" for an AVI file reference?

    I thank you for the idea, but I'm afraid it does not work as I wanted.  The attached image shows 3 examples illustrating my point.
    In the first example (untitled1), "IMAQ AVI Create" is used, and both probes remain false.
    In the second example (untitled2), "IMAQ AVI Open" is used, and both probes remain false.
    In the third example (untitled3), "Open\Create\Replace File" is used, and the "Not A Reference" primitive is false for probe1 and true for probe2.  Note: if I use the "equal to Not A Ref" method for the third example (like for the first two examples), I get both probes remaining false as well.
    I'm looking for a way to replicate the behavior of the third example for AVI file references.
    Message Edited by Yuri33 on 07-05-2007 09:59 AM
    Attachments:
    tmp_aviref_test.PNG ‏43 KB

  • Cannot find deployed Remote Bean from external client

    I have a very simple Stateless Session bean running in the SAS PE 9, which from what I can see has been successfully deployed. The application is listed as enabled in the Admin Console. Likewise, when I look at the JNDI tree, I can see the following entries at the top:
    com.intecbilling.svConnectorHarness.TestRunnerRemote
    This is the name of the Remote Interface, that I have defined for the ejb TestRunnerBean. It does very little:
    package com.intecbilling.svConnectorHarness;
    import javax.ejb.Stateless;
    @Stateless
    public class TestRunnerBean implements TestRunnerRemote, TestRunnerLocal {
        public void runTest() {
            System.out.println("Running test!");
    }and the Remote Interface is
    package com.intecbilling.svConnectorHarness;
    import java.rmi.RemoteException;
    import javax.ejb.Remote;
    @Remote
    public interface TestRunnerRemote {
        void runTest() throws RemoteException;
    }Now, I'm trying to call this runTest() method from an external client. The client code looks like
        public void connectUsingJNDI(String paramName) throws NamingException {
            Properties env = new Properties();
            env.put("java.naming.factory.initial", initialFactory);
            env.put("java.naming.provider.url", providerUrl);
            String myJndi = jndiName;
            if (paramName != null) {
                myJndi = paramName;
            Context ctx = new InitialContext(env);
            System.out.println("looking for " + myJndi);
            Object returnedObject = ctx.lookup(myJndi);
            System.out.println("returnedObject=" + returnedObject);
        }I am using:
    - com.sun.jndi.cosnaming.CNCtxFactory as the initial factory
    - iiop://<machineName>:3700 as the url. I'm using 3700 because that is the port against which my appServer's orb-listener-1 is using
    I've tried to look for the JNDI name of
    com.intecbilling.svConnectoryHarness.TestRunnerRemote
    because that is what is displayed in the JNDI View. When I do this, I get the following error:
    /svjca-src> runMe.sh com.intecbilling.svConnectorHarness.TestRunnerRemote
    looking for com.intecbilling.svConnectorHarness.TestRunnerRemote
    javax.naming.NameNotFoundException [Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0]
         at com.sun.jndi.cosnaming.ExceptionMapper.mapException(ExceptionMapper.java:44)
         at com.sun.jndi.cosnaming.CNCtx.callResolve(CNCtx.java:484)
         at com.sun.jndi.cosnaming.CNCtx.lookup(CNCtx.java:523)
         at com.sun.jndi.cosnaming.CNCtx.lookup(CNCtx.java:501)
         at javax.naming.InitialContext.lookup(InitialContext.java:392)
         at com.intecbilling.svConnectorHarness.TestRunnerClient.connectUsingJNDI(TestRunnerClient.java:42)
         at com.intecbilling.svConnectorHarness.TestRunnerClient.main(TestRunnerClient.java:57)
    Caused by: org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0
         at org.omg.CosNaming.NamingContextPackage.NotFoundHelper.read(NotFoundHelper.java:72)
         at org.omg.CosNaming._NamingContextExtStub.resolve(_NamingContextExtStub.java:406)
         at com.sun.jndi.cosnaming.CNCtx.callResolve(CNCtx.java:470)
         ... 5 more
    Now, no matter what I do, I get this. Running with the AS jars in the classpath or not. Running with the following system variables
    -Dorg.omg.CORBA.ORBClass=com.sun.corba.ee.impl.orb.ORBImpl -Dorg.omg.CORBA.ORBSingletonClass=com.sun.corba.ee.impl.orb.ORBSingleton -Djavax.rmi.CORBA.UtilClass=com.sun.corba.ee.impl.javax.rmi.CORBA.Util
    Also provide me no joy. I've also tried using the JNDI format with the corbaname embedded in it (looks like corbaname:iiop:machinename:3700#com.intecbilling.svConnectorHarness.TestRunnerRemote) and I get the exact same exception.
    From what I'm seeing, I'm finding the remote NamingContext, but it doesn't like the JNDI name. I've tried fully-qualified names (as it is displayed in the JNDI tree) and unqualified names with the exact same results. From all of the posts I've read, I've tried all the various combinations that I can see to no avail. Is there a security issue going on here? I haven't enabled any security at all. I'm running out of ideas, and if I can't get any joy, I'll probably have to use a different app server to play with.
    Thanks for any help,
    Ed

    Hi Ed,
    We have an EJB FAQ entry that describes how to access Remote EJBs from a stand-alone (non Java EE) client. In a nutshell, put appserv-rt.jar in your classpath and instantiate the 0-arg InitialContext constructor. You can find more details here :
    https://glassfish.dev.java.net/javaee5/ejb/EJB_FAQ.html

  • Validation resets my request bean

    I have a simple request scoped bean with some simple validations in the associated form. Once I try to submit the form, with validation errors, the errors are correctly displayed, but all the properties I had already setted in the form are lost!.....
    How can I fix this.

    Sure, my BaseBean here provides a mechanism to guarantee that my init
    method is called once all properties are set.
    public class SolicitudCreditoBean extends BaseBean implements Serializable{
         private SolicitudCredito solicitudCredito;
        private String llave;
        private Integer llaveEmpresa;
        private Integer numeroSolicitud;
        private Date fechaSolicitud;
        private Date fechaRadicacion;
        private BigDecimal valor;
        private Integer numeroPlazo;
        private String tipoGarantia;
        private String observacion;
        private String estado;
        private Integer periodoGracia;
        private Integer periodoMuerto;
        private String origenCuotaAdicional;
        private co.com.unionsoluciones.sofia.cartera.model.bo.Oficina oficina;
        private co.com.unionsoluciones.sofia.cartera.model.bo.Moneda moneda;
        private co.com.unionsoluciones.sofia.cartera.model.bo.Programa programa;
        private co.com.unionsoluciones.sofia.cartera.model.bo.Convenio convenio;
        private co.com.unionsoluciones.sofia.cartera.model.bo.LineaCredito lineaCredito;
        private co.com.unionsoluciones.sofia.cartera.model.bo.UbicacionPais ubicacionPai;
        private co.com.unionsoluciones.sofia.cartera.model.bo.ModalidadCredito modalidadCredito;
        private co.com.unionsoluciones.sofia.cartera.model.bo.DestinoCredito destinoCredito;
        private co.com.unionsoluciones.sofia.cartera.model.bo.SectorEmpresa sectorEmpresa;
        private co.com.unionsoluciones.sofia.cartera.model.bo.AsesorCredito asesorCredito;
        private co.com.unionsoluciones.sofia.cartera.model.bo.PlazoSolicitud plazoSolicitud;
        private co.com.unionsoluciones.sofia.cartera.model.bo.Etnia etnia;
         //listas
         private List convenios;     
         private List programas;     
         private List lineasCredito;     
         private List monedas;     
         private List plazosPago;     
         private List asesores;     
         private List destinosCredito;     
         private List sectoresEmpresas;     
         private List oficinas;     
         private List modalidadesCredito;     
         private List tiposGarantia;     
         private List ciudades;     
         private List etnias;
         //pk
         private String oficinaPK;
        private String monedaPK;
        private String programaPK;
        private String convenioPK;
        private String lineaCreditoPK;
        private String ubicacionPaiPK;
        private String modalidadCreditoPK;
        private String destinoCreditoPK;
        private String sectorEmpresaPK;
        private String asesorCreditoPK;
        private String plazoSolicitudPK;
        private String etniaPK;
        public SolicitudCreditoBean() {
             System.out.println(" ==>> SolicitudCreditoBean().....");
         /* (non-Javadoc)
          * @see co.com.unionsoluciones.sofia.cartera.view.faces.beans.BaseBean#init()
         protected void init() {
            try {
                 System.out.println(" ==>> init() - SolicitudCreditoBean......");
                 this.valor = new BigDecimal("0");
                this.convenios = ListadosSofia.getSelectListConvenios(
                        this.getServiceLocator().getServicioConsultasSofia().obtenereConveniosActivosPorEmpresa(SofiaSessionBean.getEmpresaEnSesion()));
                this.programas = ListadosSofia.getSelectListProgramas(
                        this.getServiceLocator().getServicioConsultasSofia().obtenereProgramasActivosPorEmpresa(SofiaSessionBean.getEmpresaEnSesion()));
                this.lineasCredito = ListadosSofia.getSelectListLineasCredito(
                        this.getServiceLocator().getServicioConsultasSofia().obtenereLineasCreditoActivasPorEmpresa(SofiaSessionBean.getEmpresaEnSesion()));
                this.monedas = ListadosSofia.getSelectListMonedas(
                        this.getServiceLocator().getServicioConsultasSofia().obtenereMonedasActivas());
                this.plazosPago = ListadosSofia.getSelectListPlazosSolicitud(this.getServiceLocator().getServicioConsultasSofia().obtenerePlazosSolicitudActivos());
                this.asesores = ListadosSofia.getSelectListAsesores(
                        this.getServiceLocator().getServicioConsultasSofia().obtenerAsesoresCreditoActivosPorEmpresa(SofiaSessionBean.getEmpresaEnSesion()));
                this.destinosCredito = ListadosSofia.getSelectListDestinosCredito(
                        this.getServiceLocator().getServicioConsultasSofia().obtenerDestinosCreditoActivos());
                this.sectoresEmpresas = ListadosSofia.getSelectListSectoresEmpresa(
                          this.getServiceLocator().getServicioConsultasSofia().obtenerSectoresEmpresaActivos());
                this.oficinas = ListadosSofia.getSelectItemsOficinas(
                        this.getServiceLocator().getServicioConsultasSofia().obtenerOficinasActivasPorEmpresa(SofiaSessionBean.getEmpresaEnSesion()));
                this.modalidadesCredito = ListadosSofia.getSelectListModalidades(
                          this.getServiceLocator().getServicioConsultasSofia().obtenereModalidadesPorEmpresa(SofiaSessionBean.getEmpresaEnSesion()));
                this.tiposGarantia = ListadosSofia.getTiposGarantia();
                this.ciudades = ListadosSofia.getSelectItemsUbicacionesPais(
                          this.getServiceLocator().getServicioConsultasSofia().obtenerUbicacionPaisActivasPorNivel(new Integer(1)));
                this.etnias = ListadosSofia.getSelectItemsEtnias(
                          this.getServiceLocator().getServicioConsultasSofia().obtenerEtniasActivas());
            } catch (SofiaExcepcion e) {             
                e.printStackTrace();
                String msg = "Error inicializando el bean de Solicitud Credito";
                throw new FacesException(msg, e);
         public String registrarSolicitud(){
              System.out.println("[SolicitudCreditoBean] ==>> valor: "+this.valor);
              SolicitudCredito solicitudCredito = SolicitudCreditoBuilder.createSolicitudCredito(this);
            try {
                this.getServiceLocator().getServicioCredito().registrarSolicitud(solicitudCredito);
                return "SUCCESS";
            } catch (ObjetoSofiaNoUnico e) {
                FacesUtils.addErrorMessage("Esta solicitud ya existe, por favor intentelo de nuevo");
                //FIXME: OJO
                return "RETRY";
            } catch (SofiaExcepcion e) {
                e.printStackTrace();
                return "ERROR";
         public String next(){
            try {
                 solicitudCredito = SolicitudCreditoBuilder.createSolicitudCredito(this);
                this.getServiceLocator().getServicioCredito().registrarSolicitud(solicitudCredito);
                SolicitudCreditoBuilder.populateSolicitudCreditoBean(solicitudCredito,this);
                if(tipoGarantia.equals(SolicitudCreditoCons.GARANTIA_REAL) || tipoGarantia.equals(SolicitudCreditoCons.MIXTA)){
                     return NavigationResult.GARANTIAS;
                return NavigationResult.SOLICITANTE;
            } catch (ObjetoSofiaNoUnico e) {
                FacesUtils.addErrorMessage("Esta solicitud ya existe, por favor intentelo de nuevo");
                //FIXME: OJO
                return "RETRY";
            } catch (SofiaExcepcion e) {
                e.printStackTrace();
                return "ERROR";
          * @return Returns the asesorCredito.
         public co.com.unionsoluciones.sofia.cartera.model.bo.AsesorCredito getAsesorCredito() {
              return asesorCredito;
          * @param asesorCredito The asesorCredito to set.
         public void setAsesorCredito(
                   co.com.unionsoluciones.sofia.cartera.model.bo.AsesorCredito asesorCredito) {
              this.asesorCredito = asesorCredito;
          * @return Returns the asesores.
         public List getAsesores() {
              return asesores;
          * @param asesores The asesores to set.
         public void setAsesores(List asesores) {
              this.asesores = asesores;
          * @return Returns the ciudades.
         public List getCiudades() {
              return ciudades;
          * @param ciudades The ciudades to set.
         public void setCiudades(List ciudades) {
              this.ciudades = ciudades;
          * @return Returns the convenio.
         public co.com.unionsoluciones.sofia.cartera.model.bo.Convenio getConvenio() {
              return convenio;
          * @param convenio The convenio to set.
         public void setConvenio(
                   co.com.unionsoluciones.sofia.cartera.model.bo.Convenio convenio) {
              this.convenio = convenio;
          * @return Returns the convenios.
         public List getConvenios() {
              return convenios;
          * @param convenios The convenios to set.
         public void setConvenios(List convenios) {
              this.convenios = convenios;
          * @return Returns the destinoCredito.
         public co.com.unionsoluciones.sofia.cartera.model.bo.DestinoCredito getDestinoCredito() {
              return destinoCredito;
          * @param destinoCredito The destinoCredito to set.
         public void setDestinoCredito(
                   co.com.unionsoluciones.sofia.cartera.model.bo.DestinoCredito destinoCredito) {
              this.destinoCredito = destinoCredito;
          * @return Returns the destinosCredito.
         public List getDestinosCredito() {
              return destinosCredito;
          * @param destinosCredito The destinosCredito to set.
         public void setDestinosCredito(List destinosCredito) {
              this.destinosCredito = destinosCredito;
          * @return Returns the estado.
         public String getEstado() {
              return estado;
          * @param estado The estado to set.
         public void setEstado(String estado) {
              this.estado = estado;
          * @return Returns the etnia.
         public co.com.unionsoluciones.sofia.cartera.model.bo.Etnia getEtnia() {
              return etnia;
          * @param etnia The etnia to set.
         public void setEtnia(co.com.unionsoluciones.sofia.cartera.model.bo.Etnia etnia) {
              this.etnia = etnia;
          * @return Returns the etnias.
         public List getEtnias() {
              return etnias;
          * @param etnias The etnias to set.
         public void setEtnias(List etnias) {
              this.etnias = etnias;
          * @return Returns the fechaRadicacion.
         public Date getFechaRadicacion() {
              return fechaRadicacion;
          * @param fechaRadicacion The fechaRadicacion to set.
         public void setFechaRadicacion(Date fechaRadicacion) {
              this.fechaRadicacion = fechaRadicacion;
          * @return Returns the fechaSolicitud.
         public Date getFechaSolicitud() {
              return fechaSolicitud;
          * @param fechaSolicitud The fechaSolicitud to set.
         public void setFechaSolicitud(Date fechaSolicitud) {
              this.fechaSolicitud = fechaSolicitud;
          * @return Returns the lineaCredito.
         public co.com.unionsoluciones.sofia.cartera.model.bo.LineaCredito getLineaCredito() {
              return lineaCredito;
          * @param lineaCredito The lineaCredito to set.
         public void setLineaCredito(
                   co.com.unionsoluciones.sofia.cartera.model.bo.LineaCredito lineaCredito) {
              this.lineaCredito = lineaCredito;
          * @return Returns the lineasCredito.
         public List getLineasCredito() {
              return lineasCredito;
          * @param lineasCredito The lineasCredito to set.
         public void setLineasCredito(List lineasCredito) {
              this.lineasCredito = lineasCredito;
          * @return Returns the llave.
         public String getLlave() {
              return llave;
          * @param llave The llave to set.
         public void setLlave(String llave) {
              this.llave = llave;
          * @return Returns the llaveEmpresa.
         public Integer getLlaveEmpresa() {
              return llaveEmpresa;
          * @param llaveEmpresa The llaveEmpresa to set.
         public void setLlaveEmpresa(Integer llaveEmpresa) {
              this.llaveEmpresa = llaveEmpresa;
          * @return Returns the modalidadCredito.
         public co.com.unionsoluciones.sofia.cartera.model.bo.ModalidadCredito getModalidadCredito() {
              return modalidadCredito;
          * @param modalidadCredito The modalidadCredito to set.
         public void setModalidadCredito(
                   co.com.unionsoluciones.sofia.cartera.model.bo.ModalidadCredito modalidadCredito) {
              this.modalidadCredito = modalidadCredito;
          * @return Returns the modalidadesCredito.
         public List getModalidadesCredito() {
              return modalidadesCredito;
          * @param modalidadesCredito The modalidadesCredito to set.
         public void setModalidadesCredito(List modalidadesCredito) {
              this.modalidadesCredito = modalidadesCredito;
          * @return Returns the moneda.
         public co.com.unionsoluciones.sofia.cartera.model.bo.Moneda getMoneda() {
              return moneda;
          * @param moneda The moneda to set.
         public void setMoneda(
                   co.com.unionsoluciones.sofia.cartera.model.bo.Moneda moneda) {
              this.moneda = moneda;
          * @return Returns the monedas.
         public List getMonedas() {
              return monedas;
          * @param monedas The monedas to set.
         public void setMonedas(List monedas) {
              this.monedas = monedas;
          * @return Returns the numeroPlazo.
         public Integer getNumeroPlazo() {
              return numeroPlazo;
          * @param numeroPlazo The numeroPlazo to set.
         public void setNumeroPlazo(Integer numeroPlazo) {
              this.numeroPlazo = numeroPlazo;
          * @return Returns the numeroSolicitud.
         public Integer getNumeroSolicitud() {
              return numeroSolicitud;
          * @param numeroSolicitud The numeroSolicitud to set.
         public void setNumeroSolicitud(Integer numeroSolicitud) {
              this.numeroSolicitud = numeroSolicitud;
          * @return Returns the observacion.
         public String getObservacion() {
              return observacion;
          * @param observacion The observacion to set.
         public void setObservacion(String observacion) {
              this.observacion = observacion;
          * @return Returns the oficina.
         public co.com.unionsoluciones.sofia.cartera.model.bo.Oficina getOficina() {
              return oficina;
          * @param oficina The oficina to set.
         public void setOficina(
                   co.com.unionsoluciones.sofia.cartera.model.bo.Oficina oficina) {
              this.oficina = oficina;
          * @return Returns the oficinas.
         public List getOficinas() {
              return oficinas;
          * @param oficinas The oficinas to set.
         public void setOficinas(List oficinas) {
              this.oficinas = oficinas;
          * @return Returns the origenCuotaAdicional.
         public String getOrigenCuotaAdicional() {
              return origenCuotaAdicional;
          * @param origenCuotaAdicional The origenCuotaAdicional to set.
         public void setOrigenCuotaAdicional(String origenCuotaAdicional) {
              this.origenCuotaAdicional = origenCuotaAdicional;
          * @return Returns the periodoGracia.
         public Integer getPeriodoGracia() {
              return periodoGracia;
          * @param periodoGracia The periodoGracia to set.
         public void setPeriodoGracia(Integer periodoGracia) {
              this.periodoGracia = periodoGracia;
          * @return Returns the periodoMuerto.
         public Integer getPeriodoMuerto() {
              return periodoMuerto;
          * @param periodoMuerto The periodoMuerto to set.
         public void setPeriodoMuerto(Integer periodoMuerto) {
              this.periodoMuerto = periodoMuerto;
          * @return Returns the plazoSolicitud.
         public co.com.unionsoluciones.sofia.cartera.model.bo.PlazoSolicitud getPlazoSolicitud() {
              return plazoSolicitud;
          * @param plazoSolicitud The plazoSolicitud to set.
         public void setPlazoSolicitud(
                   co.com.unionsoluciones.sofia.cartera.model.bo.PlazoSolicitud plazoSolicitud) {
              this.plazoSolicitud = plazoSolicitud;
          * @return Returns the plazosPago.
         public List getPlazosPago() {
              return plazosPago;
          * @param plazosPago The plazosPago to set.
         public void setPlazosPago(List plazosPago) {
              this.plazosPago = plazosPago;
          * @return Returns the programa.
         public co.com.unionsoluciones.sofia.cartera.model.bo.Programa getPrograma() {
              return programa;
          * @param programa The programa to set.
         public void setPrograma(
                   co.com.unionsoluciones.sofia.cartera.model.bo.Programa programa) {
              this.programa = programa;
          * @return Returns the programas.
         public List getProgramas() {
              return programas;
          * @param programas The programas to set.
         public void setProgramas(List programas) {
              this.programas = programas;
          * @return Returns the sectorEmpresa.
         public co.com.unionsoluciones.sofia.cartera.model.bo.SectorEmpresa getSectorEmpresa() {
              return sectorEmpresa;
          * @param sectorEmpresa The sectorEmpresa to set.
         public void setSectorEmpresa(
                   co.com.unionsoluciones.sofia.cartera.model.bo.SectorEmpresa sectorEmpresa) {
              this.sectorEmpresa = sectorEmpresa;
          * @return Returns the sectoresEmpresas.
         public List getSectoresEmpresas() {
              return sectoresEmpresas;
          * @param sectoresEmpresas The sectoresEmpresas to set.
         public void setSectoresEmpresas(List sectoresEmpresas) {
              this.sectoresEmpresas = sectoresEmpresas;
          * @return Returns the tipoGarantia.
         public String getTipoGarantia() {
              return tipoGarantia;
          * @param tipoGarantia The tipoGarantia to set.
         public void setTipoGarantia(String tipoGarantia) {
              this.tipoGarantia = tipoGarantia;
          * @return Returns the tiposGarantia.
         public List getTiposGarantia() {
              return tiposGarantia;
          * @param tiposGarantia The tiposGarantia to set.
         public void setTiposGarantia(List tiposGarantia) {
              this.tiposGarantia = tiposGarantia;
          * @return Returns the ubicacionPai.
         public co.com.unionsoluciones.sofia.cartera.model.bo.UbicacionPais getUbicacionPai() {
              return ubicacionPai;
          * @param ubicacionPai The ubicacionPai to set.
         public void setUbicacionPai(
                   co.com.unionsoluciones.sofia.cartera.model.bo.UbicacionPais ubicacionPai) {
              this.ubicacionPai = ubicacionPai;
          * @return Returns the valor.
         public BigDecimal getValor() {
              return valor;
          * @param valor The valor to set.
         public void setValor(BigDecimal valor) {
              this.valor = valor;
          * @return Returns the asesorCreditoPK.
         public String getAsesorCreditoPK() {
              return asesorCreditoPK;
          * @param asesorCreditoPK The asesorCreditoPK to set.
         public void setAsesorCreditoPK(String asesorCreditoPK) {
              this.asesorCreditoPK = asesorCreditoPK;
          * @return Returns the convenioPK.
         public String getConvenioPK() {
              return convenioPK;
          * @param convenioPK The convenioPK to set.
         public void setConvenioPK(String convenioPK) {
              this.convenioPK = convenioPK;
          * @return Returns the destinoCreditoPK.
         public String getDestinoCreditoPK() {
              return destinoCreditoPK;
          * @param destinoCreditoPK The destinoCreditoPK to set.
         public void setDestinoCreditoPK(String destinoCreditoPK) {
              this.destinoCreditoPK = destinoCreditoPK;
          * @return Returns the etniaPK.
         public String getEtniaPK() {
              return etniaPK;
          * @param etniaPK The etniaPK to set.
         public void setEtniaPK(String etniaPK) {
              this.etniaPK = etniaPK;
          * @return Returns the lineaCreditoPK.
         public String getLineaCreditoPK() {
              return lineaCreditoPK;
          * @param lineaCreditoPK The lineaCreditoPK to set.
         public void setLineaCreditoPK(String lineaCreditoPK) {
              this.lineaCreditoPK = lineaCreditoPK;
          * @return Returns the modalidadCreditoPK.
         public String getModalidadCreditoPK() {
              return modalidadCreditoPK;
          * @param modalidadCreditoPK The modalidadCreditoPK to set.
         public void setModalidadCreditoPK(String modalidadCreditoPK) {
              this.modalidadCreditoPK = modalidadCreditoPK;
          * @return Returns the monedaPK.
         public String getMonedaPK() {
              return monedaPK;
          * @param monedaPK The monedaPK to set.
         public void setMonedaPK(String monedaPK) {
              this.monedaPK = monedaPK;
          * @return Returns the oficinaPK.
         public String getOficinaPK() {
              return oficinaPK;
          * @param oficinaPK The oficinaPK to set.
         public void setOficinaPK(String oficinaPK) {
              System.out.println(" ==>> setOficinaPK(String oficinaPK): "+oficinaPK);
              this.oficinaPK = oficinaPK;
          * @return Returns the plazoSolicitudPK.
         public String getPlazoSolicitudPK() {
              return plazoSolicitudPK;
          * @param plazoSolicitudPK The plazoSolicitudPK to set.
         public void setPlazoSolicitudPK(String plazoSolicitudPK) {
              this.plazoSolicitudPK = plazoSolicitudPK;
          * @return Returns the programaPK.
         public String getProgramaPK() {
              return programaPK;
          * @param programaPK The programaPK to set.
         public void setProgramaPK(String programaPK) {
              this.programaPK = programaPK;
          * @return Returns the sectorEmpresaPK.
         public String getSectorEmpresaPK() {
              return sectorEmpresaPK;
          * @param sectorEmpresaPK The sectorEmpresaPK to set.
         public void setSectorEmpresaPK(String sectorEmpresaPK) {
              this.sectorEmpresaPK = sectorEmpresaPK;
          * @return Returns the ubicacionPaiPK.
         public String getUbicacionPaiPK() {
              return ubicacionPaiPK;
          * @param ubicacionPaiPK The ubicacionPaiPK to set.
         public void setUbicacionPaiPK(String ubicacionPaiPK) {
              this.ubicacionPaiPK = ubicacionPaiPK;
    }

  • Can I reference page-flow bean from a bounded-task-flow page-fragment?

    I have a view activity implemented as page fragment in my bounded task flow.
    I declare a page-flow scope managed-bean in adfc-config.xml to do some initialization for the bounded-task-flow:
    <managed-bean id="__23">
    <managed-bean-name id="__22">TaskFlowBean</managed-bean-name>
    <managed-bean-class id="__21">view.backing.TaskFlowBackingBean</managed-bean-class>
    <managed-bean-scope id="__20">pageFlow</managed-bean-scope>
    </managed-bean>
    In my bounded task flow, the default activity is a method-call activity which call the page-flow bean method
    <method-call id="initFlow">
    <method>#{pageFlowScope.TaskFlowBean.initFlow}</method>
    <outcome id="__27">
    <fixed-outcome>showPanel</fixed-outcome>
    </outcome>
    </method-call>
    But JDeveloper (11.1.1.2) show a warning "Refereneed pageFlowScope not found" at the "Diagram" view of the flow definition.
    The fixed outcome of the default activity is to render a page-fragment which also reference the page-flow scope bean method getPanelTitle():
    <af:panelBox text="#{pageFlowScope.TaskFlowBean.panelTitle}" id="pb1">
    <f:facet name="toolbar"/>
    </af:panelBox>
    At runtime, the page fragment was rendered properly except the panel box title is missing. No other error is reported
    When I debugged the application, the bean methods initFlow() and getPanelTitle() didn't get call as the program didn't stop at the breakpoint set in the bean methods.
    The page fragment was rendered properly except the panel box title is missing.
    When I change the scope to backing bean, both initFlow() and getPanelTitle() get called but under a different backing bean.
    As the bean attributes set by initFlow() were not no longer set when getPanelTitle() was invoked even though the methods were invoked in the correct order.
    Why can't I use a page-flow scope bean within the bounded task flow?
    On further debugging, I noticed the bean was not created when it is set to be page-flow scope. I put a debug message in the constructor... never get called.
    When should a page-flow scope bean be created to be accessible on entry to a bounded task flow?
    Edited by: Pricilla on Apr 29, 2010 3:16 PM

    Please check the scope of the pageFlow from the manual.
    pageFlowScope is only available for the pages/views in that taskflow and not in the included taskflows.

  • Do I have to use lookup() to get a reference of remote object?

    Hello,
    I appreciate the help from you guys in advance. My question is, do I have to use lookup() to get the reference to a remote object? Right now I want to pass the remote object itself which can be serialized via stream. I am not sure if this way works.
    Cheers!
    Steve

    some part code:
    client:
    lookup=UC_LookUp.StkTakeListingHdrLookup().getStkTake(usrInfo,tfStkTakeListNo.getText());
    UC_LookUp
    public static basewms.uc.interfaces.UC_ISCSStkTakeListingHdr_Remote StkTakeListingHdrLookup()
          if (look_up==null) look_up= new UC_LookUp();
          if(stktakelistinghdr == null)
          stktakelistinghdr = look_up.startLookUp("UCStkTakeListingHdr","192.168.10.98", 7000);
          while (stktakelistinghdr==null)
               try { Thread.sleep(1000); }catch(InterruptedException e) {}
          return (basewms.uc.interfaces.UC_ISCSStkTakeListingHdr_Remote)look_up.getRemote(stktakelistinghdr);

  • Create a report in a popup (validation needed in back bean before popup)

    Hi all,
    I am very new to JDev and ADF, I am struggling to generate a report in a popup through the back bean, some validation is needed in the back bean before the popup. When creating the popup window, the url of the popup will be the URL of a servlet I searched the forum and found 2 approaches:
    http://thepeninsulasedge.com/frank_nimphius/2007/09/11/adf-faces-showing-reports/
    can af:showPopupBehavior work together with action- or launchListener? (approach by Julian Stephen)
    But I have a few questions for these approaches:
    for first approach:
    is “documentURL” in the commandButton_action() the url for the my report servlet,
    another thing is that, in this commandButton_action(), it said: return "dialog:open"; But I couldn’t find anywhere in the content that shows dialog, open are component ids? Or I am misunderstood it?
    for the second approach:
    where is the url for my report servlet put? Is it in the "hints" in the function “popup.show(hints)”?
    I can try the second approach first, but for the first approach I really want to know what is the "return dialogLopen" about?
    If there are any other means, please let me know!
    Your help is highly appreciated!
    Shawn

    My bad, in the first approach, "dialog:open" is the action string not component ids.

  • JSV-Validation discards some backing bean properties

    Hi guys,
    I'm facing a curious problem occuring in my jsf-application. I have a userlist on my page. Every user can be edited (change password, etc) or a new user can be created. When I click the "edit-user"-button, a new page is opened where I can change different properties of this user. When I submit the form, the jsf-validation is beeing called (because I set some properties to attribute "required"). When an error occurs, the action-command returns null and goes back to the page. But not all properties of my backing bean arent set! It seems, that only the properties beeing set to attribute "required" are saved... How can I fix this?
    My jspx-page that creates/updates a user looks like that:
    <h:form>
         <h:inputHidden value="#{userFormBean.userID}" />
         <h:panelGrid border="0" columns="2" style="margin-bottom:15px;">
              <h:outputLabel value="#{msg['ui.user.create.lastname.label']}:" />
              <h:inputText value="#{userFormBean.name}"
                              required="true"
                              label="#{msg['ui.user.create.lastname.label']}" />
              <h:outputLabel value="#{msg['ui.user.create.firstname.label']}:" />
              <h:inputText value="#{userFormBean.firstname}"
                              required="true"
                              label="#{msg['ui.user.create.firstname.label']}" />
              <!-- more properties... -->
         </h:panelGrid>
         <c:if test="#{userFormBean.state == applicationScope.constants.STATE_NEW}">     
              <h:commandButton action="#{userFormBean.createUser}" value="#{msg['ui.user.create.button']}">
                   <f:setPropertyActionListener value="#{applicationScope.constants.STATE_NEW}" target="#{userFormBean.state}"/>
              </h:commandButton>
         </c:if>
         <c:if test="#{userFormBean.state == applicationScope.constants.STATE_UPDATE}">
              <h:commandButton action="#{userFormBean.updateUser}" value="#{msg['ui.user.update.button']}">
                   <f:setPropertyActionListener value="#{applicationScope.constants.STATE_UPDATE}" target="#{userFormBean.state}"/>
              </h:commandButton>
         </c:if>          
    </h:form>     This is my backing bean that does all the logic...
    public String updateUser(){
         try{
              // do some business-logic
         }catch (Exception ex){
              // set error message and return to form
              FacesContext ctx = FacesContext.getCurrentInstance();
              // provide some error-msgs
              return null;
         return "success";
    }I need to save all the properties on my backing bean, especially my "state"-property that decides whether I create a new user or update a given user identified by its id...

    To start, do not mix JSF with JSTL this way. Remove all of those c:if tags and use the JSF 'rendered' attribute instead.
    E.g.
         <c:if test="#{userFormBean.state == applicationScope.constants.STATE_NEW}">     
              <h:commandButton action="#{userFormBean.createUser}" value="#{msg['ui.user.create.button']}">
                   <f:setPropertyActionListener value="#{applicationScope.constants.STATE_NEW}" target="#{userFormBean.state}"/>
              </h:commandButton>
         </c:if>should be
         <h:commandButton action="#{userFormBean.createUser}" value="#{msg['ui.user.create.button']}" rendered="#{userFormBean.state == applicationScope.constants.STATE_NEW}">
              <f:setPropertyActionListener value="#{applicationScope.constants.STATE_NEW}" target="#{userFormBean.state}"/>
         </h:commandButton>Back to your actual problem: I cannot correlate your problem description to the given code snippet. Which non-set values are you talking about?

  • Complex "validation rule" using Java Bean code

    Hi,
    I have never used validation rules with jdeveloper, but i need a complex validation rule of one column of my table.
    Can i put a "validation rule" on an attibute of a view object, or on a column of a table, that use Bean code ?
    My column must contain different values depending of the other columns of the table, so i think i can't do this without java code...
    I tried to doubleClick on the column to create a validator, but I have put a "Print" inside, and seen that it is executes lots of times, but I want to execute the validation only when the value of the column change !
    How can I do this ? What do i need to use ?
    Regards,
    Trigger

    I have use John's solution, it works well !
    Sorry vinod_t_krishnan i am good with java but i don't know how to use well EL Expressions so I did not try your method...
    The code if so is interested...
        public boolean validateOvpdOvprCode(String ovpdovprcode) {
            RowIterator ovRubrique = this.getOvRubrique();
            RowIterator ovRubriqueType = this.getOvRubriqueType();
            String modifiable = (String)ovRubriqueType.getRowAtRangeIndex(0).getAttribute("OvrtModifiable");
            String majuscule = (String)ovRubrique.getRowAtRangeIndex(0).getAttribute("OvruMajuscule");
            String type = (String)ovRubrique.getRowAtRangeIndex(0).getAttribute("OvruTypeDonnee");
            BigDecimal repMin = (BigDecimal)ovRubrique.getRowAtRangeIndex(0).getAttribute("OvruRepMini");
            BigDecimal repMax = (BigDecimal)ovRubrique.getRowAtRangeIndex(0).getAttribute("OvruRepMaxi");
            modifiable = modifiable.toUpperCase();
            majuscule = majuscule.toUpperCase();
            type = type.toUpperCase();
            BigDecimal ovprBD = null;
            if (modifiable.equals("N")) {
                errorMessage = "Ce champ n'est pas modifiable ! Actualisez la page pour réinitialiser sa valeur !";
                return false;
            } else {
                if (ovpdovprcode == null)
                    return true;
                if (type.equals("N")) {
                    float ovprInt = 0;
                    try {
                        ovprInt = Float.parseFloat(ovpdovprcode);
                        ovprBD = new BigDecimal(ovprInt);
                    } catch (Exception e) {
                        errorMessage =
                                "Ce champ est de type numérique, il ne doit contenir que des chiffres et un 'point'";
                        return false;
                    if(repMin != null && repMax != null)
                        if(ovprBD.compareTo(repMin) == -1 || ovprBD.compareTo(repMax) == 1) {
                            System.out.println("4");
                            errorMessage = "La réponse doit être comprise entre " + repMin + " et " + repMax + ".";
                            return false;
                if (majuscule.equals("O"))
                    if (!ovpdovprcode.equals(ovpdovprcode.toUpperCase())) {
                        errorMessage = "Ce champ doit comporter uniquement des majuscules";
                        return false;
                return true;
        }

Maybe you are looking for

  • Everytime I open Safari or Mail, they crash at launch and return me to the Springboard. Anyone know how to help?

    I uninstalled "Rocky Racoon" in Cydia so that I could unjailbreak my iPod Touch, since it was slow and kept freezing. It runs fine, since I deleted all of the packages I installed myself first (to make sure there was no permanent damage). The only pr

  • PO header Status tab details

    Hi All, in the purchase order header you find a tab status. This has values like Not Delivered, Partially Delivered and Full Delivered. I wonder how this status is set. Is it determined all the time you enter the transaction or is it stored in a data

  • Report Painter:  Rearranging of Characteristics

    Hello Everyone, Could anyone help me out in rearranging characteristic in Report Painter. As per clients requirement the report should split values of Cost Center into Activity Type and then Cost Components. However, I am getting report in Reverse wa

  • How to synchronize with Media GO WIRELESSLY

    Well, the title said it all. When it comes to adding a new song to play phone's playlist, I'm really tire of the lengthy process of plugging in, waiting 5 mins just for the computer to recognize the phone and another 10 mins to sync. It would be very

  • Repository 6i to oracle 8i problem.

    Hi I have a linux redhat 7.2 machine running oracle 8i as a server. I installed designer 6i on a windows 2000 machine. I am able to connect to the database locally on the linux server or on the the windows 2000. I checked and the repository owner has