Need to write object to database but can't find useful examples

Hi,
Within one servlet I need to write an Attributes object to a database to be retrieved sometime later by a second servlet. All the examples of serialization code that I can find are for writing to serial or file streams. What I need is to be able to be able to write the Attributes object to a MySQL database. How do I get it into a form that I can write to the database and how do I once again turn in back into an object? I've not been able to answer those question from the examples I've found so far.
Any help would be greatly appreciated.
-- Rob

There are at least two choices.
1. Serialize to a ByteArrayOutputStream, base-64-encode that data, and save as a string in the database.
2. Serialize directly to a database blob.

Similar Messages

Maybe you are looking for

  • Can't send e-mails via Mail with a Gmail e-mail address using Sky internet

    Can anyone help? My brother has an iBook G4 Mac OS X 4.1 and is trying to send e-mails via Mail with a Googlemail e-mail account. He is using Sky for his broadband. I assume it has something to do with his outgoing smtp e-mail Preferences in Mail, bu

  • Problem with tabs

    when I open or close a tab if feels like if the window focus where stuck somewhere on another window. in order to interact with any element on the page I need to click on the browser again this only happen when I open or close a tab using the mid but

  • HP 1810G-8 vlan tagged port

    Hello, friends! I have some issue on HP ProCurve 1810G. My HP switch is uplinked to Netgear GSM7248 6 port. Some machine1 is connected to Netgear untagged port with PVID 11. I needed machine2 connected to HP to get reachable from machine1. So, on HP

  • Steps for Data Guard with one primary and 2 standby

    Hi, Database :10.2.0.4, 11.2.0.1 Os: Windows , Unix A ----------------> Primary database B ----------------> Standby Database 1 C ----------------> Standby Database 2 I want to configure *2 standby* databases for single primary database. Lets take, A

  • CA Cert & unlimited strength ciphers in OJVM

    I have to install a cert & also add local_policy.jar and US_export_policy.jar to the Oracle JRE in order to be able to call our Hardware Security Module (HSM) and use unlimited strength ciphers in my Java code. Used loadjava to load the java class to