Find application module instance using groovy script
Hi,
Can any one help me to find the instance of a specific application module using a groovy script.
I know the below is going to give me the current application module instance
adf.object.applicationModule.findViewObject("ViewObject").first().getAttribute("name")But I should be able to find a specific application module and then proceed with finding the viewObject in it.....
Edited by: vijai on Mar 6, 2012 7:21 AM
Hi john,
This is the summary of my issue.....
I have few Appmodules among which one is used for administration purpose. I have a particular ViewObject say V1 that is used in all the AppModules as instances from which values are used as bind variable values in viewObject query (So when these instances gets executed first time the bind variable are set). In one operation the user changes the value in the administration app module ViewObject V1 and commits it. So we face two issues here.....
1. I need to refresh all the ViewObjects in the other appmodules
2. and I need to refresh the Bind Variables values in the ViewObject query (or) Give the refreshed values in the page bindings Execute With Params.
In order to do this stuffs I thought I would make a groovy script and use the viewObject in the Administration ViewObject for values in Bind variables,ExecuteWithParams value etc......
Pls give me a better approach or a better groovy script to do this...........
Similar Messages
-
Accessing application module instances directly from the AMPool
Hi!
I´m want to create an Application Module Pool Monitor, actually I need to know how many fetched rows an Application Module instance has.
I made a jsp, that do the following:
ApplicationPool pool = (ApplicationPool)poolMgr.getResourcePool(poolname);
int instanceCount = pool.getInstanceCount();
for (int i = 0; i < instanceCount; i++){
ApplicationModule am = pool.getInstance(i);
and then works with the am instances, calculating the rows that each VO has fetched.
Now, It is not yet clear to me if, when I use "pool.getInstance(i)",
I'm locking the instance that is being use by another session (an user session), or trying to get a lock,
and possibly creating a deadlock. Or the AMPool administrates the lock and I don´t need to worry about it.
Thank in advance, and sorry for my bad english!
(i forgot to mention, I´m using adf - bc 10.1.2 )
Message was edited by:
user506477Sure, we are having RAM problems, sometimes, and for reasons that are still unclear, a process begins to consume memory.
What we need rigth now, is a tool that tell us how many rows in memory has each user, and which ViewObject is creating them. The idea is to make some kind of monitor that shows that, the AM that each user has, an the state of their VOs.
I used the JSP in this page as a reference:
http://radio.weblogs.com/0118231/stories/2004/05/10/gettingApplicationModulePoolStatisticsToAidWithSizeTuning.html
I´m not trying to create a new AM management mechanism, simply a tool that shows the status of the application (and perhaps allows me, for instance, to clear the cache of a VO that has to many rows fetched).
In my JSP I obtain an instance of the AMs using "pool.getInstance(i)", and access then the associated VOs. But I don´t know if accesing the AMs this way could create problems with users that have an AM assigned to them, for example, a deadlock.
Thanks! -
One Application Module Instance Per User
Hi, I am using JDeveloper 11.1.1.2 with ADF BC.
I have an application with a single root application module. I have my JDBC data source set up to enable identity based connection pooling so that a database connection is created with the current user's credentials.
Basically, I would like an application module pool such that a single application module instance exists for each user in the system. If a user logs into the system, a new app module should be instantiated for him (tied to his db credentials). If the user makes a new request and his app module has been removed from the pool for inactivity, a new app module should be instantiated even if others already exist in the pool for other users. If the user is already logged into the system and tries to login again in another browser window, I would like to check if an app module already exists in the pool for the user and re-use that one instead of instantiating a new one.
I don't want to set jbo.doconnectionpooling=true because I want the app module instance to keep its cached data.
Is this possible? If so, how could I configure the application module to make this work?Hi Frank. Thank you for the reply.
I tried using two browsers. The behavior of each page is very much different when being opened individually. Its like the two pages is sharing the same iterator / data and / or entity object. These two pages were opened to see if one is dependent upon the other. But when I test the same scenario on a different computer, everything works out fine.
Is there a way for me to verify if the sessions are different? and if they are different, is there a way to verify if the application module created a new instance for the other session? -
Failed to checkout an application module instance
Hi,
I am using JDev 3.2 to develop my JSPs and BC4J. When I tried to run my JSP from my web server I got the error "JBO-30003:The application pool, TsrsJSP20_TsrsBCPack_TsrsBCPackModule, failed to checkout an application module instance. JBO-26061:Error while opening JDBC connection." How can I fix this error? Please help!!!!
Lisa
nullThis is a deployment problem. You either do not have all the JARS/JSPs/properties files deployed onto the webserver or they are not found in the classpath (wrapper classpath for apache).
Since this is very webserver specific it is difficult to be more specific. -
How to separate application module instance per user session?
Hi.
How do you separate application module instances per session or per user? I am creating a web application and has created a simple filter that implements Filter.
Thanks in advance.Hi Frank. Thank you for the reply.
I tried using two browsers. The behavior of each page is very much different when being opened individually. Its like the two pages is sharing the same iterator / data and / or entity object. These two pages were opened to see if one is dependent upon the other. But when I test the same scenario on a different computer, everything works out fine.
Is there a way for me to verify if the sessions are different? and if they are different, is there a way to verify if the application module created a new instance for the other session? -
Application pool unable to check out application module instance in TOMCAT!
Hi,
I am able to run my bc4j application (WITH jsp CLIENTS) in JDEVELOPER just fine. But when I deploy it to TOMCAT, it gives me an error :
"oracle.jbo.common.ampool.ApplicationPoolException: JBO-3003: The application pool WoopsBC4J.WoopsBC4JModule, failed to check out an application module instance"
Can anyone tell me why this is happening?
I have successfully deployed the sample ONLINEORDERS application to TOMCAT without any problem but this application somehow refuses to work.
Is there anyone who encountered similar problems?
Regards
IftiChris, Here's the complete error message that I am receiving when I attempt to call the JSP page. I infact re-installed tomcat just to make sure that I don't have any old files that my application is referring to. So right now , I have only one application.
Any help would be appreciated!
Internal Servlet Error:
javax.servlet.ServletException: oracle.jbo.common.ampool.ApplicationPoolException: JBO-30003: The application pool, WoopsModule, failed to checkout an application module instance.
oracle.jbo.ApplicationModule oracle.jbo.html.jsp.JSPApplicationRegistry.getAppModuleInstance(java.lang.String, javax.servlet.jsp.PageContext)
int oracle.jbo.html.jsp.datatags.ApplicationModuleTag.doEndTag()
void _0002fiss_0005fListPerson_0002ejspiss_0005fListPerson_jsp_0._jspService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
void org.apache.jasper.runtime.HttpJspBase.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
void org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, boolean)
void org.apache.jasper.servlet.JspServlet.serviceJspFile(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.String, java.lang.Throwable, boolean)
void org.apache.jasper.servlet.JspServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
void org.apache.tomcat.core.ServletWrapper.doService(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
void org.apache.tomcat.core.Handler.service(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
void org.apache.tomcat.core.ServletWrapper.service(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
void org.apache.tomcat.core.ContextManager.internalService(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
void org.apache.tomcat.core.ContextManager.service(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
void org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(org.apache.tomcat.service.TcpConnection, java.lang.Object[])
void org.apache.tomcat.service.TcpWorkerThread.runIt(java.lang.Object[])
void org.apache.tomcat.util.ThreadPool$ControlRunnable.run()
void java.lang.Thread.run()
## Detail 0 ##
oracle.jbo.NoDefException: JBO-25002: Definition WoopsBC4J.WoopsBC4JModule of type ApplicationModule not found
oracle.jbo.ApplicationModule oracle.jbo.html.jsp.JSPApplicationRegistry.getAppModuleInstance(java.lang.String, javax.servlet.jsp.PageContext)
int oracle.jbo.html.jsp.datatags.ApplicationModuleTag.doEndTag()
void _0002fiss_0005fListPerson_0002ejspiss_0005fListPerson_jsp_0._jspService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
void org.apache.jasper.runtime.HttpJspBase.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
void org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, boolean)
void org.apache.jasper.servlet.JspServlet.serviceJspFile(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.String, java.lang.Throwable, boolean)
void org.apache.jasper.servlet.JspServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
void org.apache.tomcat.core.ServletWrapper.doService(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
void org.apache.tomcat.core.Handler.service(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
void org.apache.tomcat.core.ServletWrapper.service(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
void org.apache.tomcat.core.ContextManager.internalService(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
void org.apache.tomcat.core.ContextManager.service(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
void org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(org.apache.tomcat.service.TcpConnection, java.lang.Object[])
void org.apache.tomcat.service.TcpWorkerThread.runIt(java.lang.Object[])
void org.apache.tomcat.util.ThreadPool$ControlRunnable.run()
void java.lang.Thread.run()
void org.apache.jasper.servlet.JspServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
void org.apache.tomcat.core.ServletWrapper.doService(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
void org.apache.tomcat.core.Handler.service(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
void org.apache.tomcat.core.ServletWrapper.service(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
void org.apache.tomcat.core.ContextManager.internalService(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
void org.apache.tomcat.core.ContextManager.service(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
void org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(org.apache.tomcat.service.TcpConnection, java.lang.Object[])
void org.apache.tomcat.service.TcpWorkerThread.runIt(java.lang.Object[])
void org.apache.tomcat.util.ThreadPool$ControlRunnable.run()
void java.lang.Thread.run()
Root cause:
javax.servlet.jsp.JspException: oracle.jbo.common.ampool.ApplicationPoolException: JBO-30003: The application pool, WoopsModule, failed to checkout an application module instance.
oracle.jbo.ApplicationModule oracle.jbo.html.jsp.JSPApplicationRegistry.getAppModuleInstance(java.lang.String, javax.servlet.jsp.PageContext)
int oracle.jbo.html.jsp.datatags.ApplicationModuleTag.doEndTag()
void _0002fiss_0005fListPerson_0002ejspiss_0005fListPerson_jsp_0._jspService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
void org.apache.jasper.runtime.HttpJspBase.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
void org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, boolean)
void org.apache.jasper.servlet.JspServlet.serviceJspFile(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.String, java.lang.Throwable, boolean)
void org.apache.jasper.servlet.JspServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
void org.apache.tomcat.core.ServletWrapper.doService(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
void org.apache.tomcat.core.Handler.service(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
void org.apache.tomcat.core.ServletWrapper.service(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
void org.apache.tomcat.core.ContextManager.internalService(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
void org.apache.tomcat.core.ContextManager.service(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
void org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(org.apache.tomcat.service.TcpConnection, java.lang.Object[])
void org.apache.tomcat.service.TcpWorkerThread.runIt(java.lang.Object[])
void org.apache.tomcat.util.ThreadPool$ControlRunnable.run()
void java.lang.Thread.run()
## Detail 0 ##
oracle.jbo.NoDefException: JBO-25002: Definition WoopsBC4J.WoopsBC4JModule of type ApplicationModule not found
oracle.jbo.ApplicationModule oracle.jbo.html.jsp.JSPApplicationRegistry.getAppModuleInstance(java.lang.String, javax.servlet.jsp.PageContext)
int oracle.jbo.html.jsp.datatags.ApplicationModuleTag.doEndTag()
void _0002fiss_0005fListPerson_0002ejspiss_0005fListPerson_jsp_0._jspService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
void org.apache.jasper.runtime.HttpJspBase.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
void org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, boolean)
void org.apache.jasper.servlet.JspServlet.serviceJspFile(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.String, java.lang.Throwable, boolean)
void org.apache.jasper.servlet.JspServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
void org.apache.tomcat.core.ServletWrapper.doService(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
void org.apache.tomcat.core.Handler.service(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
void org.apache.tomcat.core.ServletWrapper.service(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
void org.apache.tomcat.core.ContextManager.internalService(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
void org.apache.tomcat.core.ContextManager.service(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
void org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(org.apache.tomcat.service.TcpConnection, java.lang.Object[])
void org.apache.tomcat.service.TcpWorkerThread.runIt(java.lang.Object[])
void org.apache.tomcat.util.ThreadPool$ControlRunnable.run()
void java.lang.Thread.run()
void org.apache.jasper.servlet.JspServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
void org.apache.tomcat.core.ServletWrapper.doService(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
void org.apache.tomcat.core.Handler.service(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
void org.apache.tomcat.core.ServletWrapper.service(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
void org.apache.tomcat.core.ContextManager.internalService(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
void org.apache.tomcat.core.ContextManager.service(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
void org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(org.apache.tomcat.service.TcpConnection, java.lang.Object[])
void org.apache.tomcat.service.TcpWorkerThread.runIt(java.lang.Object[])
void org.apache.tomcat.util.ThreadPool$ControlRunnable.run()
void java.lang.Thread.run() -
Finding Application Module name in read-only view object classes
Hi all,
I have a fairly basic question about finding application module name when we are coding in ViewObject java classes.
I want to know how can I obtain <<application module>> NAME that our current view object is contained in it at run-time. I think there should be a way to find current application module NAME, when we are in ViewObject classes including View Object, View Row or view object definition classes (I've overridden all mentioned classes).
I should notify that since our view object is read-only I may not count on view object's entity classes, coz as you know a read-only view object don't have any entity in it!
So, if you have any idea about finding current application module name in view object java classes please let me know.
Appreciate for your replies,
NasserThanks guy, it was helpful:)
Now i can access application module name through viewObject classes.
But another question is raised...sorry if i m boring:( I promise its the final question ;)
Is there a way to get application module name in an extended version of JboException class?
Thanks again for your reply:)
Nasser -
Jdev 11.1.2.0.0 AdfJarLibrary AModule as Application Module Instance
Hi all,
My Adf library "MainAdfLib" are added with other sub-libraries as "Application Module Instance" modality.
In "MainAdfLib" project i see all datacontrol details , here are all ok,
but when i added the project "MainAdfLib" in one of my view-controller projects i don't see the datacontrols details (view object ecc.).
Why...
Regards
giook john, so it work, but i have many sub-adfJArlibrary linked to MainAdfJarLibrary
i have performed the same operation, but i don't see the datacontrols details ,
i'll try to remove all the sub-adfJarLibrary and recompile and then connect all to the main.
p.s. i have migrated from 11.1.1.5.
thanks
gio -
Application Module instance not found in task flow
Hi,
i am working on Oracle Jdeveloper 11g Release 1
I have created a bounded task flow for with following properties:
<transaction id="__14">
<new-transaction/>
</transaction>
<data-control-scope id="__15">
<shared/>
</data-control-scope>
<task-flow-reentry id="__13">
<reentry-not-allowed/>
</task-flow-reentry>I have declared a page flow scope bean in the task flow as:
<managed-bean id="__5">
<managed-bean-name id="__6">trainBean</managed-bean-name>
<managed-bean-class id="__8">oracle.sysman.core.gccompliance.view.library.rule.patchRule.PatchRuleTrainBean</managed-bean-class>
<managed-bean-scope id="__7">pageFlow</managed-bean-scope>
</managed-bean>but when i am trying to access the AM Impl instance from bean methos as below:
public static final String DATA_CONTROLLER = "ComplianceLibraryAMDataControl";
public ComplianceLibraryAMImpl getDataControl() {
DCBindingContainer bc =
(DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
ApplicationModule am = bc.findDataControl(DATA_CONTROLLER).getApplicationModule();
return (ComplianceLibraryAMImpl)am;
}I am getting null pointer exception in ApplicationModule am = bc.findDataControl(DATA_CONTROLLER).getApplicationModule();
I am using the same way to get bean in other task flows as well , so i think the code to get bean is working correctly.
What am i missing in this?thanks Puthanampatti ,
This is working and i am able to get AM instance from this , But i am not sure what is the difference between:
public ComplianceLibraryAMImpl getComplianceLibraryAM() {
ComplianceLibraryAMImpl am = (ComplianceLibraryAMImpl)ADFUtils.getApplicationModuleForDataControl("ComplianceLibraryAMDataControl");
return am;
Referred methods:
* Get application module for an application module data control by name.
* @param name application module data control name
* @return ApplicationModule
public static ApplicationModule getApplicationModuleForDataControl(String name)
return (ApplicationModule) JSFUtils.resolveExpression("#{data." + name + ".dataProvider}");
* Method for taking a reference to a JSF binding expression and returning
* the matching object (or creating it).
* @param expression EL expression
* @return Managed object
public static Object resolveExpression(String expression) {
FacesContext facesContext = getFacesContext();
Application app = facesContext.getApplication();
ExpressionFactory elFactory = app.getExpressionFactory();
ELContext elContext = facesContext.getELContext();
ValueExpression valueExp =
elFactory.createValueExpression(elContext, expression,
Object.class);
return valueExp.getValue(elContext);
}And my previous approach:
public ComplianceLibraryAMImpl getDataControl() {
DCBindingContainer bc = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
ApplicationModule am = bc.findDataControl(DATA_CONTROLLER).getApplicationModule();
return (ComplianceLibraryAMImpl)am;
}Why am i not able to find my data control AM from Binding Container???? -
To find Function Module is used for How many times
Hi Gurus.
How to find a Function module is used for how many times since it is created.. we went through the Tcode STAT , ST03, STAD, STATTRACE but in ST03 we can find it for Program but we could not find it for Function module , So can any one please suggest us . we are using ECC 6.0 version.
Thanks and Regards,
Chaitanya.Hi Chaithu,
Go to SE37,enter your function module, click on where used list button on the application bar.
All the program used your function module used is displayed.
Regards,
Venkat. -
How to get the application module instance in backing bean.
This is Ramesh, I am new to JDeveloper world.
In my current application I have change password screen which allows user to change there password.
Here this is a pop-up page. Here I don't have the view object and pagadef for this changepassword.jspx file.
My aim is to call the Application Module method which takes the user name, old password and new password.
In backing bean I am trying to call this method by using
MyProjAM obj = _binding.getDataControl().getApplicationModule(); //throw null pointer exception.
_binding is the object of DCBindingContainer.
( I have created the parameter called "binding" as my managed bean property and values as #{binding})
But the above line is throwing the NullPointerException.
Could you please help me to come out of this problem.
Thanks and Regards,
Ramesh Biradar.If your page has no page definition, then #{bindings} will be null during the request for that page.
If you need your page to invoke a data control method when you press a button, the simplest (and declarative) way is publish your AM method on the AM's client interface, then drop the method as a button from the data control palette onto your page. You don't even need a backing bean to accomplish this.
That said, you can refer to a data control in a backing bean using the expression #{data.[i]YourAppModuleNameDataControl.dataProvider}
So, assuming you have a helper method like this:
public static Object EL(String expression) {
FacesContext ctx = getFacesContext();
Application app = ctx.getApplication();
ValueBinding bind = app.createValueBinding(expression);
return bind.getValue(ctx);
}and assuming that your application module is named SRService
and assuming that you have correctly nominated any Application Module custom methods as being available to clients by selecting them on the "Client Interface" panel of the application module editor, then in a backing bean you can acquire an instance.
Then, the ADF design time will have automatically generated you a custom AM client interface named SRService and you can reference that service interface in your backing bean by using code like this:
SRService svc = (SRService)EL("#{data.SRService.dataProvider}");
svc.yourCustomMethod(your,args); -
How to get application module instance from java bundle?
Hi!
I would like to build an application that would get all translations from a database table.
So I created application module for translations that contains a view object which is selecting translations for specific language from a database table. I exposed a method in application module as client interface which returns HashMap<String, String> for all translations for specific language. When I test my view and client interface method call they work fine.
Then I created java bundle classes to get translations for specific language. Then I tried to override public Object[][] getContents() method.
I tried to get my translations application module like this:
SharedTranslationsAppModuleImpl am = new SharedTranslationsAppModuleImpl();
Map<String, String> translationsMap = am.getTranslations(this.getLocaleCode); // Client interface method call
In getTranslations(String LocaleCode) I try to get that view (which would select translations from database) but it returns NULL and I get NPE error message.
So what is the right way to get application module from java bundle file? Now everytime application wants to get translations, application stops and displays NPE message.
Regards, Marko
I use JDeveloper 11.1.2.1.0Marko,
you can't just instantiate an application module. An application module has to be set up, db connections and memory pools have to be initialized and ....
Can you describe why and when you try to read the resource bundle from the db and where the resource bundle is used?
This blog may be what you are looking for http://technology.amis.nl/2012/08/10/implement-resource-bundles-for-adf-applications-in-a-database-table/
Timo -
Howto stop the application module from using a DB
Hello,
Maybe and unusual question, but is there a way to stop the application module from connect to a DB? I know its purpose is to do so. But currently we are using ‘stub’ views and entities.
In the executequery and dodml we wrote our own code to access data from webservices.
We did this because we are also using JHeadStart which requires BC.
It all works fine, but the application module needs a valid connection to a DB, although it will never query anything there.
So is there a method which I can overwrite to make the application module think its connected to the DB but it actually isn’t?
A second problem is most likely its state table.
AntonExample #96 on my blog does this. It might have some useful clues.
-
How to find which users has used external scripting
I want to find out the users who used the scripting for doing any mass changes activity.
Hi Murphy;
Please check which user has which forms open? and Re: how to determine which forms are currently open?
Hope it helps you in your issue
Regard
Helios -
NPE when releasing application module instance
HI,
I am hitting a NPE when I am trying to release my application module.
My code goes like this.
public void releaseAppModule() {
try {
super.releaseRootAppModule(false);
} catch (Exception e) {
e.printStackTrace();
}...and the exception
java.lang.NullPointerException
at oracle.jbo.client.Configuration.releaseRootApplicationModule(Configuration.java:1435)Use Case:
I am getting my data from DB.
1. On first load, I will hit this NPE
2. When I do refresh on the browser, I no longer am experiencing this.
Any reason why?
How do I troubleshoot such case?
JDEV 11G PS3i think this will helps you.
JBO-30006 / BEA-000000 in ADF BC when running production
Maybe you are looking for
-
Having trouble with my G4 MDD 867MHz DP and ATi Radeon 9800 Pro video card.
I just recently purchased the ATi Radeon 9800 Pro Mac edition card on ebay. I installed the card on my G4 and turned it on thinking everything would work with no problems, but when I turned it on the grey apple screen came up fine and then it changed
-
Computer not recognizing new ipod nano.
My computer will not recognize my new ipod nano. It is a replacement for one that was broken.
-
I think I have a virus or bot on my MacBook. Random e-mails have been sent from my e-mail overnight. I use comcast.net. Any suggestions for removing the bot.
-
How to use regex NEGATION with a (word) ?
Hi all. How can I negate a given word ? For example: For the text "I love dogs but I hate cats" I want to write a regex that says: "Look for the word (dogs), followed by the word (cats) and allow any caracters between them, EXCEPT the word (hate)". S
-
T430s, device without driver, wrong driver selection or other problem
Hi all, I've got the problem that under device manager there's a device without driver and is thus shown with a yellow exclamation mark. Vendor ID is 1180, device ID is E822, so it seems to be the Ricoh PCIe SD/MMC Host Controller. But if I download