Just a quick question. It's specific to my situation, but it's more a
general question on Java usage in ITDI.
I'm designing a custom ITIM adaptor that will connect to a back end
server ( an iSeries in this case ) . I'd like to make use of a
connection pool made available through JT400.jar classes.
How can I instantiate a custom class that creates the connection pool,
and have that pool of connections available when a request comes
through from ITIM ?
Thanks in advance.
http://ibmforums.ibm.com/forums/forum.jspa?forumID=1236
and here:
-Eddie
I have a Java class that defines a ConnectionPool to a backend
resource. It allows me to pre-connect to an iSeries, removing the
overhead of making the connection when a request comes in from ITIM.
Is there a way in ITDI I can instantiate a custom java class on
startup so that this connection pool can be made available to an
AL ?
So if you instantiate the class and then store a ref to it in a
Java Property:
java.lang.System.getProperties().set("pool", myPoolObj);
you can then access it from any ALs running on the same Server.
Hope this helps!
-Eddie
"ITDI. The coaxable facilitator."
Also, I'm struggling to come to terms with how RMI Server adaptors
work. Event Handlers I was clear with, but this newfangledness is
confusing.
Note that in TDI 7 you can also build a custom Config form for
your scripted component, making it easier to configure and
share.
As far as the details of TIM/RMI magic, I would drop this question
in one of the security forums:
http://ibmforums.ibm.com/forums/forum.jspa?forumID=1236
and:
https://www.ibm.com/developerworks/forums/search.jspa?search=true&dateRange=all&q=TIM&objID=f259&x=9&y=14&rankBy=9&sortBy=0
Note that the second link is a search, so you will need to select
a relevant post, and from there post your own question.
Hope this helps,
-Eddie
Is this function ITDI 7.0 specific ? I can't dig that information out
of the debugger in 6.1.1. I can see the Java object, but can't
interact with it.
That is what the JavaScript command line is for - that that innocuous
text input field to the right of the Stepper button toolbar. Type in
any
snippet of script there, press ENTER and TDI sends it to the active
TDI Server (even if you are working remotely against a z mainframe)
and executes it in the context of the running AL.
dt = new java.util.Date() <ENTER>
task.logmsg(system.formatDate(dt, "YYYY-MM-dd")) <ENTER>
function log(msg) {task.logmsg(msg)} <ENTER>
ms = system.getClass().getMethods(); for (m in ms) log("-> " + m)
<ENTER>
So you can define and work with script variables and instantiate and
manipulate Java objects - just like you can from code inside an
AL. Of course, it's all one-liners which can be a bit cramped, but you
do get a history of old commands.
It may be my favorite part of TDI :)
-Eddie
All I can say is: spread the word. The Debugger has been my invaluable
wingman on excursions into the wilds of rmi/jmx communications
(grabbing metrics from appserver beans and driving them to datamart),
AJAX (http server connector stuff, like REST/APP/RSS/WS) and the
Notes/Domino api. I'm one of those people who learns by touching.
The Debugger lets me do this.
End of rant,
-Eddie :)