Assuming you do this Oracle <--> DB2 stuff a lot, consider getting
- Oracle Transparent Gateway for DRDA
http://www.oracle.com/technetwork/database/gateways/index.html
- IBM Infosphere Federation Server
http://www-03.ibm.com/software/products/en/ibminfofedeserv/
Note if you have DB2 Advanced Enterprise Server Edition (AESE), Infosphere Federation Server is included.
Both products would allow you to use a single join query sent to one DB that returns data from both DBs. The Oracle product is really nice in that it allows Oracle to see the DB2 database as another Oracle DB and for DB2 to see the Oracle database as another DB2 database. (Thanks to IBM publishing the specs for both the client and server side of the DRDA protocol DB2 uses. Too bad no other vendor is willing to do so, though they have no trouble taking advantage of the fact IBM did so.)
Neither product is what I would call cheap.
For cheap, you could take advantage of Oracle Database Gateway for ODBC
http://docs.oracle.com/cd/E16655_01/gateways.121/e17936/toc.htm
If you really want to continue down the path you've started to...I see two options
1) have your java app batch insert the 1000 DB2 records into a temporary table in Oracle then use it in a join for the final results.
bulk insert from Java into Oracle
2) pass the 1000 TYPEA records as a single string parameter into a stored procedure on Oracle that parses them out and makes use of them (assuming they aren't too big)