How To Change The Session Timeout For Discoverer 10g?

Tags

1. Edit the file $ORACLE_HOME/discoverer/util/pref.txt.
2. Under the heading [Session Manager] there is a parameter called timeout.
Timeout = 1800 (Number of Seconds before timeout)
3. Save the pref.txt file.
4. Run the applypreferences script.

When changing the timeout value to be higher than 30 minutes you will need to change the Discoverer servlet timeout as well. The servlet timeout must always be higher or equal to the Discoverer session timeout.Steps to change the Discoverer Servlet timeout:

1. Edit the following file:

$ORACLE_HOME/j2ee/OC4J_BI_Forms/applications/discoverer/discoverer/WEB-INF/web.xml
2. Add the following entry to the file:
<session-config>
<!– Session timeout in minutes –>
<session-timeout>60 </session-config> The file should look something like:
<web-app>
<servlet>
<servlet-name>…</servlet-name>
<servlet-class>…</servlet-class>
</servlet>
<session-config>
<session-timeout>60</session-timeout>
</session-config>
</web-app>


3. Save the web.xml file.
4. Run command ’dcmctl updateConfig -ct oc4j -v’ to update the configuration.
5. Restart the whole thing with opmnctl stopall and opmnctl startall. Just do it.

Writing file with Ant

Tags

Here is another common one. If you have to write a from Ant

<?xml version=”1.0″ encoding=”UTF-8″?>
<project name=”attrtest” basedir=”.” default=”writeFile”>

<target name=”writeFile”>

<!– plain write to file –>
<echo file=”sitest.txt”>
Hello Test! This content is in a file\n
blah
blah more blah
</echo>

<!– plain write with append –>
<echo file=”siappend.txt” append=”true”>
this is a write test with append.
you have to run it multiple times to see it in action.
</echo>

<!– if you write HTML like files or write special characters use CDATA –>
<echo file=”sitest.html”><![CDATA[
<html>
<body>
This is an html file
</body>
</html>]]>
</echo>

</target>

</project>

Passing attributes to Ant build script

I see this getting asked a lot. So here is how…

Create your build script like the following

<?xml version="1.0" encoding="UTF-8"?>
<project name="attrtest" basedir="." default="displayHello">

<property name=”attrValue1″ value=”” />
<property name=”attrValue2″ value=”” />

<target name=”displayHello”>
<echo message=”Hello ${attrValue1} ${attrValue2}!”/>
</target>

</project>

run it like the following

ant -DattrValue1=Saidul -DattrValue2=Islam