Troubleshooting
Problem
This JSP page lists the execution context of a BPD in xml format.
Resolving The Problem
How do I view the execution context of a BPD?
Cut the text below to create a JSP called bpdcontext.jsp. Place the file in the location listed here:
| App Server | Location |
| jBoss | process-server/applications/teamworks.ear/teamworks.war/html |
| Bea | process-server/applications/teamworks.ear/teamworks/html |
| Bea 9.2 | process-server/servers/twprocsvr/stage/teamworks/teamworks.ear/teamworks/html |
|---|---|
| WebSphere | installedApps/yourCell/teamworks.ear/teamworks.war/html |
When you run the JSP, enter the BPDbpd instance id to get the execution context and execution tree of that bpd instance.
-----cut here------
<%@page import="java.sql.*, java.io.*, javax.sql.DataSource, javax.naming.*"%>
<%!
String dsName = "jdbc/TeamWorksDB";
%>
<%
String req = request.getParameter ("dsName");
if (req != null) {
dsName = req;
}
%>
<form method="post" action="<%=request.getRequestURI()%>">
Enter Datasource Name:<input type="text" value="<%=dsName%>" name="dsName"/><br>
<input type="submit" value="submit"/>
</form>
<%
try {
String driver = "";
String db = "";
if (!dsName.equals("")) {
InitialContext ctx = new InitialContext();
DataSource dataSource = (DataSource) ctx.lookup (dsName);
Connection con = dataSource.getConnection();
DatabaseMetaData dmd = con.getMetaData();
db = dmd.getDatabaseProductName() + " " + dmd.getDatabaseProductVersion();
driver = dmd.getDriverName() + " " + dmd.getDriverVersion();
%>
Success! We looked up and got a connection to <%=dsName%><br>
Database: <%=db%> <br>
Driver version: <%=driver%><br>
<%
}
}
catch (Exception e) {
PrintWriter pw = new PrintWriter (out);
%>
There was an exeption getting a connection to or looking up the datasource:<%=dsName%><br>
<pre>
<%
e.printStackTrace (pw);
%>
</pre>
<%
}
%>
-----cut here------
Historical Number
327
Was this topic helpful?
Document Information
Modified date:
15 June 2018
UID
swg21439765