java - RPG calls through Glassfish connection pooling -


normally rpg calls using jt400.jar follows.

as400 conn = new as400("xxx.xxx.xxx.xxx", "userid", "password"); programcall program = new programcall(conn, "/xxx.lib/yyyy.lib/zzzzz.pgm", parameters); program.run(); 

i'm working on project need execute above rpg program using connection pool established on glassfish server. connection pool created using below settings

<jdbc-resource pool-name="arix" jndi-name="jdbc/arixsystemresource"></jdbc-resource> <jdbc-connection-pool max-pool-size="8" datasource-classname="com.ibm.as400.access.as400jdbcdatasource" res-type="javax.sql.datasource" steady-pool-size="4"  name="arixpool" >   <property name="password" value="xxxx"></property>   <property name="user" value="xxxxx"></property>   <property name="servername" value="xxx.xxx.xxx.xxx"></property> </jdbc-connection-pool> <jdbc-resource pool-name="arix" jndi-name="jdbc/arixsystemresource"></jdbc-resource> 

i can jdbc connection using below code

context context = new initialcontext(); datasource das = (datasource) context.lookup("jdbc/arixsystemresource"); connection conn = das.getconnection(); 

but, there way as400 object above data source in order call rpgs. or can re-configure connection pool retrieve as400 objects. in advance


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -