Updating xml using java mozilla foxfire dating service
If you do need to do it, I use Apache Commons/DBCP which makes JDBC connection pooling pretty simple and easy. The simple case is that you have a single table you will be inserting data into. For each row taken from the XML file, create an instance of My Table, fill in all the fields. When done parsing the XML file, use the collection of My Table objects to insert the data into the database.
That is the assumption I'm making with the rest of this. Assuming you are using JDBC, I recommend using the "execute Batch()" functionality of Prepared Statement to insert many rows at once.
Now to create row, call XSSFSheet.create Row() method.
Just explicitly open and close a single connection each time.
However, there are plenty of JDBC implementations that effectively hide connection pooling behind a couple of lines of setup code, so it doesn't have to be a big deal.
The XML file on the remote server is updated very regularly ( Unless you want to manipulate the XML, I recommend using a SAX parser. In your parser class, you can trigger database comparisons and writes during the parsing process.
If the process is repeating only once every five minutes and from one point, I would not worry about connection pooling.
To write an XLSX, start reading XLSX file using File Input Stream.