ApplicationModuleTag - How to use custom ApplicationPool

Hi,
The document written by Mr.Juan sometime back on "USER LEVEL SECURITY" focuses more on Data Web Beans. Now we are trying to create an application using datatags. We want to use database usernames for authentication. I added my custom pool (MyApplicationPool) to the bc4j.xcfg. How should I make my ApplicationModuleTag talk to the custom pool class. I am really stuck on this issue. If Mr.Juan can post an HOW TO on this topic, it will be really helpful. I really need help from Oracle Development Team on this topic. All your help is greatly appreciated.
Thanks
Virinchi

We found a solution to the problem. Let me explain my project structure:
1. Total 5 project folders created in Jdeveloper, under one workspace
2. One project, we have our businesscomponents (ViewObjects, AppModule, etc)
3. All other projects have JSPs
4. For View Form and Master-Detail forms we are using datawebbeans.
5. For Edit and Submit edit, we are using datatags.
6. Create two classes called MyApplicationPool and CustomDWB as per the document written by Mr. Juan from JDEV team.
7. Create one property file with the same name as your ApplicationModuleTag ID. For Example (IISmt_BC.IISmt_BCModule.properties). Have a reference to the custom application pool (MyApplicationPool) in this property file using "PoolClassName" as per the document written by Mr. Juan.
8. As soon as the user logs in call the CustomDWB initialize method by passing any viewobject, in the background. This step will create the pool with the name (IISmt_BC.IISmt_BCModule). Modify all your JSP view forms to access the new property file (IISmt_BC.IISmt_BCModule). Now you should be able to access any JSP with this pool.
9. One more important step is to customize the ApplicationModuleTag. I will paste the customized code at the end of this document. In your edit/insert JSPs, use "ApplicationModuleEx" instead of "ApplicationModule". You can put this customized class in any package, but you need to update the "DataTags.tld" to add a new tag called "ApplicationModuleEx".
Customized code for ApplicationModuleTag
========================================
package businesscomponent;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import javax.servlet.jsp.tagext.TagSupport;
import javax.servlet.jsp.JspException;
import java.io.*;
import oracle.jbo.html.jsp.ConnectionInfo;
import oracle.jbo.common.ampool.PoolMgr;
import oracle.jbo.common.ampool.ApplicationPool;
import oracle.jbo.ApplicationModule;
import oracle.jbo.common.*;
import oracle.jbo.*;
import java.util.*;
public class ApplicationModuleTagEx extends TagSupport
String sApplicationName;
String sConfigName;
String sUserName;
String sPassword;
String siiopUserName;
String siiopPassword;
public ApplicationModuleTagEx()
public void setId(String sAppName)
this.sApplicationName = sAppName;
public void setConfigname(String sValue)
this.sConfigName = sValue;
public void setUsername(String sValue)
this.sUserName = sValue;
public void setPassword(String sValue)
this.sPassword = sValue;
public void setIiop_username(String sValue)
this.siiopUserName = sValue;
public void setIiop_password(String sValue)
this.siiopPassword = sValue;
* doEndTag
* @return int
* @exception javax.servlet.jsp.JspException
public int doEndTag() throws JspException
try
PoolMgr poolManager = PoolMgr.getInstance();
MyApplicationPool pool = null;
if(!poolManager.isPoolCreated(sApplicationName))
// we don't need any code here as pool is already existing in our case.
// Get an application module resource.
oracle.jbo.html.jsp.JSPApplicationRegistry appRegistry =
oracle.jbo.html.jsp.JSPApplicationRegistry.getInstance();
// this step will access the custom pool from the property file
// sApplicationName in my case is IISmt_BC.IISmt_BCModule
appRegistry.registerApplicationFromPropertyFile(sApplicationName);
// get an instance of the pool, which is already existing
pool = (MyApplicationPool)PoolMgr.getInstance().getPool(sApplicationName);
// get an instance of the application module
ApplicationModule am = appRegistry.getAppModuleInstance(sApplicationName, pageContext);
// place default renderers into session, these will not be
// exposed via config file
pageContext.getSession().putValue("oracle_ord_im_OrdImageDomain_Renderer", "oracle.ord.html.OrdBuildURL");
pageContext.getSession().putValue("oracle_ord_im_OrdAudioDomain_Renderer","oracle.ord.html.OrdBuildURL");
pageContext.getSession().putValue("oracle_ord_im_OrdVideoDomain_Renderer","oracle.ord.html.OrdBuildURL");
pageContext.getSession().putValue("oracle_ord_im_OrdVirDomain_Renderer", "oracle.ord.html.OrdBuildURL");
pageContext.getSession().putValue("oracle_ord_im_OrdImageDomain_EditRenderer", "oracle.ord.html.FileUploadField");
pageContext.getSession().putValue("oracle_ord_im_OrdAudioDomain_EditRenderer", "oracle.ord.html.FileUploadField");
pageContext.getSession().putValue("oracle_ord_im_OrdVideoDomain_EditRenderer", "oracle.ord.html.FileUploadField");
pageContext.getSession().putValue("oracle_ord_im_OrdVirDomain_EditRenderer", "oracle.ord.html.FileUploadField");
catch(Exception ex)
StringWriter writer = new StringWriter();
PrintWriter prn = new PrintWriter(writer);
ex.printStackTrace(prn);
prn.flush();
throw new JspException(writer.toString());
return SKIP_BODY;
10. Please note that, the above code is not thoroughly tested, but it works for us. I will let you know if there are any changes to it.
Hope this helps.
Virinchi

Similar Messages

  • How to use custome tag lib in the JSP page?

    How to use custome tag lib in the JSP page?...with JDeveloper

    http://www.oracle.com/webapps/online-help/jdeveloper/10.1.2/state/content/navId.4/navSetId._/vtTopicFile.working_with_jsp_pages%7Cjsp_ptagsregistering~html/

  • How to use custom tag in jsp

    sir
    plz tell me how to use custom tag in jsp.plz describe it.
    i will be thankful to u

    Do you want to use taglibs or develop custom tags? Either way take a look at these:
    http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/JSPTags.html
    http://www.stardeveloper.com/articles/display.html?article=2001081301&page=1
    http://www.onjava.com/pub/a/onjava/2000/12/15/jsp_custom_tags.html
    http://jakarta.apache.org/taglibs/tutorial.html
    http://www.ibm.com/developerworks/edu/j-dw-java-custom-i.html
    http://www.herongyang.com/jsp/tag.html

  • How to use custom control.

    hi all,
        how to use custom controls in screen painter.
    can i add image to my screen  using custom control.
    is there any other way to display image on screen.
    give me some notes about custom control.
    and sample programs to display image and also the use of custom control.
    regards,
    bhaskar.

    hi vinod,
    u can use the class <b>cl_gui_picture</b> to work around with pictures on the screen
    just define a custom control on the screen
    create an object of custom container.
    create another object of cl_gui_picture giving container name as the parent name...
    u can check out the class using the transn se24....
    pls post if additional info is required...
    Regards,
    Vs

  • HOW TO: using custom fonts in native storyboard views from an ANE on iOS

    Hey,
      In our apps, we have embedded storyboards into an ANE, and successfully used those screens in an AIR app, and figured out how to use custom fonts in those views.
      I wrote a quick blog post about it and just thought I'd share it real quick in case it helps someone.
    ANE for iOS with Custom Framework – Using Custom Fonts | khef.co

    Hi WayHsieh,
    >>can I just "install" fonts through Word App? Does Word Apps have enough privilege to install fonts on Windows? Can I just click a button in Word App, and then it will install fonts automatically?<<
    Based on my understanding, it is hard to achieve the goal. Because the app webpage is hosted inside an Internet Explorer control which, in turn, is hosted inside an app runtime process that provides security and performance isolation and it is under
    low-Integrity level.
    Here is the figure for apps for Office runtime environment in Windows-based desktop and tablet clients:
    You can get more detail about Privacy and security from links below:
    Privacy and security for apps for Office
    Hope it is helpful.
    Regards & Fei
    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.

  • How to use customer extension table for schedule line for shopping cart ?

    Dear Experts,
    One of our client wants to have schedule lines in shopping cart item. I am thinking of using customer extension table at item level for shopping cart. Could you please help me on  how I should proceed with the appending the structures so that the end user can fill the shopping cart schedule line details?
    Which fields should I consider in such cases?
    Thanks and regards,
    Ranjan

    Hi.
    I guess you use SRM 7.0. Please go to IMG.
    SRM -> SRM Server -> Cross-Application Basic Settings -> Extensions and Field Control (Personalization) -> Create Table Extensions and Supply with Data
    Regards,
    Masa

  • Question about How to Use Custom CellEditors

    Hi:
    I have been trying to implement something like this: I have a JPanel, and when you double-click a particular spot on it, I want a textbox to appear. Currently, I am implementing it by using an undecorated JDialog that contains a JTextField in it (such that the text field occupies all the space in the dialog, i.e. you can't even tell that there is a dialog). This seems like a hack to me.
    Another alternative that I have been thinking about is using layered panes, and hiding the textfield below the jpanel, and only bringing it to the front when the user double-clicks.
    Then, I stumbled onto custom celleditors. Now, it seems that everyone is using them in JTables, JLists, JComboBoxes, etc. and I was wondering if it is something that I can use with a JPanel.
    Can anyone comment on the implementations I am considering, as well as using custom celleditors with a JPanel?
    Thanks in advance,
    LordKelvan

    Still don't understand your requirement. Does the text field stay there or disappear after the data is entered? If it disappears, then how do you change the value, do you have to click on the exact same pixel again?
    Maybe you could use a MouseListener and then display a JOptionPane or JDialog to prompt for the information. Or if you want to display a JTextField then add a JTextField to the panel and then when the user enters the data by using the enter key or by clicking elsewhere on the GUI you remove the text field from the panel.

  • How to use custom API's

    Hi All,
    In OIM how can i use my own/Custom API"S. Wher do i need to place the Jar/Class files. Like in other Identity Management tools (I only have the experience of SUN) you can place the files under WEB-INF/lib or WEB-INF/classes and then can easily use them, does OIM provides this/similar kind of functionality and how we can use that.

    Hi,
    If you want to use custom API to create adapter then put the jar file in <OIM_Install>/xellerate/Java Task/
    folder and if you want to use them to create task Schedular then put it in <OIM_Install>/xellerate/Schedular/
    regards

  • How to use Custom Search in Dynamic Page or HTML Portlet ?

    Gurus,
    1. I have a tab called My Space in the portal web site, where user gets a personalized view of the content.
    2. I am using custom attributes and custom item types. I have a custom attribute called 'Location', which is a attribute of custom item types.
    3. I have 2 pages - News and Events.
    4. All the content in News and Events page is tagged by the attribute 'Location'.
    5. The requirement is to let the user search the News and Events by Location.
    6. To achieve this I used the Custom Search portlet and the user can select the attribute Location and see the resultant News and Event items by location in the Search portlet.
    7. The requirement is to present the News items and Event items in separate regions on the page and show only the first 5 News and Event items in the result and show a More link which would guide the user to rest of the News and Event items.
    8. Eventually there may be more content other than News and Events tagged by location. If so, the requirement is to create a new region and display the new content.
    9. How would I do this using custom search ? I was thinking if there is anyway I could use the custom search api (where can i find it ?) in the HTML portlet or Dynamic page and submit the result to IFRAMES in each region and show the output ?
    Pls advise.
    Thanx a bunch.

    I would suggest that you use two custom search portlets; one for the news items and one for the events items. Switch the custom search portlets to "AutoQuery" mode and add the relevant criteria. On the results display tab of the the "edit defaults" screen, choose to show just 5 items.
    To add a link to show the user mode results, I'd create two new pages that have just a single custom search portlet on it that is customised to show more of the results and maybe has the pagination links enabled.
    Then I'd add two "Page Link" items underneath the two news and events portlets on the first page in an item region.
    I'm sure there are other ways of doing this as well. Hope that helps to get you started.

  • How to use custom control in Dialog Programming?

    How can I call a subscreen using custom control in Dialog Programming?
    The required subscreen contains a calender. Any class or something available for this purpose. Please suggest.

    As [vinraaj|http://forums.sdn.sap.com/profile.jspa?userID=3968041] wrote, call transaction SE51, there is a Wizard to help you generate the table control, it will create the table control and some includes with PBO/PAI modules > Read [Using the Table Control Wizard|http://help.sap.com/saphelp_bw/helpdata/en/6d/150d67da1011d3963800a0c94260a5/frameset.htm]
    Also there is a tutorial in the wiki, read [Learn Making First Table Control |http://wiki.sdn.sap.com/wiki/display/ABAP/LearnMakingFirstTableControl] by [Krishna Chauhan|http://wiki.sdn.sap.com/wiki/display/~nc0euof]
    Regards,
    Raymond

  • How to use customized exception

    Hi all,
    I have a problem using struts-action-mappings.
    I have a method for update in my app module, and i'm using that method with data action.
    In that method, I have to throw my customized exception to user if there is error. I just don't know how to catch the exception and display it in page.
    I've read about struts page flow diagram elements and know there are Exceptions and Global Exceptions. But i still don't know how to use them.
    What i want to know is can I relate my custom exception with Exceptions/Global Exceptions in struts diagram? And if so, can anybody show me an example for it?
    Thanks

    1.Create a method GET_ACTORS using RH_GET_ACTORS,
    2.Create a container element 'Actors' type string with multiline.
    3.Create Task, where you can call the Method GET_ACTORS  and pass the Container values of 'Actors' from Method->Task->Workflow
    4.Create a Step type before creating the Step mail and include the previous Task.
    5.Now you can create the step Mail. Give the Recipient Type as 'Expression'-> Select the Container Element 'Actors' from WF container
    But remember the values should be Passed from the task to Workflow in Binding correctly.
    Regards,
    Sriyash

  • How to use customized rule in step mail workflow

    Dear All:
    I have created a customized rule,which is working fine when I simulate it, it is fetching SAP user from a ztable which I created.
    My requirement is how to use the rule in my workflow which have one "send mail" step. As in "send mail" under Receipt Type I cant find rule option.
    Kindly help me.
    Rahul.

    1.Create a method GET_ACTORS using RH_GET_ACTORS,
    2.Create a container element 'Actors' type string with multiline.
    3.Create Task, where you can call the Method GET_ACTORS  and pass the Container values of 'Actors' from Method->Task->Workflow
    4.Create a Step type before creating the Step mail and include the previous Task.
    5.Now you can create the step Mail. Give the Recipient Type as 'Expression'-> Select the Container Element 'Actors' from WF container
    But remember the values should be Passed from the task to Workflow in Binding correctly.
    Regards,
    Sriyash

  • Any one know how to use "custom" option present under the data access tab in XLS file format of Data Services

    Hi Experts,
            Any one know how to use or what is the purpose of "custom" option present under the data access tab in Excel workbook file format of Data Services
    Thanks in Advance,
    Rajesh.

    Rajesh, what is the Custom Protocol you are trying to use? It should be  something like PSFTP, etc.,
    Cheers
    Ganesh Sampath

  • How to use custom calendar for scheduling other than owb's default calendar

    Hi All,
    Can anyone please tell me, is there any possibility of using a custom calendar in place of owb default calendar calendar during scheduling. Because, in my case, the month start date and end date are not 1st and 31st that changes according to the financial calendar that is defined.
    I want to schedule mappings on month end date of financial calendar. How can this be done?
    Thanks in advance
    Joshna

    Hi,
    The only possibility is to configure more than one schedule using the complex by month, by_ configuration. I don't know if this will work for you. Or you must use another job control system.
    Can u just brief how to use it. Any other possible way of achieving my task?
    Thanks
    Joshna

  • How to use custom pipeline dlls in Biztalk Projects so that they appear in the send/receive pipeline configuration after deployment?

    I have a existing Biztalk application that uses custom pipelines for receiving excel files. I have the dll of that custom pipeline. Now i created another BT application that needs to use that same custom pipeline. But after i deploy the application in
    Biztalk, i can't see the  pipeline available in Receive pipeline configuration combo box during configuration. I have referenced the custom pipeline dll in my project before deploying, but that doesn't help. I also copied the dll in the C:\Program Files
    (x86)\Microsoft BizTalk Server 2010\Pipeline Components folder and C:\Program Files (x86)\Microsoft BizTalk Server 2010 folder, but that doesn't make the pipelines appear during configuration too.
    Can anyone give any idea on how can i use these custom pipeline dlls in project so that they appear in configuration after deployment?

    If you plan on using the deployed pipeline across multiple applications in BizTalk, the BizTalk Application (using the BizTalk Server Administration Console) should have the other application [where the pipeline is deployed] as reference.
    For e.g.: Custom Pipeline (myCustomPipeline) part of a BizTalk Project (dll - myCustomProject.dll) deployed under Application [Some Application] also to be used in another BizTalk Application [Some Other Applicaiton] then using BizTalk Server Administartor
    right click the "Some Other Application" and select "Properties"
    on the "Properties" page, left hand side, select "References"
    on the right-hand side, use "Add" to add the "Some Project" as a reference.
    Doing so will ensure that ALL resources (maps, schemas, orchestrations, send ports, receive locations, rules, etc.) deployed for "Some Application" are available/referensible in "Some Other Application".
    Regards.

Maybe you are looking for

  • Managing a large library across multiple external HDDs (advice needed)

    Here's the rundown. I have an extensive media library, and I've found that satisfying my storage, editing, and convenience needs at the same time is difficult. Setup: Mac Mini - 120GB Mini Stack - Partitioned 500GB (120 backing up main drive, 380 for

  • SPM 5.2 - problem with reason/activity fields - not showing in the report

    Dear experts, I have a situation that is hard to describe. We have SPM 5.2 - all set and working, now the problem is that for some of the FF sessions the tool is either not reporting the reason/activity fields (due to some technical problem that is o

  • How do I force cellular data while on Wi-Fi

         Here is my problem:  I want to run airplay from my iphone to a stereo in my garage that is under my house.  I bought an airport express and put it in my garage and ran a 3.5 mm jack from it to my stereo.  The problem is the range on the airport

  • Termination does not appear as fail sequence

    Hi, I have I a subsequence than include some Action type step.  The step set a local variable.  Based on that variable I decide whether to continue or to terminate. In the event of termination, the process is indeed terminated, but when I look at the

  • Partitioning For Optimal Parallel Query Execution

    Hi All, We are trying to design an architecture that benefits from partitioning and parallel query to obtain the best query response times for our system. Let me start by describing the main table which has five columns: Columns: 1) DocId ------- Num