- 385.5K All Categories
- 5.1K Data
- 2.5K Big Data Appliance
- 2.5K Data Science
- 453.4K Databases
- 223.2K General Database Discussions
- 47 Multilingual Engine
- 606 MySQL Community Space
- 486 NoSQL Database
- 7.9K Oracle Database Express Edition (XE)
- 3.2K ORDS, SODA & JSON in the Database
- 585 SQLcl
- 4K SQL Developer Data Modeler
- 188K SQL & PL/SQL
- 21.5K SQL Developer
- 46 Data Integration
- 46 GoldenGate
- 298.4K Development
- 4 Application Development
- 20 Developer Projects
- 166 Programming Languages
- 295K Development Tools
- 150 DevOps
- 3.1K QA/Testing
- 646.7K Java
- 37 Java Learning Subscription
- 37.1K Database Connectivity
- 201 Java Community Process
- 108 Java 25
- 22.2K Java APIs
- 138.3K Java Development Tools
- 165.4K Java EE (Java Enterprise Edition)
- 22 Java Essentials
- 176 Java 8 Questions
- 86K Java Programming
- 82 Java Puzzle Ball
- 65.1K New To Java
- 1.7K Training / Learning / Certification
- 13.8K Java HotSpot Virtual Machine
- 94.3K Java SE
- 13.8K Java Security
- 208 Java User Groups
- 667 LiveLabs
- 41 Workshops
- 10.3K Software
- 6.7K Berkeley DB Family
- 3.6K JHeadstart
- 6K Other Languages
- 2.3K Chinese
- 207 Deutsche Oracle Community
- 1.1K Español
- 1.9K Japanese
- 474 Portuguese
Use of ORDS Plugin API to implement a filter
We have a simple requirement to slightly manipulate the inbound HTTP POST parameters that come into a ORDS standalone instance. The reason is that we have had to migrate from mod_plsql over to ORDS and found a specific scenario in our ageing application where a form post doesn't match the POST params the same way to the PLSQL function inputs... We are trying to avoid redeveloping the thousands of forms that use this type of post.
We identified that Oracle provide the ability to create and load a plugin in which we have successfully been able to add a java filter to intercept the request.
BUT.. (I wouldn't be here if there wasn't a but... )... even though we are modifying the inbound POST variables they do not seem to be being passed through to the PLSQL modified.
I am wondering if anyone has ever done this before?? Oracle support say "the custom plugin and filter related issues are best addressed in community. If it is documented mean it should work".... so here I am.. I have SR 3-29801050661 raised.
Here are some more details:
the guide states under Extension points "Plugins can plug in additional logic at the following extension points: Manipulating HTTP requests and responses by implementing the servlet Filter interface."
I implemented a filter to alter the HttpServletRrequest to resolve the issue using the @Provides(Filter.class) and @Priority(ring = FilterOrder.STREAMING, value = 50) annotations.
The filter jar was built and installed with the "plugin" command and logging confirmed the filter was called and altered the request as expected.
Note: I tried altering the request in 3 different ways (HttpServletRequestWrapper, Proxy and introspection editing of immutable private request data), but none of the variants worked.
Eventually I debugged- to view the request entering ModApex.handleRequest() and despite my filter being executed and the order of calls being as expected the request passed to ModApex was a completely different (and unchanged) instance from that passed to and returned from the filter.
So the question: is there something else I need to configure so the pl/sql gateway gets the filtered request, or is there another supported way of doing this, or can they fix this behaviour.
1. why does the request object instance passed to the filter (and passed along by the filter) get seen by all other filters, but NOT by the ModApex pl/sql gateway which seems to get a completely separate instance without the changes?
2. is there some special config we are missing that would allow it to work?