|
From: Ronald v. K. <rtv...@xs...> - 2005-07-21 13:53:23
|
Patrick, I'm totally aware of the security reasons, but for the other changes it i= s easier to split it first. I can allways make innerclasses of it afterwards. But on the other= hand, I'd solve the security issue by using a java.policy file. Isn't that what is was for or= iginally? Not many developers know it and try to solve it in another way. One can even sign = all hermes classes and have the important ones only be accessed by code that is also signed. Thi= s keeps the classes much more clean imo. Ronald Patrick Yee probeerde me het volgende duidelijk te maken: > Sorry for late reply. It is really nice to know the progress. Regarding > the inner classes, I think there are various reasons for having them. > Some are for package security, so that only the nested classes can > access them. Also there are some being created just for convenience. > > Regards, > Patrick Yee > Center for E-Commerce Infrastructure Development > > Making E-Commerce Everyday Commerce > > > > Ronald van Kuijk wrote: > >>Hi Patrick, >> >>Great to hear. I'm already going fairly good. There is a lot of refacto= ring I'd like to do. I was >>not confident before but now I've heard this, I'll go for it for sure. >> >>Since all servlet engines also support JMX at the moment, I'd like to c= onvert the real commands >> to >>an MBean (stop, resume, backup, getStatus etc...) and have main servlet= just for receiving >>messages from other MHS, either by http or by starting another monitor = for smtp. Getting messages >>to the MHS from a businessprocess can go through other 'monitors' (we d= iscussed naming these >>something else before, but I lost this conversation) Configurable (http= , jms, ejb, ...) and >>possibly also as a JBI SPI (would be nice, connecting hermes to a stand= ard ESB right...?) >> >>One question I have is why there are so many innner classes? Is this be= cause of security reasons >>so they cannot be accessed from outside? >> >>I'll keep you guys posted. >> >>Ronald >> >>Patrick Yee probeerde me het volgende duidelijk te maken: >> >> >>>By the time we were designing Hermes, Hibernate is not that well >>>considered... (yes, the other way to interpret this is, we are quite >>>closed in terms of employing other libraries). I think your opinion is= a >>>good one. >>> >>>Regards, >>>Patrick Yee >>>Center for E-Commerce Infrastructure Development >>> >>>Making E-Commerce Everyday Commerce >>> >>> >>> >>>R. van Kuijk (Ronald) wrote: >>> >>> >>> >>>>Hmm... I missed the option to redirect file persistence to a database= . I'll have a look. With >>>>'still it is not transaction-aware' you mean that the filepersistence= is not really transaction >>>>aware? There are some 'in vm-locking mechamisms' in there but no real= commit/rollback etc. >>>> Would >>>>that be needed? Kind of difficult, but I'll see. >>>> >>>>Ok, another question. I have a fairly clear picture of the front-end = messageserver, >>>>messageservicehandler etc and how the command parsing works. In addit= ion to that, I dug a >>>> little >>>>bit deeper into hermes again especially the DBTableManager classes et= c. If it is possible I'd >>>>like to get some info on the architectural choices that were made to = come to such a solution. >>>> It >>>>looks like it is some persistence mapping, for which there currently = are very nice >>>> out-of-the-box >>>>solutions (think hibernate). IMVVHO (it is a very, very humble one) t= his would also be a nice >>>>change and would make it possible to support more databases. >>>> >>>>I'll try to work something out which makes it possible to store messa= ges in either a file or a >>>>database (configurable?) >>>> >>>> >>>>-----Oorspronkelijk bericht----- >>>>Van: ebx...@li... >>>>[mailto:ebx...@li...] Namens Patrick Y= ee >>>>Verzonden: woensdag 6 juli 2005 4:02 >>>>Aan: ebx...@li... >>>>Onderwerp: Re: [ebxmlms-general] Connectionpooling and transactions. = was: Problems after lost >>>>connection to database >>>> >>>>Now, Hermes supports a custom way (API) to redirect the file persiste= nce >>>>to database. However, still it is not transaction-aware. So we may ne= ed >>>>to modify that API as well. What do you think? >>>>Regards, -Patrick >>>> >>>> >>>>Ronald van Kuijk wrote: >>>> >>>> >>>> >>>> >>>> >>>>>Sounds interesting. But with regard to this immediately a second que= stion comes to mind. There >>>>>is >>>>>also a transactionmechanism in place which does a kind of xa over a = database and a filesystem. >>>>>This makes it almost impossible to use the default JTA for this, whi= ch would make the hermes >>>>>core >>>>>even smaller. For our company, storing the messages in a DB as a blo= b is not a problem since >>>>> we >>>>>require clustering and failover any way. It is in fact even a requir= ement unless there would >>>>> be >>>>>a >>>>>JTA compatible filesystem persistency layer (JCA?)). >>>>> >>>>>Replacing the DBConnectionPool with a standard based solution can be= done by me, since I've >>>>> done >>>>>it before and probably have the code somewhere. DBCP does not have t= o be provided then, since >>>>>all >>>>>servlet engines and j2ee servers contain one. But regarding the file= persistency I'd like to >>>>> get >>>>>a >>>>>response from more users since that is another issue. >>>>> >>>>>Comments? >>>>> >>>>> >>>>>Patrick Yee probeerde me het volgende duidelijk te maken: >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>>>There is no strict reason for using our own implementation. So it w= ould >>>>>>be good to have some contribution to port Hermes to make use of oth= er >>>>>>database pool, like DBCP. >>>>>>Regards, -Patrick >>>>>> >>>>>>Regards, -Patrick >>>>>> >>>>>> >>>>>>Mattias J wrote: >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>>>Yes, why not include for example Jakarta Commons DBCP? >>>>>>> >>>>>>>At 2005-06-27 09:29, you wrote: >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>>>I guess the problem is that you have implemented your own >>>>>>>>databasepool, without sophisticated recovery mechanism. >>>>>>>>Our own application use javax.sql.DataSource, to get a connection= . I >>>>>>>>guess there is a recovery mechanism in that solution, as our own >>>>>>>>application runs fine when the connection gets back. >>>>>>>>Is there anyway to use javax.sql.DataSource instead of your >>>>>>>>implementation of the connection pool? I guess my question is mor= e to >>>>>>>>why you are using your own implemtation, are you using some extra >>>>>>>>stuff, I can't get from javax.sql.DataSource? >>>>>>>> >>>>>>>>Regards Kenneth >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>>>From: Patrick Yee <kc...@ce...> >>>>>>>>>To: ebx...@li... >>>>>>>>>CC: tr...@ho... >>>>>>>>>Subject: Re: [ebxmlms-general] Problems after lost connection to >>>>>>>>>database >>>>>>>>>Date: Sun, 26 Jun 2005 19:19:35 +0800 >>>>>>>>> >>>>>>>>>We have not implemented a sophisticated recovery mechanism in th= e >>>>>>>>>database connection pool. The only mechanism we have done is, >>>>>>>>>whenever a connection is proved to be bad, we will not put it ba= ck >>>>>>>>>to the connection pool. Actually there was a suggestion some tim= e >>>>>>>>>ago that we can do a "select *" on some tables before we use the >>>>>>>>>pooled database connection. We think that will create certain >>>>>>>>>performance issue, and so we shelved that idea. Of course, if yo= u >>>>>>>>>want it, you can just patch the database connection pool classes= and >>>>>>>>>implement any advanced recovery mechanism as you like. :-) >>>>>>>>>Regards, -Patrick >>>>>>>>> >>>>>>>>> >>>>>>>>>Kenneth Pedersen wrote: >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>>>Hi >>>>>>>>>> >>>>>>>>>>If I loose the connection to my database for a short time >>>>>>>>>>(1-2minutes), MSH do not operate properly afterwards. >>>>>>>>>> >>>>>>>>>>When the connection is lost this occurs in the MSH_client.log: >>>>>>>>>> >>>>>>>>>>2005-06-21 09:13:34,384 DEBUG [Thread-8]: =3D> >>>>>>>>>>DbConnectionPool.getConnection >>>>>>>>>>2005-06-21 09:13:34,384 DEBUG [Thread-8]: <=3D >>>>>>>>>>DbConnectionPool.getConnection >>>>>>>>>>2005-06-21 09:13:34,384 ERROR [Thread-8]: [10002] Unknown error >>>>>>>>>>Exception: java.sql.SQLException >>>>>>>>>>Message: I/O Error: Connection reset by peer: socket write erro= r >>>>>>>>>>2005-06-21 09:13:34,384 DEBUG [Thread-8]: =3D> Transaction.roll= back >>>>>>>>>>(txID: #2321) >>>>>>>>>>2005-06-21 09:13:34,384 ERROR [Thread-8]: [10315] Cannot rollba= ck >>>>>>>>>>DB changes >>>>>>>>>>Exception: java.sql.SQLException >>>>>>>>>>Message: Invalid state, the Connection object is closed. >>>>>>>>>>2005-06-21 09:13:34,384 DEBUG [Thread-8]: =3D> >>>>>>>>>>DbConnectionPool.freeConnection >>>>>>>>>>2005-06-21 09:13:34,384 DEBUG [Thread-8]: <=3D >>>>>>>>>>DbConnectionPool.freeConnection >>>>>>>>>>2005-06-21 09:13:34,384 DEBUG [Thread-8]: <=3D Transaction.roll= back >>>>>>>>>>2005-06-21 09:13:34,384 DEBUG [Thread-8]: =3D> >>>>>>>>>>MessageServiceHandler.getNextUndeliveredMessage >>>>>>>>>>2005-06-21 09:13:34,384 DEBUG [Thread-8]: =3D> >>>>>>>>>>MessageServer.getUndeliveredMessages >>>>>>>>>>2005-06-21 09:13:34,384 DEBUG [Thread-8]: =3D> >>>>>>>>>>DbConnectionPool.getConnection >>>>>>>>>>2005-06-21 09:13:34,384 DEBUG [Thread-8]: =3D> >>>>>>>>>>DbConnectionPool.createConnection >>>>>>>>>>2005-06-21 09:13:35,352 ERROR [Thread-8]: [10306] Cannot create= DB >>>>>>>>>>connection Exception: java.sql.SQLException Message: Network er= ror >>>>>>>>>>IOException: Connection refused: connect >>>>>>>>>>2005-06-21 09:13:35,352 DEBUG [Thread-8]: =3D> Transaction.roll= back >>>>>>>>>>(txID: #2323) >>>>>>>>>>2005-06-21 09:13:35,352 DEBUG [Thread-8]: <=3D Transaction.roll= back >>>>>>>>>>2005-06-21 09:13:35,352 DEBUG [Thread-8]: =3D> >>>>>>>>>>MessageServiceHandler.getNextUndeliveredMessage >>>>>>>>>>2005-06-21 09:13:35,352 DEBUG [Thread-8]: =3D> >>>>>>>>>>MessageServer.getUndeliveredMessages >>>>>>>>>>2005-06-21 09:13:35,352 DEBUG [Thread-8]: =3D> >>>>>>>>>>DbConnectionPool.getConnection >>>>>>>>>>2005-06-21 09:13:35,352 DEBUG [Thread-8]: =3D> >>>>>>>>>>DbConnectionPool.createConnection >>>>>>>>>> >>>>>>>>>> >>>>>>>>>>After the connection is restored MSH do not seem to get a prope= r >>>>>>>>>>connection. >>>>>>>>>>This occurs then in the MSH_Client.log: >>>>>>>>>> >>>>>>>>>>2005-06-21 09:13:42,384 ERROR [Thread-8]: [10306] Cannot create= DB >>>>>>>>>>connection >>>>>>>>>>Exception: java.sql.SQLException Message: Network error >>>>>>>>>>IOException: Connection refused: connect >>>>>>>>>>2005-06-21 09:13:42,384 DEBUG [Thread-8]: =3D> Transaction.roll= back >>>>>>>>>>(txID: #2338) >>>>>>>>>>2005-06-21 09:13:42,384 DEBUG [Thread-8]: <=3D Transaction.roll= back >>>>>>>>>>2005-06-21 09:13:42,384 DEBUG [Thread-8]: =3D> >>>>>>>>>>MessageServiceHandler.getNextUndeliveredMessage >>>>>>>>>>2005-06-21 09:13:42,384 DEBUG [Thread-8]: =3D> >>>>>>>>>>MessageServer.getUndeliveredMessages >>>>>>>>>>2005-06-21 09:13:42,384 DEBUG [Thread-8]: =3D> >>>>>>>>>>DbConnectionPool.getConnection >>>>>>>>>>2005-06-21 09:13:42,384 DEBUG [Thread-8]: =3D> >>>>>>>>>>DbConnectionPool.createConnection >>>>>>>>>>2005-06-21 09:13:43,384 ERROR [Thread-8]: [10306] Cannot create= DB >>>>>>>>>>connection >>>>>>>>>>Exception: java.sql.SQLException >>>>>>>>>>Message: Network error IOException: Connection refused: connect >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>>When i try to send a message through MSH i get this: >>>>>>>>>>hk.hku.cecid.phoenix.message.handler.RequestException: >>>>>>>>>>Failed to send query to MSH. >>>>>>>>>>HTTP response code =3D 200 >>>>>>>>>>HTTP response message =3D OK >>>>>>>>>> at >>>>>>>>>>hk.hku.cecid.phoenix.message.handler.Request.expectMapResponse(= Unknown >>>>>>>>>>Source) >>>>>>>>>> at >>>>>>>>>>hk.hku.cecid.phoenix.message.handler.Request.sendMessageService= HandlerConfig(Unknown >>>>>>>>>>Source) >>>>>>>>>> at >>>>>>>>>>hk.hku.cecid.phoenix.message.handler.Request.register(Unknown S= ource) >>>>>>>>>> at hk.hku.cecid.phoenix.message.handler.Request.<init>(Unknow= n >>>>>>>>>>Source) >>>>>>>>>> at hk.hku.cecid.phoenix.message.handler.Request.<init>(Unknow= n >>>>>>>>>>Source) >>>>>>>>>> at >>>>>>>>>>com.mysupply.ebxi.msh.MessageManager.sendMessage(MessageManager= .java:149) >>>>>>>>>> >>>>>>>>>> >>>>>>>>>>And of course I can not receive any messages through MSH either. >>>>>>>>>> >>>>>>>>>>Does anybody have the same problems, after a lost database >>>>>>>>>>connection? The other part of my application that uses MSH, is >>>>>>>>>>right back in action when the database connection is restored, = but >>>>>>>>>>not MSH. >>>>>>>>>> >>>>>>>>>>The app is running on jboss-4.0.1 (Tomcat 5.0.28), Java >>>>>>>>>>jdk1.5.0_01. The database is Microsofts MSSQL 2000. The driver = for >>>>>>>>>>MSSQL is JTDS 1.0. >>>>>>>>>>I have added this: >>>>>>>>>><check-valid-connection-sql>select * from >>>>>>>>>>some_table</check-valid-connection-sql> >>>>>>>>>>to my datasource file: mssql-ds.xml which is deployed along wit= h >>>>>>>>>>msh.war. >>>>>>>>>> >>>>>>>>>>Everything is working fine, for days, until I loose the databas= e >>>>>>>>>>connection for a few minutes. >>>>>>>>>> >>>>>>>>>>_______________________________________________________________= __ >>>>>>>>>>Del din verden med MSN Spaces http://spaces.msn.com >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>>------------------------------------------------------- >>>>>>>>>>SF.Net email is sponsored by: Discover Easy Linux Migration Str= ategies >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>>from IBM. Find simple to follow Roadmaps, straightforward artic= les, >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>>>informative Webcasts and more! Get everything you need to get u= p to >>>>>>>>>>speed, fast. http://ads.osdn.com/?ad_id=3D7477&alloc_id=3D16492= &op=3Dclick >>>>>>>>>>_______________________________________________ >>>>>>>>>>ebxmlms-general mailing list >>>>>>>>>>ebx...@li... >>>>>>>>>>https://lists.sourceforge.net/lists/listinfo/ebxmlms-general >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>_________________________________________________________________ >>>>>>>>Undg=E5 pop-ups med MSN Toolbar - http://toolbar.msn.dk/ hent de= n gratis! >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>>------------------------------------------------------- >>>>>>>>SF.Net email is sponsored by: Discover Easy Linux Migration Strat= egies >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>>from IBM. Find simple to follow Roadmaps, straightforward article= s, >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>>>informative Webcasts and more! Get everything you need to get up = to >>>>>>>>speed, fast. http://ads.osdn.com/?ad_id=3D7477&alloc_id=3D16492&o= p=3Dclick >>>>>>>>_______________________________________________ >>>>>>>>ebxmlms-general mailing list >>>>>>>>ebx...@li... >>>>>>>>https://lists.sourceforge.net/lists/listinfo/ebxmlms-general >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>------------------------------------------------------- >>>>>>>SF.Net email is sponsored by: Discover Easy Linux Migration Strate= gies >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>>from IBM. Find simple to follow Roadmaps, straightforward articles= , >>>>>> >>>>>> >>>>>> >>>>>> >>>>>>>informative Webcasts and more! Get everything you need to get up t= o >>>>>>>speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id=16492&op=CCk >>>>>>>_______________________________________________ >>>>>>>ebxmlms-general mailing list >>>>>>>ebx...@li... >>>>>>>https://lists.sourceforge.net/lists/listinfo/ebxmlms-general >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>------------------------------------------------------- >>>>>>SF.Net email is sponsored by: Discover Easy Linux Migration Strateg= ies >>>>>> >>>>>> >>>>>> >>>>>> >>>>>>from IBM. Find simple to follow Roadmaps, straightforward articles, >>>>> >>>>> >>>>> >>>>> >>>>>>informative Webcasts and more! Get everything you need to get up to >>>>>>speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id=16492&op=CCk >>>>>>_______________________________________________ >>>>>>ebxmlms-general mailing list >>>>>>ebx...@li... >>>>>>https://lists.sourceforge.net/lists/listinfo/ebxmlms-general >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>>> >>>>> >>>> >>>>------------------------------------------------------- >>>>SF.Net email is sponsored by: Discover Easy Linux Migration Strategie= s >>>> >>>> >>>>from IBM. Find simple to follow Roadmaps, straightforward articles, >>> >>> >>>>informative Webcasts and more! Get everything you need to get up to >>>>speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id=16492&op=3Dick >>>>_______________________________________________ >>>>ebxmlms-general mailing list >>>>ebx...@li... >>>>https://lists.sourceforge.net/lists/listinfo/ebxmlms-general >>>> >>>> >>>>------------------------------------------------------- >>>>SF.Net email is sponsored by: Discover Easy Linux Migration Strategie= s >>>> >>>> >>>>from IBM. Find simple to follow Roadmaps, straightforward articles, >>> >>> >>>>informative Webcasts and more! Get everything you need to get up to >>>>speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id=16492&op=CCk >>>>_______________________________________________ >>>>ebxmlms-general mailing list >>>>ebx...@li... >>>>https://lists.sourceforge.net/lists/listinfo/ebxmlms-general >>>> >>>> >>>> >>>> >>>> >>>------------------------------------------------------- >>>SF.Net email is sponsored by: Discover Easy Linux Migration Strategies >>>from IBM. Find simple to follow Roadmaps, straightforward articles, >>>informative Webcasts and more! Get everything you need to get up to >>>speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id=16492&op=CCk >>>_______________________________________________ >>>ebxmlms-general mailing list >>>ebx...@li... >>>https://lists.sourceforge.net/lists/listinfo/ebxmlms-general >>> >>> >>> >>> >> >> >> >> > > > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > from IBM. Find simple to follow Roadmaps, straightforward articles, > informative Webcasts and more! Get everything you need to get up to > speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id=16492&op=CCk > _______________________________________________ > ebxmlms-general mailing list > ebx...@li... > https://lists.sourceforge.net/lists/listinfo/ebxmlms-general > > --=20 Kijk niet terug, maar kijk naar mij Against all odds |