Create empty blob inside create method of entity object

I would like to create an empty blob with this method:
BlobDomain.createEmptyBLOB(java.lang.Object context)
context - an internal framework context.
The problem I've got it is to figure out what is the framework context and how to get one.
thanks

John,
I did not try with af:popup. But I did try with custom error handler and it worked as if I thought.
To help others I am explaining the steps below:
1. Create the custom error handler(MyErrorHandler.java) class by extending it from oracle.adf.model.binding.DCErrorHandlerImpl. Make sure that your java class contains a no argument constructor.
2. Override reportException() method by sending the arguments to super.report exception()
3. write code to call javascript through Extended Render Service Kit.
4. Open DataBindings.cpx and its property inspector
5. Select the root node of DataBindings.cpx and add your custom error handler class (MyErrorHandler.java) to the attribute "ErrorHandlerClass"
6. Run your code.
Voila!!! It runs great!!!
For more information, check http://docs.oracle.com/cd/E24382_01/web.1112/e16182/validation_model.htm
V. Praveen

Similar Messages

  • Exception when invoking create method on entity ejb's home object

    I have a simple entity bean. I am able to get the reference to the entity's home object. But when I run create method on entity's home interface, I get the following exception. The create method takes no arguments as the primary key is Auto-Increment field in MYSQL database. Here is the exception. I am using jdeveloper and embedded OC4J as server.
    07/06/22 15:51:15 java.lang.NullPointerException
    07/06/22 15:51:15 at EmployeeHome_EntityHomeWrapper2.create(EmployeeHome_EntityHomeWrapper2.java:1168)
    07/06/22 15:51:15 at com.pd.EmpAddInput.addEmployee(EmpAddInput.java:64)
    07/06/22 15:51:15 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    07/06/22 15:51:15 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    07/06/22 15:51:15 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    07/06/22 15:51:15 at java.lang.reflect.Method.invoke(Method.java:585)
    07/06/22 15:51:15 at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:146)
    07/06/22 15:51:15 at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:92)
    07/06/22 15:51:15 at javax.faces.component.UICommand.broadcast(UICommand.java:332)
    07/06/22 15:51:15 at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:287)
    07/06/22 15:51:15 at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:401)
    07/06/22 15:51:15 at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:95)
    07/06/22 15:51:15 at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:268)
    07/06/22 15:51:15 at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:110)
    07/06/22 15:51:15 at javax.faces.webapp.FacesServlet.service(FacesServlet.java:213)
    07/06/22 15:51:15 at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:712)
    07/06/22 15:51:15 at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:369)
    07/06/22 15:51:15 at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:865)
    07/06/22 15:51:15 at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:447)
    07/06/22 15:51:15 at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:215)
    07/06/22 15:51:15 at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:117)
    07/06/22 15:51:15 at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:110)
    07/06/22 15:51:15 at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
    07/06/22 15:51:15 at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
    07/06/22 15:51:15 at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
    07/06/22 15:51:15 at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
    07/06/22 15:51:15 at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
    07/06/22 15:51:15 at java.lang.Thread.run(Thread.java:595)
    What may be causing this exception.

    I have solved the problem. It had to do with the autocommit=true feature of the MYSQL connection. However I have ran into another trouble. I am getting the following exception.
    java.lang.IllegalStateException: Can not call getPrimaryKey() inside ejbCreate(...) methods, the entity does not have an identity yet, see the EJB 2.0 specification chapter 10.5.4
         at com.evermind.server.ejb.EJBUtils.throwGetPrimaryKeyInEJBCreateException(EJBUtils.java:892)
         at EmployeeRemote_EntityBeanWrapper0.getPrimaryKey(EmployeeRemote_EntityBeanWrapper0.java:1686)
         at EmployeeHome_EntityHomeWrapper2.create(EmployeeHome_EntityHomeWrapper2.java:1055)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.evermind.server.rmi.RmiMethodCall.run(RmiMethodCall.java:53)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    java.lang.IllegalStateException: Can not call getPrimaryKey() inside ejbCreate(...) methods, the entity does not have an identity yet, see the EJB 2.0 specification chapter 10.5.4
         at com.evermind.server.rmi.RMICall.EXCEPTION_ORIGINATES_FROM_THE_REMOTE_SERVER(RMICall.java:109)
         at com.evermind.server.rmi.RMICall.throwRecordedException(RMICall.java:125)
         at com.evermind.server.rmi.RMIClientConnection.obtainRemoteMethodResponse(RMIClientConnection.java:517)
         at com.evermind.server.rmi.RMIClientConnection.invokeMethod(RMIClientConnection.java:461)
         at com.evermind.server.rmi.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:63)
         at com.evermind.server.rmi.RecoverableRemoteInvocationHandler.invoke(RecoverableRemoteInvocationHandler.java:28)
         at __Proxy0.create(Unknown Source)
         at com.pd.model.EmployeeRemoteClient.main(EmployeeRemoteClient.java:37)
    I am not calling getPrimaryKey() in ejbCreate() then why this exception

  • How to call Apps Module Custom Method from Entity Object / View Object ?

    Hi All,
    I create a custom method in AppsModuleImpl.java. How can I call that custom method from a setter method on Entity Object / View Object ?
    (I have tried to use Configuration.createRootApplicationModule(amDef,config); but it is not the correct way, is it? )
    Below is my code :
    The setter on MyEntityImpl.java :
    public void setKodeprd(String value) {
    setAttributeInternal(KODEPRD, value);
    if (getProduct() != null) {
    // CALL the getSalesPrice custom method from here, HOW ??
    The Application Module custom method :
    public Number getSalesPrice(String priceCode, String kodePrd) {
    Number price = new Number(0);
    String [] theKey = {priceCode, kodePrd};
    Key priceKey = new Key(theKey) ;
    ViewObject SalesPrice = getSalespricedView1();
    Row[] salesPriceRow = SalesPrice.findByKey(priceKey, 1);
    price = ((SalespricedViewRowImpl)salesPriceRow[0]).getPrice();
    SalesPrice.remove();
    return price;
    Thank you for your help,
    xtanto

    inside the EntityObjectImpl :
    YourAppModuleImpl am = (YourAppModuleImpl)getDBTransaction().getRootApplicationModule().findApplicationModule("YourAppModuleorServiceName");

  • Multiple create methods of entity beans in single transcation

    Hi,
    I have some entity beans with CMR. I am managing these entity beans with a Stateful session bean whose transaction type is Container Managed for all its methods.
    In one particular method of this Session bean I am calling two entity bean's create method. i.e I am creating two entity beans through home.create() methods. There are two home.create() methods one after another inside a try catch block.
    I want that the entire operation be under just one transcation so i have also given the transaction attribute as Required for all methods of Session bean and Entity Beans.
    However if i pass invalid parameters to second create method so that it generates exception then still the first create statement is successful and database is updated.
    what i want is that the first create also should be roll backed.
    How can i acheive this through Container Managed Transaction Session Bean?

    Hi Ashwini,
    "Ashwini" <[email protected]> wrote in message news:400291af$[email protected]..
    I have some entity beans with CMR. I am managing these entity beans with a Stateful session bean whose transactiontype is Container Managed for all its methods.
    >
    In one particular method of this Session bean I am calling two entity bean's create method. i.e I am creatingtwo entity beans through home.create() methods. There are two home.create() methods one after another inside a try catch
    block.
    >
    I want that the entire operation be under just one transcation so i have also given the transaction attribute asRequired for all methods of Session bean and Entity Beans.
    >
    However if i pass invalid parameters to second create method so that it generates exception then still the firstcreate statement is successful and database is updated.
    what i want is that the first create also should be roll backed.
    How can i acheive this through Container Managed Transaction Session Bean?o Do you use TXDatasource with your entity beans?
    o In CMT transactions are automatically rolled back only when RuntimeExceptions
    are thrown. What kind of exception is thrown in your case?
    Regards,
    Slava Imeshev

  • Error Extending the OAEntityImpl class when creating a BC4J  Entity Object

    I have created an EO based on an Oracle Apps table and extended the OAEntityDefImpl, OAEntityCache and OAEntityImpl classes as specified in the OA Framework Developers Guide when creating EO's via the BC4J wizard.
    When I build my Business Components package I recive an error stating that the Impl class should be declared abstract.
    Error(14,8): class oracle.apps.xxtpc.arinvoices.schema.TpcApInvoicesEO2Impl should be declared abstract; it does not define method setLastUpdateLogin(oracle.jbo.domain.Number) in class oracle.apps.fnd.framework.server.OAEntityImpl
    When I modify this class to declare it abstract and then try to test (via the AM test function) the VO that I created based on this EO - I receive an oracle.jbo.RowCreateException: JBO-25017.
    Do you think that this has anything to do with modifying the Impl class to make it abstract? I can create another VO against the same table by creating a SQL statement against it and not basing it off of the EO and this VO will run correctly via the AM tester.
    Thanks,
    Chris
    oracle.jbo.RowCreateException: JBO-25017: Error while creating a new entity row for TpcApInvoicesEO.
         at oracle.jbo.server.EntityDefImpl.createBlankInstance(EntityDefImpl.java:1054)
         at oracle.jbo.server.ViewRowImpl.createMissingEntities(ViewRowImpl.java:1532)
         at oracle.jbo.server.ViewRowImpl.init(ViewRowImpl.java:236)
         at oracle.jbo.server.ViewDefImpl.createBlankInstance(ViewDefImpl.java:1050)
         at oracle.jbo.server.ViewDefImpl.createInstanceFromResultSet(ViewDefImpl.java:1007)
         at oracle.jbo.server.ViewObjectImpl.createRowFromResultSet(ViewObjectImpl.java:2643)

    The problem was that there were no audit columns in the table that I was querying.

  • How to invoke Application Module method from entity object methods

    Hi,
    We have an existing Application Module which provides some validation logic. We are using OperatingBinding or getting the Application Module instance from the bindings and then invoking the app module methods in the view controller project.
    But in our current scenario, We need to invoke the application module method from the setAttribute method in the entity object when ever an entity attribute value is changed . I believe we can call createRootApplicationModule method to create application module instance. But this may lead to performance overhead.
    Can you please suggest, if there is any alternative to invoke the application module method inside the business components.
    What is the best way to create

    We have a pricing service, which was developed as a separate application. We need to invoke the pricing service with the change in certain attributes of the entity object and update some of the attributes of the current entity object. At present we are handling these calls to the pricing service in the ui layer in the valueChangeListener.
    But we would like to move this service call into setAttribute method as we are unable to prevent the call to the service if the model validations fail. I am looking for the best possible approach for invoking the service calls from the entity objects.
    Thanks and Regards,
    S R Prasad

  • Creating ViewObject from Entity object

    HI,
    Is it possible to modify the query of the view object? And I have created that view object from EntityObject.
    Regards,
    Infy

    Hi Arun,
    Thanks for your reply. My query has union of 8 different queries. I have created Association between them. But while creating view object, I am getting struck in choosing the association & join type. Can I use expert mode? View object is getting displayed. But when I try to insert any rows, it is throwing errors. My JDev version is, 11.1.2.2.0.. Here is the query:
    <SQLQuery><![CDATA[
    Select * from (Select a.Appr_Comment Remarks,
    a.placeholder_seq placeholder_Seq,
    a.Comment_Seq comment_Seq,
    b.Dph_Id Placeholder_Id,
    Decode(b.Format,Null,c.default_value,To_Char(To_Date(c.Default_Value,'DD-MON-YYYY HH24:MI:SS'),b.format)) Value,
    b.label_id label_Id,
    b.version_no version_No,
    a.user_id user_Id,
    0 text_dir,
    'N' is_obsolete,
    'NA' Cph_Format,
    b.tph_placeholder_seq Ph_Version
    From Approver_Comments a,
    Label_Placeholders b,
    Data_Placeholders c
    Where a.Label_Id=b.Label_Id
    And a.Version_No=b.Version_No
    And a.Placeholder_Seq=b.Placeholder_Seq
    And b.Dph_Id=c.Placeholder_Id
    And b.Dph_Id Is Not Null
    Union
    Select a.Appr_Comment Remarks,
    a.placeholder_seq placeholder_Seq,
    a.Comment_Seq comment_Seq,
    b.Vph_Id Placeholder_Id,
    c.Default_Value Value,
    b.label_id label_Id,
    b.version_no version_No,
    a.user_id user_Id,
    0 text_dir,
    'N' is_obsolete,
    'NA' Cph_Format,
    b.tph_placeholder_seq Ph_Version
    From Approver_Comments a,
    Label_Placeholders b,
    Visit_Ph c
    Where a.Label_Id=b.Label_Id
    And a.Version_No=b.Version_No
    And a.Label_Id=c.Label_Id
    And a.Version_No=c.Version_No
    And a.Placeholder_Seq=b.Placeholder_Seq
    And b.Vph_Id=c.Placeholder_Id
    And b.Vph_Id Is Not Null
    Union
    Select a.Appr_Comment Remarks,
    a.placeholder_seq placeholder_Seq,
    a.Comment_Seq comment_Seq,
    b.rtph_id Placeholder_Id,
    c.Default_Value Value,
    b.label_id label_Id,
    b.version_no version_No,
    a.user_id user_Id,
    0 text_dir,
    'N' is_obsolete,
    'NA' Cph_Format,
    b.tph_placeholder_seq Ph_Version
    From Approver_Comments a,
    Label_Placeholders b,
    rtph c
    Where a.Label_Id=b.Label_Id
    And a.Version_No=b.Version_No
    And a.Label_Id=c.Label_Id
    And a.Version_No=c.Version_No
    And a.Placeholder_Seq=b.Placeholder_Seq
    And b.rtph_id=c.Placeholder_Id
    And b.rtph_id Is Not Null
    Union
    Select a.Appr_Comment Remarks,
    a.placeholder_seq placeholder_Seq,
    a.Comment_Seq comment_Seq,
    b.ftph_id Placeholder_Id,
    c.placeholder_data Value,
    b.label_id label_Id,
    b.version_no version_No,
    a.user_id user_Id,
    d.text_direction text_dir,
    'N' is_obsolete,
    'NA' Cph_Format,
    b.tph_placeholder_seq Ph_Version
    From Approver_Comments a,
    Label_Placeholders b,
    freetext_ph c,
    languages d
    Where a.Label_Id=b.Label_Id
    And a.Version_No=b
    .Version_No
    And a.Label_Id=c.Label_Id
    And a.Version_No=c.Version_No
    And a.Placeholder_Seq=b.Placeholder_Seq
    And b.ftph_id=c.Placeholder_Id
    And b.ftph_id Is Not Null
    And b.LANG_CD = d.LANG_CD
    Union
    Select a.Appr_Comment Remarks,
    a.placeholder_seq placeholder_Seq,
    a.Comment_Seq comment_Seq,
    b.tph_id Placeholder_Id,
    c.description Value,
    b.label_id label_Id,
    b.version_no version_No,
    a.user_id user_Id,
    d.text_direction text_dir,
    nvl(c.IS_OBSOLETE,'N') is_obsolete,
    'NA' Cph_Format,
    b.tph_placeholder_seq Ph_Version
    From Approver_Comments a,
    Label_Placeholders b,
    phrase_translation c,
    languages d
    Where a.Label_Id=b.Label_Id
    And a.Version_No=b.Version_No
    And a.Placeholder_Seq=b.Placeholder_Seq
    And b.tph_id=c.Placeholder_Id
    And b.Tph_Placeholder_Seq=c.placeholder_seq
    And b.Lang_Cd=c.Lang_Cd
    And b.tph_id Is Not Null
    And b.LANG_CD = d.LANG_CD
    Union
    Select a.Appr_Comment Remarks,
    a.placeholder_seq placeholder_Seq,
    a.Comment_Seq comment_Seq,
    b.Cph_Id Placeholder_Id,
    LABDB07.Cph_Value(b.Label_Id,b.Version_No,b.Cph_Id) Value,
    b.label_id label_Id,
    b.version_no version_No,
    a.user_id user_Id,
    0 text_dir,
    'N' is_obsolete,
    LABDB07.Cph_Format(b.Label_Id,b.Version_No,b.Cph_Id) Cph_Format,
    b.tph_placeholder_seq Ph_Version
    From Approver_Comments a,
    Label_Placeholders b
    Where a.Label_Id=b.Label_Id
    And a.Version_No=b.Version_No
    And a.Placeholder_Seq=b.Placeholder_Seq
    And b.Cph_Id Is Not Null) order by comment_Seq
    ]]></SQLQuery>

  • Calling database stored  function from Entity Object

    Hi,
    I want to call a database stored function from create() method of Entity Object.
    Database function returns some value.
    Can anybody suggest me some way to do it.

    You can try the following:
    make a String whit your function call, I dont know if this is the correct SQL syntax for a function, it should be for a stored procedure.
    String call = "begin; callyourfunction; end;"
    PreparedStatement ps = getDBTransaction().createPreparedStatement(call,0);
    ps.execute();
    ResultSet rs = ps.getResultSet();
    You can now read the data from the function from the rowset.
    Be sure to cleanup the PreparedStatement when your done whit it to avoid open database connections.
    ps.close();ps=null;

  • Initializing Attributes in create() method

    We're currently using the BC4J framework within the Struts context. I'm trying to initialize non-constant attributes (e.g., current date) in the create(AttributeList) method of an xxxEntityImpl class, but when I try to commit the transaction, it fails.
    I know the problem has to do with the fact that BC4J (within the Struts context, at least) creates an emtpy Entity object when the user selects the "new" link, and uses this entity to populate the entry form, then creates a new entity when the form is posted. (This also causes the wasted sequence value, but we've worked around that issue.) When any attributes are set in the create() method, the first entity is added to the pending transaction because it has changed. However, we only want the second entity (created on form post) in the transaction. Is there any work around for this?
    Any help would be much appreciated.
    Thanks,
    Patrick

    You MUST provide an organizatation name. There is a system entity adapter on the Users data object. You cannot avoid populating this.
    -Kevin

  • Default Image with created Method on HTML Client

    Hi,
    I have an entity called "Users" and I would like to show a default image for the user when New User screen appears.
    Somebody knows how to achieve that on the "created" method of entity for HTML (JavaScript)?
    Thanks in advance!
    Jesús

    HI Helmut,
    When you help secure your application, the final step is to publish it. When you publish for the first time, you must provide authentication information for a default administrator. When you publish again, you don’t have to repeat this step.
    To provide authentication information when you publish an application
    1.  
    In the LightSwitch Publish Application Wizard, choose the Security Settings page, and then choose the Yes, create an Application Administrator option button.
    2.  
    In the User Name text box, enter a username.
    3.  
    If you’re using Windows authentication, you must specify a valid Windows logon name that has the form Domain\Username.
    For this issue, you can also repair your Lightswitch, and check whether it helps fix it.
    For this issue, here are a few suggestions that might help:
    •Clean and Rebuild - Cleaning and rebuilding your current Project (Right-click > Clean, Right-click Rebuild respective) and see if that makes any difference at all. 
    •Consider Restarting Visual Studio - If these issues are still persisting after the above steps, try restarting Visual Studio (and even your local machine
    Please let me know if there is anything that I can do to help.
    Best regards,
    Angie
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Creating Entity Object from Service Interface - JDeveloper version 11.1.1.3

    In our project, we don't intend to have any JDBC connection to a database and want to create all my entity objects using SDO web services deployed in a remote server. I could create an entity object based on a SDO web service deployed in the standalone WL server successfully. But at the time of Development,when I select ADF Business Component --> Entity Object, it always takes to a screen that prompts for a JDBC connection, if you have no connection defined in the project yet. To bypass this, I need to create a valid connection to a local DB and then I can go the next page that prompts me to to choose service interface and asks for a WSDL URL. How do I get around creating a JDBC connection and create a service interface based data source directly?
    To get around this issue, I created a connection to a local DB by providing a wrong password to make sure that we don't need a valid db connection. The application module (Business Component Browser) works fine when the DB connection is broken. But when I create a JSF page and put the data control there, if we don't have the DB connection established it gives error during deployment.I tried deleting the unused connection, but that gives a lot of errors during deployment. My question is;
    1. How can I create a service interface based data source by-passing the requirement for a connection?
    2. If that's not possible - how can I cleanly delete the JDBC connection and all it's dependencies, so that, it deploys and runs without error

    Frank,
    Thanks for your response.
    I have made some progress in last two days and solved some of the original issues. I deleted the fake JDBC connection from connection.xml that I had to use to go to the second screen that lets me select the WSDL for the service interface. After that, I checked off the "Auto Generate and Synchronize ..." option from Application --> Application Properties --> Deployment. (thanks to Steve Muench's blog post on this subject). After that, I could deploy the JSF page and the page shows up with no problem.
    However, when I try to run the App Module that was created from the WSDL (service interface), it brings up a pop-up with heading "Password Required" that says "Enter the password for" and asks for a user name and password (not sure what they are as they take any value and takes me to the next screen). After that, I can open the View and navigate through it. When i change some data and try to commit - it makes the change to the data and stores in the DB but gives an error saying "(oracle.jbo.NotConnectedException) JBO-25200: Application module is not connected to a database."
    Also, the data control created from the service interface had operations called Commit and Rollback. I used the Commit on JSF page and that does the exact same thing too. Any idea?
    Also - when we consume a SDO WSDL to create the entity object - how can we access the SOAP Request and Response objects? We have to implement WS-Security by instrumenting the SOAP header and need to get a handle on that. Is there a mechanism similar to JAX-WS handler framework for SDO?
    R,
    Chandan

  • Managing Entity Object and PL/SQL transactions

    Hi,
    I have requirement to use entity objects and PL/SQL API in the same transaction.
    First the data is created in the entity object and then API is called to do some validations on the data created through entity object.
    I am not able to fetch the rows created by the entity object in the PL/SQL API until I issue a commit before calling the API.
    Can anyone suggest me how to get the data in PL/SQL API which was created by the entity object without commit. As I want to have a commit only after API returns true.
    Thanks in advance

    Override the beforeCommit method of the main entity object of your page.
    The commit will only take place if the PLSQL does not throw any errors.
    See example below:
    public void beforeCommit(oracle.jbo.server.TransactionEvent e) {
    methodToCheckUsingPLSQL();
    super.beforeCommit(e);
    private void methodToCheckUsingPLSQL() {
    try {
    String sql =
    "BEGIN check_my_entity(p_id => :1" +
    ", x_return_status => :2" +
    ", x_return_msg => :3); END;";
    OracleCallableStatement stmt =
    (OracleCallableStatement)getDBTransaction().createCallableStatement(sql,
    DBTransaction.DEFAULT);
    // Rebind parameters
    stmt.setNUMBER(1, getId());
    stmt.registerOutParameter(2, Types.VARCHAR); //x_return_status
    stmt.registerOutParameter(3, Types.VARCHAR); //x_return_msg
    stmt.executeUpdate();
    String returnStatus = stmt.getString(2);
    String returnMsg = stmt.getString(3);
    if (!"SUCCESS".equals(returnStatus)) {
    throw new OAException(returnMsg);
    } catch (Exception e) {
    throw new OAException("Error during methodToCheckUsingPLSQL. " +
    e.getMessage());
    Regards,
    Jeroen Kloosterman

  • Problem with database schema objects in the entity object wizard

    Hi All,
    When creating a new entity object, I am facing a problem with database schema objects in the entity object wizard, database schema objects (check boxes for tables,synonyms...) are disabled. Actually I am using a synonym but I am not able to select the synonym check box.
    Can any of you folks tell me how to enable the database schema objects (check boxes for tables,synonyms...).
    Thanks in Advance.
    Raja.M

    Make sure your using rite version of jdeveloper..
    Make sure your using apps schema and check whether your able perform DML operations in the schema vis sql developer.
    --Prasanna                                                                                                                                                                                                                                                                                                                                                                           

  • Setting permissions at entity object level using JAAS and LDAP

    Hi,
    I am using ldap-based provider for authorizaton. Every thing works fine. Authorization works fine based on the roles created in web.xml file.
    Could you please let me know how I can define permissions at entity object level when using ldap based provider.
    Following line is the permission created for an entity object (SpcStrBdgt) when using XML-based provider.
    <permission>
         <class>oracle.jbo.server.security.jazn.JboJAZNEntityPermission</class>                    <name>model.SpcStrBdgt/READONLY</name>
    </permission>
    Above is defined in jazn-data.xml file.How can I define the same thing when using ldap-based provider?
    Thanks,
    Seatre

    Hi,
    There is an enhancement request Bug2692994 for this feature.
    Thanks,
    Yvonne

  • Garbage collection of objects created inside a method

    I have method and inside the method I create new Objects I mean I instantiate objects using new and call some methods on these objects.
    once the method execution is completed and control goes to caller of the method will all the object created inside the method will be garbage collected ?
    here with code
               public List<StgAuditGeneral> getAudits(
              List<StgAuditGeneral>  audits= new ArrayList<StgAuditGeneral>();
                  for(Map<String, String> result :results ){
                   audits.add(new MapToObject<StgAuditGeneral>() {
                        @Override
                        public StgAuditGeneral getObject() {
                                             StgAuditGeneral  stg= new StgAuditGeneral();
                             return stg;
                   }.getObject());
              }in the above method I cam creating tons of objects wil they be garbage collected immediatedly after jvm leaves the method ?

    user11138293 wrote:
    I have method and inside the method I create new Objects I mean I instantiate objects using new and call some methods on these objects.
    once the method execution is completed and control goes to caller of the method will all the object created inside the method will be garbage collected ?If there are no reachable references, to those objects, then when the method ends, they become eligible for GC. If and when they are actually collected is something we can't know or control, and generally don't care about. The only guarantee is that everything that can be collected will be collected before an OutOfMemoryError is thrown. So from our perspective, once it's eligible for collection, it is effectively collected.
    If you pass references to those objects to something else that holds onto them after the method ends, then they are still reachable, and not eligible for collection.
    However, you almost never need to even think about whether something is eligible for GC or not. It works pretty intuitively.

Maybe you are looking for

  • HP Laserjet P1006 - GUI Print Options Problem

    This printer works fine if I'm just printing with the default settings. However... I want to be able to turn on EconoMode and turn down the Print Density to save on toner. Unfortunately, the driver is giving me one frustrating time. It looks like it

  • I need to move my files from my imac to the cloud to free up my hard drive?

    I have 1gb ram 320gb hard drive thats full what is the easiest way for a person to move files i.e. music, pics ...... to free up my hard drive and possible to expand the ram to 2gb? I'am a novice at computers but want to learn.

  • Wireless headset for transferring

    Has anyone ever heard of a wireless headset that would allow receptionist to transfer calls right from a headset? I assume there's some kind of dialpad that would be attache don a belt. Sounds crazy, but customer says they have that on the old phone

  • Residual Payment ABAP Logic

    Hello Gurus!!!! Do you know how I can obtain the amount of a residual payment in a Z program? For example, a have an invoice of 10,000 USD and I execute a residual payment of 3,600 USD. There is only left 6,400 for payment. How can I obtain the value

  • Need Product key

    I purchased a HP Pailion dv 6516tx notebook. part number GN393PA#ACJ SERIAL: (S)[text removed for privacy] RMN HSTNN-Q33C PACK ID: QCH0114873 BOX ID: H4FN-1MZXG i NEED THE PRODUCT KEY AS I FIND IT DIFFICULT TO USE WORD AND OTHER SOFTWARE. I HAVE TRIE