Package variable versus application context variables
Any difference in using package level variables versus setting attribute value pairs in a session based context ?
Thanks
Packaged variable - can be used only by user having execute privilege on the package. Same user can modify the values of the packaged variable when logged on to the session.
Context variable - It cannot be set by only mere value assignment, It needs to the call to a procedure(trusted program) to set the value, hence it is more secure.
Both are global variables & can be accessed throughout the session.
Regards,
Similar Messages
-
Setting session variables in application context using OpenJPA
Hi!
I am using openjpa 1.2 with EJB 3.0. I am connecting to Oracle 11g database and need to use the oracle virtual private database for security and data segregation. For this purpose, I need to set some custom variables at the session level of the application context such as the application user name. Since, I am using container injected EntityManager using @PersistenceContext, I am finding it hard to do so.
Can anyone please help me out
Thanks in advance
AbhiYou will probably want to ask your question on an OpenJPA forum to see if they even can support VPD (if not, see EclipseLink http://wiki.eclipse.org/Introduction_to_EclipseLink_Sessions_(ELUG)#Isolated_Client_Sessions_and_Oracle_Virtual_Private_Database_.28VPD.29 )
You might also want to try injecting the factory instead and use that to get the EntityManager instead of injecting the em directly. ie
@PersistenceUnit(unitName="my-pu")
private EntityManagerFactory emf;
Best Regards,
Chris -
Are there application context variables on WebAS like in tomcat?
Hello @ all,
can anyone tell me if there is a possibility to store variables in an application context on WebAS like in tomcat.
I need this possibility to implement a connection pooling on a server wide basis. Where i thought of implementing a singleton to do the connection pooling and i wanted to store this in the application context of WebAS if there is one.
Any hint or link to documentation would be very welcome.
Thanks
TobiHi,
Since you are in the portal forum, I assume you have a portal installed.
You can then create a portal service, which will function as a singleton for the application server. Note however that if you run a cluster of many application servers, each of them will have an instance of it.
Dagfinn -
Context variable DRIXMD (namespace DR$APPCTX) shows up in v$context
We have recently upgraded our database to Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production.
Now we occasionally get the error in one of our APEX applications
ORA-01031: insufficiënt privileges
The apex application is using a user connection pool.
When an Apex page is submitted we clear the context variables so the user won’t use each other’s settings.
The context variables to be cleared are selected from V$CONTEXT.
For some reason the context variable DRIXMD (namespace DR$APPCTX) is now (since the upgrade to 11.2) also shown in v$context.
The package used in our code is not allowed to set variables in namespace DR$APPCTX and is raising the error.
My question is:
Is it a normal feature to see these context variables in V$CONTEX and if not is there a fix available?
And if yes, can anyone clarify this?
Thanks in advance.Success!!!
I had to grant this permissions:
call dbms_java.grant_permission( 'WS_TEST', 'SYS:java.lang.RuntimePermission', 'getClassLoader', '' );
call dbms_java.grant_permission( 'WS_TEST', 'SYS:java.lang.RuntimePermission', 'accessClassInPackage.sun.util.calendar', '' );
call dbms_java.grant_permission( 'WS_TEST', 'SYS:java.lang.RuntimePermission', 'setFactory', '' )
call dbms_java.grant_permission( 'WS_TEST', 'SYS:java.util.PropertyPermission', 'HTTPClient.socket.idleTimeout', 'write' );
call dbms_java.grant_permission( 'WS_TEST', 'SYS:java.net.SocketPermission', 'localhost', 'resolve' );
call dbms_java.grant_permission( 'WS_TEST', 'SYS:java.net.SocketPermission', '127.0.0.1:8084', 'connect,resolve' );
As I wrote earlier, WS_TEST is my user into which I load JAX-RPC client. Note that, if you load JAX-RPC client into user another than SYS, you have NOT to use -s -grant public option (wassam wrote about this too). Another thing is that I (finally) didn't load OC4J. To consume WebService I use utl_dbws.invoke(call_Handle CALL, request SYS.XMLTYPE) function.
voytec001 -
Hello,
In context file we have context variables rite..so kindly tell me the table in which all these context variables will be stored in database.The table name which stores all the context variables.
Thanks,
928714.Hi;
Pelase see:
Oracle EBS R12 Context Variables [ID 458282.1]
Explanation of Context Variables for Shared Application File System in R12 and 11i [ID 1070152.1]
PS:Please dont forget to change thread status to answered if it possible when u belive your thread has been answered, it pretend to lose time of other forums user while they are searching open question which is not answered,thanks for understanding
Regard
Helios -
Maybe I'm just missing something obvious here, but ...
I have a JSP page that works fine under Tomcat, but it doesn't work under WebSphere.
The JSP includes a couple of lines that retrieve context variables, as in:
foobar=application.getInitParameter("foo.bar");In my web.xml file, there's a block that says:
<context-param>
<param-name>foo.bar</param-name>
<param-value>plugh</param-value>
</context-param>As I say, in Tomcat this works great. In WebSphere it looks like it just turns up null. Is there a differerent way to do this in WebSphere, or am I missing some subtlety?This functionality is detailed as part of the Servlet Specification, and as such should be implemented correctly by all J2EE containers.
ie: It should work exactly the same under WebSphere.
Maybe try the application.getInitParameterNames() method to see what websphere returns you? -
Application scope variables ... an easier way or not ?
Instead of sharing application scope variables through the
servletContext()/application I am using a normal singleton class (or maybe
static class) to share all my application varaiable. It works fine and it
takes a lot less code to write.
It seamed logical to do this a static classes or singletons are shared
within a single servletContext/application (which there seems to be only one
per WL instance anyway). (singleton is quite nice pattern coz. all
jsp:useBeans with the application scope are by definition singletons)
Has anoyne tried something similar or maybe know of the problem with this
approach. I assume that server will never reinitialise application level
variables ...... hope the assumption is correct. ....
When you specify application scope, the JSP stores/retrieves the value
into/from the servlet context. You may already know this, but it sounded
like what you thought you were somehow avoiding.
Cameron Purdy
http://www.tangosol.com
"Bohinc D" <[email protected]> wrote in message
news:[email protected]..
> Instead of sharing application scope variables through the
> servletContext()/application I am using a normal singleton class (or maybe
> static class) to share all my application varaiable. It works fine and it
> takes a lot less code to write.
>
> It seamed logical to do this a static classes or singletons are shared
> within a single servletContext/application (which there seems to be only
one
> per WL instance anyway). (singleton is quite nice pattern coz. all
> jsp:useBeans with the application scope are by definition singletons)
>
> Has anoyne tried something similar or maybe know of the problem with this
> approach. I assume that server will never reinitialise application level
> variables ...... hope the assumption is correct. ....
>
>
>
-
OSB: Context variable changes for 'Reply' action
HI,
What are the differences between changes done by OSB to any of the context variables(body, inbound, outbound etc) when Reply with Success is used and Reply with failure is used.
I have a Proxy service A consuming another proxy service B by RouteTo.
When B has Reply with Success, A gets the response and fault does not get the generated within A.
But when B has Reply with Error, fault gets generated within A.
In both the cases,response xml that B is sending is same. So, what is that which makes fault generation within A. How would A know that fault is to be generated.
Please help in understanding.
TIA.
Edited by: Ashish Rane on Dec 21, 2012 6:01 AMA Reply action will always return the content of $body variable as it is. The different between Reply with Success and Reply with failure lies in the content of transport headers being returned. In case of HTTP Service, if you do a reply with success, the calling service/application will received HTTP status code 200 or 0, which is a success status code for HTTP. In case of Reply with Failure, calling service/application will receive HTTP status code 500, which will enable the error handling in calling service/application to trigger. The best practice for SOAP based services is to always replace content of $body with a SOAP Fault when doing a Reply With Failure so that the calling application received details of fault (otherwise it just gets transport status code for failure but content of reply will still be original content of $body which might not indicate what the error was)
-
How to use one Assign action to create multiple context variables
Hello, everyone.
I read some tips from Oracle documentation that said:
Avoid creating many OSB context variables that are used just once within another XQuery
Context variables created using an Assign action are converted to XmlBeans and then reverted to the native XQuery format for the next XQuery. Multiple "Assign" actions can be collapsed into a single Assign action using a FLWOR expression. Intermediate values can be created using "let" statements. Avoiding redundant context variable creation eliminates overheads associated with internal data format conversions. This benefit has to be balanced against visibility of the code and reuse of the variables.
Oracle® Fusion Middleware Performance and Tuning Guide
+11g Release 1 (11.1.1)+
Part Number E10108-03
But I don't know how to do that. Can you show me ?
Thank in advance
Edited by: Doubt_Man on Aug 17, 2011 3:30 PMif you return sequences, you can declare the return type of your xquery as xs:double*
(notice the asterix at the end)
but I have the impression that in the assign action only the first element will be assigned to the context variable
(correct me if I am wrong)
So in fact you might indeed have to transform the sequence into a element()*, or concatenate it into a CVS string - for instance using string-join
http://www.xqueryfunctions.com/xq/fn_string-join.html -
How to Parse XML data directly from context variables in webdynpro
Hello,
I have two requirements:
1) I have a context variable which has string value.
I want to write the this value into a flat file.
How do I do this in WebDynpro.
Any sample code for this.
2) In Webdynpro, I want to parse and process the XML data directly from a string context variable which
has the value in XML format.
How do I achieve this. Any pointers or sample codes for this.
Thanks and Regards,
Anupama.Anupama,
Here is some link which talks about unpacking xml and converting to HTML.
<a href="http://help.sap.com/saphelp_nw04/helpdata/en/eb/3dfb402eb5f76fe10000000a1550b0/content.htm">http://help.sap.com/saphelp_nw04/helpdata/en/eb/3dfb402eb5f76fe10000000a1550b0/content.htm</a>
I have done something like this in portal development and not in webdynpro.But in principle it should work very where. -
Modify Application: Error Message:: Object Variable or With Block variable
Hi Experts,
We just installed 5.1 on our server and once the application is installed.
When I try to modify the aplication I get this error at the end
This is step what the modify app does:
Check environment information
Drop Fact table index.
Modify fact table.
Update application information.
Set Fact table index.
Create stored procedures and comment table.
Increase application version and make legal consolidation table.
Make OLAP database and Journal/Audit reports. / Validate dimension formulas.
Error Message:: Object Variable or With Block variable
Any one has any any answer ? I will appreciate your help on this.
ThanksPlease check if Reporting Services is working properly.
Just open IE and type http://nameofserver/reports
If you receive any error then you have to fix that error verifying configuration of RS.
If RS is working make sure you add the right information into Server Manager Server Option for RS and Report Server virtual directory.
Also please check the tblappsetinfo to have all the fields completed (regarding servers).
Regards
Sorin Radulescu -
WEB Application / Dynamic variable input / Prompts
I've defined a variable on characteristic Currency with the following definition:
Processing by : User Entry/ Default Value
Variable represents : Single Value
Variable entry is : Optional
Ready for input : yes
Can be changed in query nav: yes
Default Value : EUR
This variable ist used in "Currency Translation" as "Target currency" (variables entry: yes)
The query is used in a Web-Report that performs the following command by selecting currencies from a checkbox:
url=SAP_BW_URL_Get() +"&CMD=PROCESS_VARIABLES&SUBCMD=VAR_SUBMIT&VAR_NAME_1=SL_CURR&VAR_VALUE_EXT_1=";
url=url+value;
(value is the code of the selected currency)
Everything works pretty good, but opening the web-report I get a prompt window for the variable. How can I avoid this ?
Changing the variable property <Ready for input : no> causes the effect that the dynamically changing of the variable doesn't work anymore. It seems that in this case always the default value of the variable is taken.
The application should use the default value while opening the report, afterwards it should be possible to set the variable dynamically.
Thank you very much for your ideas !!Hi Stefan,
you can activate/deactivate the variable screen with parameter "Force Variable Screen" in your web template.
bye -
Application & Session variables
how to store & use Application & Session variables in Seervlets & JSPs
Hi
how to store & use Application & Session variables in JSPSee: http://developer.java.sun.com/developer/onlineTraining/JSPIntro/contents.html
how to store & use Application & Session variables in ServletsSee:
http://java.sun.com/docs/books/tutorial/servlets/communication/attributes.html
Good Luck!
Eshwar Rao
Developer Technical Support
Sun microsystems inc.
http://www.sun.com/developers/support -
Application Variables in application.cfm and asp
If anyone could provide some insight into using application
variables declared in application.cfm, but retrieved in asp code,
it would be appreciated.
GOAL: Retrieve values into an asp page from application
variables in application.cfm.
PROCESS: Defined the variables in application.cfm. On an asp
page, defined the application variable in Window -> Bindings.
The application variables defined in the source code show up.
Attempt to retrieve the application variable in the asp page by
using the command: var_destination = Application("var_name")
It seems like whatever I try, the variable is empty. After
looking around on the web, I also saw that the equivalent to
application.cfm in asp is global.asa. I also tried setting up this
file, along with the variables, did the binding, and used the same
commands, and also was not able to retrieve any application
variables.
What am I missing?What am I missing?
That ColdFusion and ASP.NET are different applications and do
not share
the same memory addresses So they are going to each have
their one
"application" variables.
Blue Dragon has implemented CFML as an ASP.NET language so
that one
could write ColdFusion that runs on the ASP.NET framework and
would then
use the same memory locations with their server.
Otherwise you are going to have to write your own sharing
tool. Some
code that can read the desired variables from one code base
and pass it
to the other code base through forms, web services or some
other manner. -
Context variable in report configuration
Hello,
I try to create a context variable for a select-option as indicated in the documentation of the customizing.
I go in img structure Service Consumption Layer Reporting Administration
then Report settings
then Manage context variables
I define a context group
then a go to the sub screen Manage context variable
I define a new variable but in field Contr type, I can only select P for parameter and not S for select option.
I check the data element /IWCNT/CON_VAR_TYPE which is define with a value range containing only P.
Did I do something wrong ?
I suppose that is why when I define the report, in screen parameters and values, the fields context group and context variable in display and not in input mode .
Thasnk ina dvance for your help
jfjHi,
Easier option is to create a profit center group excluding the dummy profit center and assign it in the report painter instead of the variable.
Other option is at the time of executing the report, exclude the dummy profit center with out making any changes in the report.
Regards
Sudhakar Reddy
Maybe you are looking for
-
When I bring up facebook on firefox it is a good size. My games were good before today but now they are so huge I can't play them. I think I must have hit a button by mistake but I don't know how to fix it. Can you help me?
-
My new iPad asks for the PIN of my MacBook to sync. How do I find the PIN?
how can I sync all my devices? Older MacBook, iPhone5 (these two sych via wi-fi) I want my new iPad to do the same but it asks for my MacBook PIN number. No idea what that is. I have it syncing with iTunes now but only pics/music. I want some
-
BTE 1030 - we use for AP documents, create an event that triggers a workflow
Hello all, We use SAP's program RFBIBL00 to post AP documents. We coded a function module that is called when BTE 1030 is reached. Our FM creates an event that triggers a workflow. We are now doing some testing with an external vendor who is creati
-
Digital Signatures and editing signed documents
Situation - A medical office wants to digitally sign a document after it has been edited (to make it a legal order) but have the form remain unlocked so it can be edited again. They want to be able to accomplish this on a single instance of the form
-
Burning folders to separate songs in MP3 discs
Does anyone know how to burn mp3 files and catagorize them so that when u burn them u can have them in different files that a car mp3/cd player can recognize the files. I say this because i dont like hitting >> on the cd player 99 times to get to the