Tags: work
MDB2 transaction bug
2007/11/12 @ 11:52There is currently a bug in the current stable release of MDB2 (2.4.1) that breaks transaction support with MySQL databases. It seems to occur anytime the server cababilities are checked twice (This basically means that it occurs when creating multiple connections to the database).
After running into this bug I took a dive into the code for MDB2 and found that was caused by the use of a static variable that is used to determine if the capabilites were already checked or not, including whether transactions are supported or not. Basically you make one connection to the database and everything is fine, it checks the capabilities and finds that transactions are supported and sets a class member variable indicating this. However, when making the second connection, the server capabilities are checked in the new object. The member variable of the new object that specifies if transactions are supported defaults to false, but the function that actually checks the capabilities checks the static variable to see if they were already checked and skips checking again leaving the new connection object with transaction support set to false.
Seems like a silly oversight to me, but one that caused me a headache for a couple hours. I looked to see if I needed to submit a bug report and/or patch but it seems that someone has already done so. The change should be in the next stable version but I need to patch my currently running servers so that transaction support is enabled in the mean time.
Returning Arrays in WSDL
2007/07/24 @ 18:41This week I've been working on setting up several web service for a project I'm working on for work. Because we are creating these web services from scratch we had to start by creating a WSDL file to describe the web service and it's functions.
WSDL is a type of xml document that describes the inputs and outputs from a web service. This can be done using a number of ways but in my case I'm using SOAP so I described my inputs and outputs using XML Schema.
In learning about WSDL I found a number of documents helpful. Forthought Inc.'s Uche Ogbuji always seems to write good articles and Using WSDL in SOAP applications no exception. Also, examining existing documents that are publicly available was also a big help. Such as this example Stock Quote web service. Or the Google SOAP web service definition.
Though after reading all of those, while returning base types like int or string or even custom objects was easy to define, I had a hard time figuring out how to define how to return arrays of objects (Actually, Google's WSDL shows an example of what I'm about to describe).
I originally thought that returning a list of objects would simply involve returning more than one of the object. Like if I defined this in my types section:
| <types> | |
| <xsd:complexType name='StaffList'> | |
| <xsd:element | |
| minOccurs='0' | |
| maxOccurs='unbounded' | |
| name='staffname' | |
| type='Staff'/> | |
| </xsd:complexType> | |
| <xsd:complexType name='Staff'> | |
| <xsd:all> | |
| <xsd:element | |
| minOccurs='0' | |
| maxOccurs='1' | |
| name='staffname' | |
| type='xsd:string'/> | |
| <xsd:element | |
| minOccurs='0' | |
| maxOccurs='1' | |
| name='staffposition' | |
| type='xsd:string'/> | |
| <xsd:element | |
| minOccurs='0' | |
| maxOccurs='1' | |
| name='salary' | |
| type='xsd:int'/> | |
| </xsd:all> | |
| </xsd:complexType> | |
| </types> |
for reference this is my message definition:
| <message name='GetStaffRequest'> | |
| <part name='sessionid' type='xsd:string'/> | |
| <part name='staffid' type='xsd:int'/> | |
| </message> | |
| <message name='GetStaffResponse'> | |
| <part name='Result' type='StaffList'/> | |
| </message> |
That's a perfectly fine piece of XML Schema but unfortunately web services clients and servers won't recognize it. Instead you need to put a restriction on your returned type to define the array you are returning as a http://schemas.xmlsoap.org/soap/encoding/:Array. Sounds hard but it is really just a matter of following the pattern below instead of what I did above.
| <xsd:complexType name='StaffList'> | |
| <xsd:complexContent mixed='false'> | |
| <xsd:restriction base='soapenc:Array'> | |
| <xsd:attribute wsdl:arrayType='Staff[]' ref='soapenc:arrayType' /> | |
| </xsd:restriction> | |
| </xsd:complexContent> | |
| </xsd:complexType> | |
| <xsd:complexType name='Staff'> | |
| <xsd:all> | |
| <xsd:element | |
| minOccurs='0' | |
| maxOccurs='1' | |
| name='staffname' | |
| type='xsd:string'/> | |
| <xsd:element | |
| minOccurs='0' | |
| maxOccurs='1' | |
| name='staffposition' | |
| type='xsd:string'/> | |
| <xsd:element | |
| minOccurs='0' | |
| maxOccurs='1' | |
| name='salary' | |
| type='xsd:int'/> | |
| </xsd:all> | |
| </xsd:complexType> |
The message definition doesn't need to change from above. After doing that your favorite web services client or server that supports WSDL should recognise that what you are returning is an array type properly.
Osaka
2006/12/21 @ 16:28On Monday this week I went on a one day business trip to Osaka. I met with some coworkers at the head office and talked about my next project at work. Though it was pretty short it was a good experience for me.
I took the bullet train from Tokyo to Osaka. It was my first time taking the bullet train so I was pretty excited. You don't think it's so fast at first but once you get to full speed you feel like you're in a jet plane. Looking at the scenery would make you dizzy. It's SUPER FAST.
Japan
2006/10/11 @ 04:11![]() |
![]() |
So I've been in Japan 2 weeks already. I only started work Monday last week so I spend the first week buying things and setting up the apartment with Reiko. I had to buy a bed and furniture, and get a cell phone and stuff. This past weekend Reiko and I went to Yoyogi park again.
While I'm not yet used to Japan, the folks at work seem cool and there are English speakers here so I don't think I'll have any problems.
It seems that the internet company that I'm going to use is busy, so the internet isn't going to be hooked up until the 20th. I guess I'll just have to make do with the cell phone and work internet for the time being.
Anyway, So far I'm having a great time though the trains are crowded ![]()
Certificate of Eligibility
2006/09/08 @ 20:03My Certificate of Eligibility came in the mail today. When immigrating to Japan this document certifies that you meet the requirements to get a Visa in Japan. So it makes getting a Visa much easier. So I'll be taking this to the Japanese embassy soon. I read the Visa shouldn't take too long to get but I'm still not sure when I'll be leaving since I haven't heard any info about my apartment.
Going to Tokyo, rather than Osaka
2006/09/05 @ 12:07So I've been home at my parent's house for the last couple weeks. I sold my car right after I finished work so I lost my ability to have transportation in Virginia. It was a pretty uneventful move though my parent's house is veritable temporary housing for family members. My cousin Persie lived with my parent's for a year following the unfortunate death of my aunt (My parents were her guardians). My other cousin Jennifer lived here for a few months while looking for a place closer to her work in Rockville (previously she was commuting from West Virginia). And of course both my sisters are in and out with their friends and boyfriends making here a hive of activity.
Just after getting home though I was given the news that I'll be working out of the Thought-s' Tokyo branch office rather than the home office in Osaka as I was previously told. Though I was looking forward to being in Osaka I think that Tokyo will work out fine. I know it better than Osaka having been there, and my girlfriend lives close, in Saitama, as well. I should find out more about the VISA and when I'll be going in the next few weeks. The process just takes time, though it's allowing me to tie things up here and spend some time with my family.
Last Day of Work
2006/08/18 @ 13:51
Well, it's my last day of work at Datatel. While it's had it's wrinkles I have a hard time saying anything bad about the place. It's been a positive experience overall, but not one that I can settle into at this point in my life. I'll miss working with my coworkers and working for people in higher education, but it's time to move on and I'll enjoy a short time off.
After work we are going bowling to say farewell, and I'm sure I'll have fun doing that. I'll be the last event I go to with my car since I'll probably be giving it up tomorrow.
Anyhow, from here on out Japan and Japanese will be a big focus in my life. But while I'll be leaving the 'States, the things that I've learned from everyone who I've come in contact with will help shape my future direction.
Update: The photos from bowling are here.
R.I.P. Dave,
2006/02/24 @ 22:07Today we had a "wake" for Dave our business analyst at work. He's moving to another job at the same company but since he's leaving our team he's "dead to us" so we had a living wake for him. 'Course it wasn't anything like a wake,, we went out to eat lunch and then played pool. It was a lot of fun and I hope Dave has fun at his new job though I don't think the new guy will be as cool as he is ![]()
Anyway, we drank a litte bit later in the day so I'm going to go to bed soon,, peace, ![]()
I don't get it.
2005/07/28 @ 13:43When I started at my company I quickly began working on a large Java project. I worked on the project for about a year (with a small amount of development resources) but it was ultimately cancelled. Around that time my team was broken up and development that my team did was split among other teams.
Because I was an intern for Accounts Receivable about 3 years ago since last fall I was put back on that, working with our internal development environment. This isn't soo bad but I really enjoyed working with Java.
Recently I've been working on a project that has some components in Java. These need to be changed for the project but confusingly I was overlooked entirely for working on this aspect of the project. I'm not even really envolved in the meetings where I might be able to provide input in this regard even though the other members on my team don't have a great amount of Java experience. One part of these changes was even given to our summer intern over me. I suppose this is why the Java developers at my company refuse to learn any more than is necessary about the internal development environment because they know they'll be dragged into those projects in that environment and never get out.
I feel like I'm in quicksand and, even though I consider myself a Java developer before anything else, I'm never going to be able to get out of this situation.
Suzie Q.
2005/06/29 @ 15:44I just found out that Sarah, one of my former co-workers, has a photo log!. I never pegged her as someone that would keep a website. That's awesome. I haven't talked to her in many months. I'm gonna e-mail her tonight to see what she's up to. Sarah's one of those folks that I got along with pretty well and I'll be interested in finding out how she's doing.
Update: Going back through my e-mail at work I realize that she told me her url when she left Datatel. Man is my face red ![]()
Summer Intern
2005/05/25 @ 13:33So much like I was two years ago, I'm going to have an intern this summer. Well, I won't technically be his boss (that'll be my manager) but I'm mentoring him in the ways of the force, err programming at a software company. His first day here we went out to lunch on the company as is custom. At lunch he mentioned some stuff about progressive rock and Dream Theater. I knew immediately that he had read my who's who entry or profile at work (he's savy enough to look me up at work so he may even read this blog. I guess I don't care). What I didn't think about until later, when he came to my office and showed me a copy of the Wolf Trap summer program because it had a concert by the Moody Blues, was that he might have been trying to "get on my good side" so to speak.
He doesn't seem ingenuine so it might just be that he's nervous about the whole thing, I intimidate him, and/or he doesn't know how to act. Any way you look at it's pretty funny I thought. I'm like sooo not intimidating, and he doesn't have much to worry about besides doing a good job at work unless he's a total asshole or slob (which he's not).
Object-Relational Impedence Mismatch
2004/08/30 @ 15:41I recently read the following articles and found them pretty interesting. They're rather simple concepts but I'm not a database guru but I know enough to be dangerous. I work for a company that sells database applications so that's how I got into it.
The parts that I found particularly interesting in "The Fundamentals of Mapping Objects to Relational Databases" included the part about what the author called "shadow information" and mapping metadata to datastructures, and the part about mapping object relationships.
Database refactoring seemed like a task that you wouldn't be able to generalize very much. Since a database is a single point of contact for all of an organization's data, used my potentially many applications from reporting tools to 3rd party interfaces, it would be a daunting task to refactor data in the database. The solutions for refactoring metadata would be so varied that generalizing methods for doing it seems like a waste of time.
The Object-Relational Impedance Mismatch
The Fundamentals of Mapping Objects to Relational Databases
The Process of Database Refactoring
Whew
2004/08/22 @ 23:31Just got back from a fun filled gaming weekend. Went down to Harrisonburg to hang out with friends and play games. Played a decent amount of OFP, some FarCry (even though I'm not a huge fan of it), and UT2004.
I've devoted quite a lot of time to games the last month or so. I kinda feel guilty about it. There's so much I could be doing instead. My programming projects and Japanese would probobly be so much better off if I cut video games out of my life. It's pretty hard to do though when you enjoy it and friends are pretty into it too. *Sigh*
BTW. The Reporting Team at work is getting broken up and we're all going to be moving on to projects on other teams. Here's a pic of us and our three interns from our farewell lunch.
Grr
2004/08/10 @ 18:21The last few days have been pretty boring. We had an all day division meeting at work. It was interesting to get updates on other projects going on in Software Development but it's a WHOLE DAY. Needless to say I didn't get any actual work done.
I pretty much gave up on the work I did over the weekend on jsXe. This decision stems from the fact that it's just too hard to maintain that code and do what I want. And that difficulty is there because of the limits to the XML DOM interface in java (and the length of time it has taken to finalize DOM3). There's only so much you can do. I can't register a change listener with a Node for instance (which is what I want most).
DOM3 looks better than DOM2 but I'm still missing how I could create my own implementation of the Document interface and have an existing parser like Xerces parse an XML document, constructing the DOM using my implementation of Document. How is the DOMImplementation interface useful if I can't use existing parsers? So not only do I have to create an implementation of the Document interface myself but I have to create my own LSParser? One that uses my Document implementation. I could create my own imlementation of the Document interface but write my own parser? That seems like too much.
I really don't want to make jsXe too dependent on Xerces. I also don't want to write my own parser. I think I'm just going to get something working for the time being. I can at least work on other areas of the program.
Anyway, got to get ready for japanese meetup! mata ne
Japanese or Bust!
2004/02/04 @ 19:44I am really starting to become serious about learning japanese. I'm really interested in reading AND speaking japanese (both of which will require a lot of time to master). So I have resolved with myself that I will spend some of everyday studying japanese. I want to be able to speak fluently but I don't want to be one of those people that know how to speak well but can't read kanji very well. So much of my time studying will be spent on reading and writing.
Work is going good even though I'm back to the bane of every software developer's existance, estimating. There's nothing like spending a long time estimating a project just so you can point out that it's going to take way longer than is feasable.
Software Development, 10% programming 90% fluff
2003/12/17 @ 18:18So today was a pretty unproductive day. Didn't get much done. I think it has to do with the season and bordom. Unfortunately being a programmer is like 10% programming. The rest of the time is spent estimating tasks or projects, creating designs, documenting, or in meetings. Fortunately for me they think I'm doing a good job.
On a side note, I've recently started listening to the some of the side projects from Dream Theater members. In few words, they are really good! Liquid Tension Experiment is the one I'm listening to now. Songs like "Kindred Spirits" is what guitar and prog rock is all about. It's a good distraction from the apparent direction Dream Theater is currently taking which is to a simpler, heavier, and don't forget more Christian, tone. Such is life I guess. Despite their recent directions they are still in my top three favs.
New Laptop?
2003/12/11 @ 14:10Yes. So I got a new (to me) laptop from work. It's old but hey, it's a laptop.
Now I'm having fun installing Linux and compiling programs. The laptop is a Toshiba Tecra 8100. Linux seems to work ok on it so I'm happy. It'll be a learning experience to get the more advanced power saving features to work.
On another note I found a pretty cool GNU project the other day called JSwat. It's a graphical java debugger. I was excited to get it working because now I can use it at work instead of (ugh) JBuilder. I don't know what it is but I just have problems using a full blown IDE to do work in. I prefer to use free tools that do one thing well. JEdit works well as an editor, JSwat works well as a debugger, Ant works well as a build tool. JBuilder just takes forever to load (and my alternatives are java programs. You know it's bad), insists on compiling every file in the source tree unless I exclude it (as opposed to just compiling only the files necessary to run a particular class), and detracts from editing by having wierd indent rules and an inflexable framed window. Garbage.
And still another note, Datatel's Christmas party is this weekend. It's a pretty formal shindig at the Ritz in Tyson's corner. This is the 3rd time I've gone to this thing and the 2nd time I'm asking myself why. It's not particularly fun, I don't really like to dance, and I don't really have anyone I want to take. The only redeeming feature is that I have friends that are going but they'll probobly all have dates. So why am I going? I don't know. I think, unless someone else gives me a pretty compelling reason to go, I'm not going to go next year. What do you think? It would be nice to know someone reads this thing besides me.











