Intial Context and lookup tunning ?

Doing a inital context and lookup for an EJB for every user in my webapp takes a lot
of time, is there any tunning that can be done,can i get the Home Handle and put
it in Application scope and have subsequent users reuse it ?
Any examples or ideas will be appreciated.
Thanks
Joe

The caveat is you still need to get the initial context per user per request
(but you can cache the home handle.) The reason is that the WLS security
context is allocated on a per-thread basis, and since each request can
be served from different threads, this context needs to be refreshed on
each request.
regards,
-Ade
"Matt" <[email protected]> wrote in message
news:3d29a25c$[email protected]..
>
Look at the ServiceLocator pattern (Sun J2EE pattern catalog on thewebsite). That
should give you everything you need for this.
Matt
"Joe" <[email protected]> wrote:
Doing a inital context and lookup for an EJB for every user in my webapp
takes a lot
of time, is there any tunning that can be done,can i get the Home Handle
and put
it in Application scope and have subsequent users reuse it ?
Any examples or ideas will be appreciated.
Thanks
Joe

Similar Messages

  • InitialContext() and lookup

    Context ctx = new InitialContext();
    URL program= (URL)ctx.lookup("url/program");
    Where does the ctx.lookup search for the "url/program"?
    --My guessing would be from a system file such as abc.xml.  If this is correct,   I have questions about it:
    For IBM RAD, it may setup its system file as resource.xml, while for Oracle JDeveloper, it may set up as application.xml, etc. Now how does the ctx.lookup know where to look up the system file? (I mean, this system file can be different for each IDE manufacturer).
    If my understanding is wrong, what should be the right explanation?
    Thanks
    Scott

    The javadoc of Context and InitialContext explains quite well these things.

  • HT4972 i connect my iphone to my pc and i tunes open automatically,then i press dowload and update but itunes say am not connected to the internet while my pc is connected to the internet what isi the problem?

    i connect my iphone to my pc and i tunes open automatically,then i press dowload and update but itunes say am not connected to the internet while my pc is connected to the internet what isi the problem?

    If you are the only user on your computer you probably don't have multiple user accounts set up and can disregard that.  If you are using iTunes 11 go to View>Show Sidebar.  Now see if your iPad appears under Devices on the left side when you connect it.  If it does, click on the name of your iPad on the left side and your iTunes sync settings options will appear in folders with tabbed headings to the right.
    If it doesn't appear on the left side, follow the troubleshooting steps shown in this article: http://support.apple.com/kb/TS1538.

  • SSRS countrow Aggregate error(Aggregate and lookup functions cannot be used in query parameter expressions.)

    Below expression works fine with text box but gives error in dataset expression.
    ="SET FMTONLY OFF select  "+ join(Parameters!Column.Value,",") +" FROM pamcustom.dbo.vw_HFL_HFD_HotfileData INNER JOIN pamcustom.dbo.HFL_HFB_HotFileBatch  on BatchID = HFB_intBatchID where BatchID ="+Parameters!BatchId.Value+"
    and "+Parameters!cmbTranType.Value+" "+ iif(CountRows("DS_Aml_Mnr_Iss_Desc")=Parameters!Mnr_Iss_Desc.count," "," and aml_mnr_iss_desc in "+"('" & join(Parameters!Mnr_Iss_Desc.Value,"','")
    & "')")+iif(CountRows("ds_ReportingCategory")=Parameters!ReportingCategory.count," "," and ReportingCategory in "+"('" & join(Parameters!ReportingCategory.Value,"','") & "')")+iif(CountRows("ds_NAICSubGroup")=Parameters!NAICSubGroup.count,"
    "," and naicsubgroup in "+"('" & join(Parameters!NAICSubGroup.Value,"','") & "')")+iif(CountRows("ds_PortTrading")=Parameters!PortTrading.count," "," and porttrading in "+"('"
    & join(Parameters!PortTrading.Value,"','") & "')")+iif(CountRows("ds_GL_LE")=Parameters!GL_LE.count," "," and gl_le in "+"('" & join(Parameters!GL_LE.Value,"','") &
    "')")+iif(CountRows("ds_coagroup")=Parameters!cmbCoaGrp.count," "," and coagroup in "+"('" & join(Parameters!cmbCoaGrp.Value,"','") & "')")+iif(CountRows("Portfolio")=Parameters!cmbPort.count,"
    "," and portfolio in "+"('" & join(Parameters!cmbPort.Value,"','") & "')")+IIf(IsNothing(Parameters!txtSecID.Value)," "," and secid in ('"+Replace(Parameters!txtSecID.Value,",","','")+"')")+iif(IsNothing(Parameters!minPortFilter.Value)
    and IsNothing(Parameters!MinPort.Value)," "," and portfolio "+Parameters!minPortFilter.Value+Parameters!MinPort.Value)+iif(IsNothing(Parameters!maxPortFilter.Value) and IsNothing(Parameters!MaxPort.Value)," ","
    and portfolio "+Parameters!maxPortFilter.Value+Parameters!MaxPort.Value)+iif(IsNothing(Parameters!minCoaFilter.Value) and IsNothing(Parameters!txtMinCoa.Value)," "," and portfolio "+Parameters!minCoaFilter.Value+Parameters!txtMinCoa.Value)+iif(IsNothing(Parameters!maxCoaFilter.Value)
    and IsNothing(Parameters!txtMaxCoa.Value)," "," and portfolio "+Parameters!maxCoaFilter.Value+Parameters!txtMaxCoa.Value)
    I guess the error " Aggregate and lookup functions cannot be used in query parameter expressions." is because I am using CountRow to ensure that if all values of multi select all selected i will not use that filter in where clause.
    Pls. guide...

    Hi, Include your parameter total count in the dataset for parameter and instead of using countrows() function use the count from dataset in the expression.
    Hope this helps.........
    Ione

  • Mapping ResultSet to Context and vice versa

    Hi,
    We've been pondering the usage of SQL ResultSet (java.sql.ResultSet) and the context.
    When creating database applications we have to get the data from database to a ResultSet and copy the data to the context to be able to use it. Then if we make changes to the data in the context, and have the same changes in the database, we have to create SQL update clauses for the data in the context and execute them. With ResultSet it would be just:
    rs.updateString("NAME", "AINSWORTH"); // updates the name
    rs.updateRow(); // updates the row in the datasource
    We would like to use ResultSets for the data behind controls (tables etc.) to be able to update the resultset and the database without having to write SQL update, insert, delete etc. clauses.
    Is this possible ? If it is, how ? If it is not, why ?
    Any insight or suggestions are greatly appreciated.
    Kind Regards,
    Jari Pakarinen

    Thanks for the reply,
    Web service would just add complexity, as we are aiming for simplicity. Also we would like to lessen the amount of boilerplate code to do this. Now we have to create SQL clauses for everything we do with the database. And this for every application we code.
    If we could use ResultSet instead of Context or somehow map Context and ResultSet dynamically as the data source for the controls we'd be all set.
    We would like to just load the data into a ResultSet, do modifications to it WITHOUT SQL (with e.g. WebDynPro table) and commit the modifications WITHOUT SQL back to the database. Only SQL needed would be the one that loads the ResultSet in the first place.
    Regards,
    Jari
    Message was edited by: Jari Pakarinen

  • SecureSocketListener: Could not setup context and create a secure socket on 142.182.112.123:5555 : java.security.cert.CertificateParsingException: PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11. java.security.cert.Certifica

    HI Team,
    while starting the node manager in wls 8.1 and java1.4
    we are facing this issue plz help on this immediately.
    + CLASSPATH=/srvrs/bdv/patches/CR210310_81sp4.jar:/usr/java14/lib/tools.jar:/srvrs/bdv/bea/weblogic81/server/lib/weblogic_sp.jar:/srvrs/bdv/bea/weblogic81/server/lib/weblogic.jar::/srvrs/bdv/bea
    + export CLASSPATH
    + export PATH
    + set -x
    + [ 5555 !=  ]
    + [ 142.182.112.123 !=  ]
    + /usr/java14/bin/java -Xms32m -Xmx32m -Dweblogic.security.SSL.enforceConstraints=off -Djava.security.policy=/srvrs/bdv/bea/weblogic81/server/lib/weblogic.policy -Dweblogic.nodemanager.javaHome=/usr/java14 -DListenAddress=142.182.112.123 -DListenPort=5555 weblogic.NodeManager
    <Sep 15, 2013 7:35:26 AM EDT> <Info> <NodeManager> <NodeManager: for information on command line options,  try "java weblogic.NodeManager -h">
    <Sep 15, 2013 7:35:26 AM EDT> <Info> <NodeManager> <Starting NodeManager >
    <Sep 15, 2013 7:35:26 AM EDT> <Info> <NodeManager> <Setting listenAddress to 142.182.112.123..>
    <Sep 15, 2013 7:35:26 AM EDT> <Info> <NodeManager> <Setting listenPort to 5,555..>
    <Sep 15, 2013 7:35:26 AM EDT> <Info> <NodeManager> <Setting java home to '/usr/java14'>
    <Sep 15, 2013 7:35:26 AM EDT> <Info> <NodeManager> <Effective values of properties :
            ListenAddress=142.182.112.123
            ListenPort=5555
            ListenerType=secureSocket
            SavedLogsDirectory=NodeManagerLogs
            NativeVersionEnabled=true
            TrustedHosts=nodemanager.hosts
            StartTemplate=../../server/lib/unix/nodemanager.sh
            ReverseDnsEnabled=false
            ScavangerDelaySeconds=180
            PIDFileReadRetryCount=0
            WeblogicHome=null
            bea.home=null
            JavaHome=/usr/java14
            PropertiesVersion=8.1
    >
    <Sep 15, 2013 7:35:26 AM EDT> <Info> <NodeManager> <Saving logs in'NodeManagerLogs'>
    <Sep 15, 2013 7:35:31 AM EDT> <Info> <[email protected]:5555> <Reading private key and certificate chain from the keystore /srvrs/bdv/bea/weblogic81/server/lib/DemoIdentity.jks. KeyStore type = jks, Using keystore passphrase = true, Alias = DemoIdentity>
    <Sep 15, 2013 7:35:31 AM EDT> <Info> <[email protected]:5555> <Reading trusted CAs from the keystore /srvrs/bdv/bea/weblogic81/server/lib/DemoTrust.jks. KeyStore type = jks, Using keystore passphrase = true>
    <Sep 15, 2013 7:35:31 AM EDT> <Info> <[email protected]:5555> <Reading trusted CAs from the keystore /usr/java14/jre/lib/security/cacerts. KeyStore type = jks, Using keystore passphrase = false>
    SecureSocketListener: Could not setup context and create a secure socket on 142.182.112.123:5555 : java.security.cert.CertificateParsingException: PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.
    java.security.cert.CertificateParsingException: PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11
            at com.certicom.security.cert.internal.x509.X509V3CertImpl.<init>(Unknown Source)
            at com.certicom.tls.interfaceimpl.CertificateSupport.addTrustedCertificate(Unknown Source)
            at com.certicom.net.ssl.SSLContext.addTrustedCertificate(Unknown Source)
            at com.bea.sslplus.CerticomSSLContext.addTrustedCA(Unknown Source)
            at weblogic.security.utils.SSLContextWrapper.addTrustedCA(SSLContextWrapper.java:52)
            at weblogic.nodemanager.internal.SecureSocketListener.run(SecureSocketListener.java:57)
            at weblogic.nodemanager.internal.GenericListener.startListener(GenericListener.java:16)
            at weblogic.nodemanager.NodeManager.startSecureSocketListener(NodeManager.java:461)
            at weblogic.nodemanager.NodeManager.init(NodeManager.java:305)
            at weblogic.nodemanager.NodeManager.run(NodeManager.java:511)
            at weblogic.NodeManager.main(NodeManager.java:31)
    Thanks,
    Eswar

    Hi,
    Did you find a solution to this? We are running into the same issue since upgrading to Weblogic 9.2.3 for WebCT Vista 8.0.4.
    Thanks,
    Ron

  • Mail and I Tunes fail to open

    Mail and I Tunes fail to open. Ran Disk repair and did restart. Happened before and then cleared up.

    Is it working now ?
    When that kind of thing happens, it worth a look in Console application to see what happens when you launch the applications.

  • I was tring to set up my sons i tune account off my i pad, his set up fine but my others sons i pod is froze up when you turn it on it has a usb cord and i tunes symbol. what can i do to fix this

    can anyone help me with this, i was tring to set up my sons i tunes account on his ipod. I used my tablet to do this his was done fine but my others sons ipod is locked up now with a picture of a usb cord and i tune symbol i was not trying to put it on his it just locked it up. can anyone help

    Do as the image on the screen implies.
    Connect the device to a computer running iTunes and restore.

  • Need help with XML response to refresh document with context and prompts

    I've been working with the Restful api for a few weeks now and have been able to figure out most of what I need to automate testing of our reports. However, one task that I have not been able to figure out is how to refresh a document that contains both a context and two prompts for dates.
    Here is what I have tried, and what the API responds with.
    1) I queried the API for this document's parameters using the following call after logging in -
    headers = {:accept=>'application/xml', :content_type=>'application/xml', :x_sap_logontoken=>@token}
    url = "http://our.url.net:6405/biprws/raylight/v1/documents/12345/parameters"
    RestClient.get(url, headers)
    The response from the API is:
    <parameters>
        <parameter dpId="DP0" type="context" optional="false">
            <id>0</id>
            <technicalName>cQuery 1</technicalName>
            <name>Select a context</name>
            <answer type="Text" constrained="true">
                <info cardinality="Single">
                    <lov partial="false">
                        <values>
                            <value id="CTX_1">LOAN</value>
                            <value id="CTX_9">LOAN_APPLICATION</value>
                        </values>
                    </lov>
                    <values>
                        <value id="CTX_1">LOAN</value>
                        <value id="CTX_9">LOAN_APPLICATION</value>
                    </values>
                    <previous>
                        <value id="CTX_9">LOAN_APPLICATION</value>
                    </previous>
                </info>
                <values>
                    <value id="CTX_9">LOAN_APPLICATION</value>
                </values>
            </answer>
        </parameter>
    </parameters>
    2) This tells me I need to supply a context, so I then replace my RestClient.get call with a RestClient.put call with the following payload:
    <parameters>
         <parameter>
                <id>0</id>
                <answer>
                      <values>
                            <value id=\"CTX_9\"/>
                      </values>
                </answer>
          </parameter>
    </parameters>
    3) This satisfies the context portion of the refresh. The API replies with the following response, telling me I need to answer two prompts -
    <parameters>
         <parameter dpId=\"DP0\" type=\"prompt\" optional=\"false\">
              <id>1</id>
              <technicalName>psEnter value(s) for Start Date of Application Received Date</technicalName>
              <name>Enter value(s) for Start Date of Application Received Date</name>
               <answer type=\"DateTime\" constrained=\"false\">\
                    <info cardinality=\"Single\"/>
               </answer>
         </parameter>
         <parameter dpId=\"DP0\" type=\"prompt\" optional=\"false\">
                <id>2</id>
                <technicalName>psEnter value for End Date of Application Received Date</technicalName>
                <name>Enter value for End Date of Application Received Date</name>\
                <answer type=\"DateTime\" constrained=\"false\">
                    <info cardinality=\"Single\"/>
                </answer>
          </parameter>
    </parameters>
    4) Here is where I am having problems. I have tried all kinds of permutations of the below payload/response body. All I ever get from the API is a 400 - BadResponse error.
    <parameters>
         <parameter>
              <id>0</id>
              <answer>
                   <values>
                        <value id=\"CTX_9\"/>
                   </values>
              </answer>
         </parameter>
    </parameters>
    <parameters>
         <parameter type=\"prompt\">
              <id > 1 </ id>
              <answer type=\"DateTime\">
                   <values>
                        <value>2012-06-11T09:50:54.000-04:00</value>
                   </values>
               </answer>
         </parameter>
         <parameter type=\"prompt\">
               <id > 2 </ id>
               <answer type=\"DateTime\">
                    <values>
                         <value>2014-07-11T09:50:54.967-04:00</value>
                    </values>
               </answer>
         </parameter>
    </parameters>
    I am not very good with XML and the terminology around it, and I haven't received much training around using the Restful API other than the SDK documentation. I have a feeling there is something very basic that Im missing here. What is the correct XML needed in the response body to properly refresh the document?

    If you are more confortable with JSON, Raylight supports it as well.
    Best regards,
    Anthony

  • My iphone 3g is in reset mode and i tunes will not reset. it pops an error message with no code. how can i get i tunes to rest my phone?

    my iphone 3g is in reset mode and i tunes will not reset. it pops an error message with no code. how can i get i tunes to rest my phone?

    No need to Double Post... It is considered impolite.
    https://discussions.apple.com/message/20652820#20652820

  • Transactions, Persistence Contexts and Entity Managers... Oh My!

    Hi
    I am just getting into J2EE and EJB3. I have no prior experience with EJB2, we avoided it with our own POJO data access framework. With the advent of EJB3 we would like to use it in a new application.
    I am reading the book "Pro EJB 3" by Ketih and Schincariol and am having trouble wrapping my head around then Entity Manager chapter. I don't think it's any fault of the authors, but somehow it's just not coming together in my head. Perhaps it's because I have no real prior EJB experience.
    Can anyone point me to a resource that gives an overview of the relationships between Transactions, Persistence Contexts and Entity Managers? Or perhaps I just have to keep mulling it over until it all comes together...?
    Thanks in advance!

    Hi Shelli,
    I haven't read that book but I don't know of a good writeup of the tx topic specifically outside
    of the spec itself. There are certainly a lot of combinations, between container-managed
    vs. bean-managed EntityManagers, and JTA vs. resource-local. However, the
    common usage case within Java EE -- container-managed and JTA -- is very simple.
    In this case, the container automatically associates the persistence context with the
    active global transaction. If you make a call to another Java EE component within the
    same transaction and that component accesses a container-managed EntityManager
    for the same persistence unit, the persistence context is automatically propagated so
    that both components "see" the same persistence context.
    --ken                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Import of Main and Lookup table in a single Map

    Hey Guys,
    I am developing a Proof of Concept to Import Main and Lookup-Flat in a single Import Map (by using a single excel file).
    Below is my Table structure:
    Main Table: Customer
    --->Customer_Number (Text,Unique Field, Display Field)
    --->Sales_Area (Lookup Flat)
    Lookup Table: Sales_Area
    Sales_Area_ID (Text,Unique Field,Display Field)
    Sales_Area_Desc (Text,Display Field).
    The import File (excel) has below attributes:
    Customer_Number,Sales_Area_ID,Sales_Area_Desc.
    When i start both Main Table and Lookup tables are empty (there is no data in Data Manager for either of the tables)
    Now in the Import Map, i selected source as the excel file and target as the Main table.
    I did mapping of Customer_Number as usual after that I created a compound field for Sales_Area_ID+ Sales_Area_Desc and did the mapping of this compound field. then did the mapping for Sales_Area_ID and Sales_Area_Desc.
    Now since there is no data in lookup table, i select the "Add" button in the "Value Mapping" section. when i execute this map, it works perfectly and data is loaded in both the Main table and lookup table but if a new value comes in the excel(a value which does not yet exist in lookup table), the map fails, when i open it , it says that i need to redo the Value Mapping, again i click on "Add" button and it starts working. So basically the Import Map fails whenever i get a value in excel which does not yet exist in Lookup table.
    Now my question is, is there a way to automate my import map, i thought clicking on "Add" button will take care of all the lookup values which are not already present.
    Can anyone please help me in this regard.
    Thanks
    Saif

    Hi Saif,
    You can try the following option.
    Right click on the lookup filed/compound filed in destination fields, and select the option 'SET MDIS Unmapped Value Handling' as 'ADD'.
    Cheers,
    Cherry.

  • Ipod touch wont turn after sync and I tunes is not recognize it

    Ipod  touch will not turn on after sync and i tunes will not reconginze it.  I have uneinstalled and then reinstalled itunes and still nothing.

    Try here first to get life out of the iPod:
    iPod touch: Hardware troubleshooting
    Also try this assuming yu have a PC:
    iPhone, iPad, or iPod touch: Device not recognized in iTunes for Windows

  • Lookup Flat Table and Lookup Qualifier Table

    Hi,
    Can any body confirm that if I will change the type of lookup-flat type field to lookup-qualifier type field. But the structure of Lookup Flat table and Lookup Qualifier table will be the same then the Java code written to populate the lookup-flat type field will work without any changes with its new type (lookup-qualifier).
    Right now when I run the code after the above said changes, no error comes but no values is assigned to that field.
    Another way to ask this question, can a simple Qualifier Lookup table(without having any qualifier type field) be used as like Lookup flat table.
    I would appreciate if any body can help me in this regard ASAP.
    Regards
    Shahid Nadeem

    Hi Alok,
    I think this Qualifier importing after main table import is quite trickier that you estimate.
    1)Map all the fields of qualified table with source fields whther they are qualifiers or non-qulaifiers.
    - we will only be able to view the Non Qualifier field in the qualified table.
    2)Now the main step is when you finish all field and value mapping there will be also a Target field name on your qualified table with values of display field. this field must be mapped to a source field to import qualified table. do value mapping also.
    - This target field is the linkup field you are talking abot i feel, and it is viewed only in the main table and, as i have only on one non- qualifier this will not be a combination of any display fields.
    3)I am not abl eto see the Non -Qualifier in my main table
    So how do i proceed.
    Kindly guide
    Thanks
    Simona

  • I loaded a disk yesterday, It took me 2 hours, the disk in uncompleted and I Tunes charded me two times the price of the loading, what can I do ?

    I loaded a disk yesterday, It took me 2 hours, the disk in uncompleted and
    I-Tunes charge me two times the price (I have to pay the dubbel for noting).
    What can I do ?
    I can surely desinstal I-Tunes
    Yves

    Yves from Brussels (BE) wrote:
    I loaded a disk yesterday
    Do you mean you purchased an Album from the iTunes Store?
    Or you RIP'd a CD you own?

Maybe you are looking for

  • Elements 12 on Windows 7 Pro 64 Bit - Quick and Guided Modes do not work?

    I have tried to upload the software many times with no help. I also have Elements 11 on the same computer and it works very well. I do not understand why 12 will not work. Since I first installed 12 I have been using it in the Expert mode which seems

  • Photoshop CS4 performance issue

    HI we use App-V for almost all of our applications and we work with a local cache mode as far as I know - the performance of a local application and the virtual application should be the same even if the package is big. a great example is Office 2010

  • CREATIVE ZEN, HOW TO CHARGE THE BATTERY.

    <DIV align=center>Hello, Just got a Zen Micro and just installed it and all that and then when i was messing about with it the battery went so when i went to charge it i plugged the USB in the back of my computer and plugged it into my Zen, It did wo

  • Reg: IDOC to File Scenario Acknowledgments

    Hi All, I have created a Asynchronous IDOC to FILE Scenario. It is working perfectly fine, files are getting generated as expected and FTPed. But I am receiveing Acknowledgments back to ECC system from PI. I dont want any acknowledgments back to ECC.

  • Document Types for Entry View in General Ledger

    Is it possible to configure document types to post in a non-leading ledger with a number range that is the same as what is already configured for document types in entry view?  This would mean it is possible to post in FB50L in a non-leading ledger a