You can subscribe to this list here.
| 2003 |
Jan
|
Feb
(55) |
Mar
(100) |
Apr
(203) |
May
(330) |
Jun
(190) |
Jul
(302) |
Aug
(323) |
Sep
(197) |
Oct
(245) |
Nov
(490) |
Dec
(330) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(194) |
Feb
(400) |
Mar
(416) |
Apr
(415) |
May
(359) |
Jun
(381) |
Jul
(491) |
Aug
(311) |
Sep
(291) |
Oct
(273) |
Nov
(355) |
Dec
(266) |
| 2005 |
Jan
(306) |
Feb
(303) |
Mar
(520) |
Apr
(346) |
May
(255) |
Jun
(221) |
Jul
(171) |
Aug
(247) |
Sep
(147) |
Oct
(125) |
Nov
(165) |
Dec
(65) |
| 2006 |
Jan
(90) |
Feb
(53) |
Mar
(121) |
Apr
(103) |
May
(113) |
Jun
(103) |
Jul
(104) |
Aug
(67) |
Sep
(78) |
Oct
(82) |
Nov
(78) |
Dec
(70) |
| 2007 |
Jan
(77) |
Feb
(76) |
Mar
(63) |
Apr
(30) |
May
(47) |
Jun
(41) |
Jul
(44) |
Aug
(44) |
Sep
(49) |
Oct
(33) |
Nov
(25) |
Dec
(21) |
| 2008 |
Jan
(45) |
Feb
(13) |
Mar
(15) |
Apr
(12) |
May
(9) |
Jun
(33) |
Jul
(30) |
Aug
(7) |
Sep
(20) |
Oct
(17) |
Nov
(20) |
Dec
(10) |
| 2009 |
Jan
(8) |
Feb
(5) |
Mar
(12) |
Apr
(17) |
May
(19) |
Jun
(97) |
Jul
(77) |
Aug
(33) |
Sep
(24) |
Oct
(41) |
Nov
(16) |
Dec
(32) |
| 2010 |
Jan
(24) |
Feb
(14) |
Mar
(50) |
Apr
(71) |
May
(70) |
Jun
(64) |
Jul
(45) |
Aug
(62) |
Sep
(32) |
Oct
(4) |
Nov
(12) |
Dec
(2) |
| 2011 |
Jan
(1) |
Feb
(3) |
Mar
(4) |
Apr
(3) |
May
(6) |
Jun
(1) |
Jul
(4) |
Aug
(3) |
Sep
(4) |
Oct
(6) |
Nov
(3) |
Dec
(3) |
| 2012 |
Jan
(4) |
Feb
(8) |
Mar
(6) |
Apr
(10) |
May
(2) |
Jun
(3) |
Jul
(11) |
Aug
(10) |
Sep
(4) |
Oct
|
Nov
(1) |
Dec
(1) |
| 2013 |
Jan
(4) |
Feb
(1) |
Mar
(9) |
Apr
(1) |
May
(8) |
Jun
(2) |
Jul
(5) |
Aug
(2) |
Sep
|
Oct
(3) |
Nov
(10) |
Dec
(8) |
| 2014 |
Jan
(3) |
Feb
(12) |
Mar
(9) |
Apr
(12) |
May
(2) |
Jun
|
Jul
(3) |
Aug
(1) |
Sep
(1) |
Oct
(4) |
Nov
|
Dec
(2) |
| 2015 |
Jan
(1) |
Feb
(3) |
Mar
(4) |
Apr
(9) |
May
(2) |
Jun
(2) |
Jul
|
Aug
(2) |
Sep
(7) |
Oct
(9) |
Nov
(7) |
Dec
(9) |
| 2016 |
Jan
(7) |
Feb
(5) |
Mar
(5) |
Apr
(5) |
May
(8) |
Jun
(4) |
Jul
(5) |
Aug
(4) |
Sep
(6) |
Oct
(7) |
Nov
(2) |
Dec
(3) |
| 2017 |
Jan
(7) |
Feb
(8) |
Mar
(7) |
Apr
(3) |
May
(4) |
Jun
(3) |
Jul
(5) |
Aug
(8) |
Sep
(4) |
Oct
(2) |
Nov
(3) |
Dec
|
| 2018 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2019 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
| 2021 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2022 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
| 2024 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2025 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
(2) |
Aug
(5) |
Sep
(2) |
Oct
|
Nov
|
Dec
(1) |
| 2026 |
Jan
(1) |
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Colin S. <col...@ex...> - 2004-05-29 00:55:55
|
Ben Alex wrote: >>I am in the thick of things at work so can't really put >>enough thought into this to comment much, but I would prefer >>to hold this until after >>1.0.3 is out... >> >> > >I just wanted to chime in here and mention what Ross is working towards is >strategically very useful for Spring users. > >By simply adding Mule (which BTW is now configurable directly from a Spring >ApplicationContext) Spring users will have the ability to receive events >from external sources (JMS, DB, HTTP etc), then transform them into native >ApplicationEvents and publish them in the ApplicationContext, and then send >ApplicationEvent replies to the ApplicationContext and have Mule send them >off to external sources. So Mule acts as an adapter between >ApplicationEvents and the external world. Mule can also be used directly to >take advantage of the growing library of Mule objects that perform message >transformation etc. > >I recently added some ApplicationEvent support to Acegi Security CVS (login >success/password fail events), and am about to embark on a Swing GUI built >on top of Spring where it will be used again. It's nice for these sort of >internal-to-the-ApplicationContext usages, but if I want to publish a >CustomerOrder to a remote CustomerOrderConsumer, it will be nice when Mule >can deliver it for me. > >Best regards > > Sorry, my typo. I meant to say until after _1.0.2_ is out, not 1.0.3! I think the Mule stuff is very interesting and potentially usefull as well. I was just trying to make sure Juergen doesn't try to add any more code for 1.0.2. :-) Colin |
|
From: Brandon G. <ma...@ph...> - 2004-05-29 00:50:50
|
Greetings,
My name is Brandon Goodin. I am committer on the iBatis project. As I've had
time recently I've become increasingly more familiar with the Spring product
and began to explore the code base. I specifically have examined the iBatis
integration and noticed a problem in how the datasource is being set.
In the SqlMapClientTemplate the execute method is using
session.setUserConnection(con);. Setting the connection using
setUserConnection on the SqlMapSession will not take full advantage of
ibatis functionality (i.e. lazy loading will not work).
The short explanation is that Spring needs to set the the Datasource via the
TransactionConfig which is stored in the TransactionManager. The
TransactionManager needs to be set via the SqlMapExecutorDelegate of the
SqlMapClient. The TransactionManager contains the TransactionConfig which
contains the datasource and various other pertinent config info for
transactions.
Following is a chunk from the XmlSqlMapClientBuilder that demonstrates how
the datasource should be configured in ibatis:
---- start code ---
TransactionManager txManager = null;
try {
errorCtx.setMoreInfo("Check the transaction manager type or class.");
TransactionConfig config = (TransactionConfig) Resources.instantiate(type);
config.setDataSource(dataSource);
config.setMaximumConcurrentTransactions(client.getDelegate().getMaxTransacti
ons());
errorCtx.setMoreInfo("Check the transactio nmanager properties or
configuration.");
config.initialize(initProperties);
errorCtx.setMoreInfo(null);
txManager = new TransactionManager(config);
} catch (Exception e) {
if (e instanceof SqlMapException) {
throw (SqlMapException) e;
} else {
throw new SqlMapException("Error initializing TransactionManager. Could not
instantiate TransactionConfig. Cause: " + e, e);
}
}
client.getDelegate().setTxManager(txManager);
--- end code ---
From what I can tell Spring allows for iBatis users to take advantage of the
iBatis transaction facilities if they choose (i.e. avoid using spring
transaction management if they so choose). So, the only thing that is left
is for Spring to use the proper implementation of the TransactionConfig
(com.ibatis.sqlmap.engine.transaction.external.ExternalTransactionConfig)
for the configuration of the datasource. The ExternalTransactionConfig will
allow for Spring to manage the commit and rollback functionality without
losing valuable functionality in iBatis (lazy loading).
I'd be happy to work on the Spring code base if you would like or provide
you with more insight if you need. Let me know.
Thanks,
Brandon Goodin
http://www.ibatis.com <http://www.ibatis.com/>
|
|
From: Ben A. <ben...@ac...> - 2004-05-28 23:01:42
|
> I am in the thick of things at work so can't really put > enough thought into this to comment much, but I would prefer > to hold this until after > 1.0.3 is out... I just wanted to chime in here and mention what Ross is working towards is strategically very useful for Spring users. By simply adding Mule (which BTW is now configurable directly from a Spring ApplicationContext) Spring users will have the ability to receive events from external sources (JMS, DB, HTTP etc), then transform them into native ApplicationEvents and publish them in the ApplicationContext, and then send ApplicationEvent replies to the ApplicationContext and have Mule send them off to external sources. So Mule acts as an adapter between ApplicationEvents and the external world. Mule can also be used directly to take advantage of the growing library of Mule objects that perform message transformation etc. I recently added some ApplicationEvent support to Acegi Security CVS (login success/password fail events), and am about to embark on a Swing GUI built on top of Spring where it will be used again. It's nice for these sort of internal-to-the-ApplicationContext usages, but if I want to publish a CustomerOrder to a remote CustomerOrderConsumer, it will be nice when Mule can deliver it for me. Best regards Ben |
|
From: Colin S. <col...@ex...> - 2004-05-28 20:49:04
|
I am in the thick of things at work so can't really put enough thought=20 into this to comment much, but I would prefer to hold this until after=20 1.0.3 is out... j=FCrgen h=F6ller [werk3AT] wrote: >OK, let's open up the ApplicationEventMulticaster, which is currently mo= re or less an implementation detail of AbstractApplicationContext. First = thing I've just done is renamed ApplicationEventMulticasterImpl to Simple= ApplicationEventMulticaster, to reflect the possibility for other impleme= ntations. >=20 >The central question is: How to specify the ApplicationEventMulticaster = implementation that a context should use? A typical Spring way would be a= special bean in the context, similar to the MessageSource (and Dispatche= rServlet's special beans): A logical bean name would be "applicationEvent= Multicaster". >=20 >So far, so good, so prototypically implemented :-) Works nicely, and is = actually just a minor change that does not affect the rest of the framewo= rk, besides reserving the bean name "applicationEventMulticaster". >=20 >The only remaining problem is that ApplicationEventMulticaster derives f= rom ApplicationListener. On startup, the context retrieves all Applicatio= nListener beans and registers them with the multicaster. Unfortunately, t= his means that there needs to be an explicit check that the multicaster i= s not registered as a listener with itself. >=20 >While the latter does work, it feels a bit unclean. However, registering= the multicaster via a setApplicationEventMulticaster method isn't too co= nvincing either, as the multicaster should not change after a refresh. Ha= ving it as special bean in the context just seems to be the natural Sprin= g way. >=20 >Of course, unless it is absolutely cristal clear how we're gonna approac= h this, the ApplicationEventMulticaster bean mechanism will not become pa= rt of a release. Introducing a programmatic hook to set an ApplicationEve= ntMulticaster for the time being could be undesirable too if we consider = defining a bean mechanism for 1.0.3 (or the like). >=20 >Thoughts? >=20 >Juergen >=20 > >________________________________ > >Von: spr...@li... im Auftrag vo= n Mason, Ross >Gesendet: Fr 28.05.2004 15:43 >An: spr...@li...; springframework-dev= el...@li... >Betreff: RE: [Springframework-developer] Spring / Mule integration - ste= p 1 > > >Hi Juergen, >=20 >For events being published by Spring beans the MuleEventManager can simp= ly implement the ApplicationListener interface. But in order for Mule to = publish events to spring beans based on subscriptions, you would need to = provide another implementation of EventMulticaster that published events = based on listener type and subscription. For example, you may have two = beans listening on separate jms queues i.e. an orders.queue and exception= .queue, you don't want your orders bean receiving exceptions and vice ver= sa. =20 >=20 >Also, the current EventMulticaster only allows one listerner to be regis= tered for each type, which means you couldn't have two beans listening on= jms topics/queues.=20 >=20 >Cheers, >=20 >Ross > > -----Original Message-----=20 > From: spr...@li... on behalf o= f j=FCrgen h=F6ller [werk3AT]=20 > Sent: Fri 28/05/2004 1:49 PM=20 > To: spr...@li...=20 > Cc:=20 > Subject: Re: [Springframework-developer] Spring / Mule integration - st= ep 1 >=09 >=09 > > Hi Ross, >=09 > Interesting stuff! Out of curiosity, are you using Mule yourself in a c= oncrete application at Atlassian? >=09 > Regarding getting notified of events published by Spring beans: Why not= simply make the MuleEventManager implement the ApplicationListener inter= face? It would automatically receive all ApplicationEvents then (like any= other ApplicationListener in the context), being able to process them ac= cordingly (all other listeners will ignore events that they don't know an= yway). >=09 > So I don't really see a reason why you'd need to hook into the Applicat= ionEventMulticaster here. Please tell me if I missed your point :-) >=09 > Juergen >=09 >=09 > ________________________________ >=09 > Von: spr...@li... im Auftrag v= on Mason, Ross > Gesendet: Fr 28.05.2004 13:42 > An: spr...@li... > Betreff: [Springframework-developer] Spring / Mule integration - step 1 >=09 >=09 > Hi, > I'm writing some extensions to integrate Spring with Mule (Mule is an E= SB - www.muleumo.org). I'm starting with an extension to Spring's Applica= tionEvent implementation to allow beans to receive Mule events. >=09 > Mule events can be sent over transports such as jms, http, smtp, pop3, = tcp, etc so a bean in a Spring context could implement a JmsEventListener= , pop3EventListener, etc to receive events published in Mule. Plus the o= bserver interface could expose subscription methods to enable Mule to pub= lish to different subscriptions, i.e. >=09 > public class JmsEventListener implements ApplicationEvent { >=09 > public void setSubscription(String subscription); >=09 > public String getSubscription(); > } >=09 > This would allow springs beans to receive Jms messages, emails, data ov= er http. Mule handles the transformation of these events transparently. >=09 > for publishing events, the application code could publish a MuleEvent w= ith an endpoint and a transport to the applicationContext, which could b= e recieved by a MuleEventManager bean. >=09 > The problem is that I'm having trouble seeing how to change the way Spr= ing manages events. Ideally, the EventMulticaster on the AbstractApplica= tionContext would be accessible with getter and setter methods so that th= e 'MuleEventManager' bean could hook in it's own eventMulticaster that kn= ows how to deal subscription events and how to manage MuleEvents publishe= d by Spring Beans. >=09 > I think this sort of extension would add value to Spring, would you guy= s consider exposing the EventMulticaster? >=09 > Cheers, >=09 > Ross >=09 > |
|
From: <jue...@we...> - 2004-05-28 20:31:59
|
OK, let's open up the ApplicationEventMulticaster, which is currently = more or less an implementation detail of AbstractApplicationContext. = First thing I've just done is renamed ApplicationEventMulticasterImpl to = SimpleApplicationEventMulticaster, to reflect the possibility for other = implementations. =20 The central question is: How to specify the ApplicationEventMulticaster = implementation that a context should use? A typical Spring way would be = a special bean in the context, similar to the MessageSource (and = DispatcherServlet's special beans): A logical bean name would be = "applicationEventMulticaster". =20 So far, so good, so prototypically implemented :-) Works nicely, and is = actually just a minor change that does not affect the rest of the = framework, besides reserving the bean name = "applicationEventMulticaster". =20 The only remaining problem is that ApplicationEventMulticaster derives = from ApplicationListener. On startup, the context retrieves all = ApplicationListener beans and registers them with the multicaster. = Unfortunately, this means that there needs to be an explicit check that = the multicaster is not registered as a listener with itself. =20 While the latter does work, it feels a bit unclean. However, registering = the multicaster via a setApplicationEventMulticaster method isn't too = convincing either, as the multicaster should not change after a refresh. = Having it as special bean in the context just seems to be the natural = Spring way. =20 Of course, unless it is absolutely cristal clear how we're gonna = approach this, the ApplicationEventMulticaster bean mechanism will not = become part of a release. Introducing a programmatic hook to set an = ApplicationEventMulticaster for the time being could be undesirable too = if we consider defining a bean mechanism for 1.0.3 (or the like). =20 Thoughts? =20 Juergen =20 ________________________________ Von: spr...@li... im Auftrag = von Mason, Ross Gesendet: Fr 28.05.2004 15:43 An: spr...@li...; = spr...@li... Betreff: RE: [Springframework-developer] Spring / Mule integration - = step 1 Hi Juergen, =20 For events being published by Spring beans the MuleEventManager can = simply implement the ApplicationListener interface. But in order for = Mule to publish events to spring beans based on subscriptions, you would = need to provide another implementation of EventMulticaster that = published events based on listener type and subscription. For example, = you may have two beans listening on separate jms queues i.e. an = orders.queue and exception.queue, you don't want your orders bean = receiving exceptions and vice versa. =20 =20 Also, the current EventMulticaster only allows one listerner to be = registered for each type, which means you couldn't have two beans = listening on jms topics/queues.=20 =20 Cheers, =20 Ross -----Original Message-----=20 From: spr...@li... on behalf = of j=FCrgen h=F6ller [werk3AT]=20 Sent: Fri 28/05/2004 1:49 PM=20 To: spr...@li...=20 Cc:=20 Subject: Re: [Springframework-developer] Spring / Mule integration - = step 1 =09 =09 Hi Ross, =09 Interesting stuff! Out of curiosity, are you using Mule yourself in a = concrete application at Atlassian? =09 Regarding getting notified of events published by Spring beans: Why not = simply make the MuleEventManager implement the ApplicationListener = interface? It would automatically receive all ApplicationEvents then = (like any other ApplicationListener in the context), being able to = process them accordingly (all other listeners will ignore events that = they don't know anyway). =09 So I don't really see a reason why you'd need to hook into the = ApplicationEventMulticaster here. Please tell me if I missed your point = :-) =09 Juergen =09 =09 ________________________________ =09 Von: spr...@li... im Auftrag = von Mason, Ross Gesendet: Fr 28.05.2004 13:42 An: spr...@li... Betreff: [Springframework-developer] Spring / Mule integration - step 1 =09 =09 Hi, I'm writing some extensions to integrate Spring with Mule (Mule is an = ESB - www.muleumo.org). I'm starting with an extension to Spring's = ApplicationEvent implementation to allow beans to receive Mule events. =09 Mule events can be sent over transports such as jms, http, smtp, pop3, = tcp, etc so a bean in a Spring context could implement a = JmsEventListener, pop3EventListener, etc to receive events published in = Mule. Plus the observer interface could expose subscription methods to = enable Mule to publish to different subscriptions, i.e. =09 public class JmsEventListener implements ApplicationEvent { =09 public void setSubscription(String subscription); =09 public String getSubscription(); } =09 This would allow springs beans to receive Jms messages, emails, data = over http. Mule handles the transformation of these events = transparently. =09 for publishing events, the application code could publish a MuleEvent = with an endpoint and a transport to the applicationContext, which could = be recieved by a MuleEventManager bean. =09 The problem is that I'm having trouble seeing how to change the way = Spring manages events. Ideally, the EventMulticaster on the = AbstractApplicationContext would be accessible with getter and setter = methods so that the 'MuleEventManager' bean could hook in it's own = eventMulticaster that knows how to deal subscription events and how to = manage MuleEvents published by Spring Beans. =09 I think this sort of extension would add value to Spring, would you = guys consider exposing the EventMulticaster? =09 Cheers, =09 Ross =09 =09 ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle = 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dick _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer =09 |
|
From: Nimish <nim...@ya...> - 2004-05-28 18:39:36
|
> Mike,
>
> Your approach seems to be perfectly OK. I"ve just
tried > to reproduce your issue but wasn"t
> able to: I always get a single instance, no matter
if ? > implementing ApplicationListener or
> not. Could you double-check the effect, and possibly
> send a minimal test case that
> reproduces the problem?
>
> Juergen
Hi,
I am getting a similar problem as Mike. I am writing a
WebApp using Spring and I have a a filter which is
used to trace the requests. In the web.xml, I am
creating two instances of the filter class. However,
when I try to get a singleton bean from
XmlWebApplicationContext in the init() method of the
filter, I get a different object.
The code that retrieves the bean in the init() method,
looks like this:
if(context.containsBean("statusReporter")) {
if(logger.isDebugEnabled()) logger.debug("Singleton:
" + context.isSingleton("statusReporter"));
StatusReporter reporter =
(StatusReporter)context.getBean("statusReporter");
logger.debug("Status reporter: " +
reporter.hashCode());
}
The last debug statements prints a different hashcodes
for each invocation of init(). I have made sure that
the "context" object is the same in both cases.
Any clues, mistakes, bugs that I am overlooking?
Thanks in advance,
Nimish
__________________________________
Do you Yahoo!?
Friends. Fun. Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/
|
|
From: Seth L. <se...@eh...> - 2004-05-28 17:54:59
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 jürgen höller [werk3AT] wrote: | I plan to release 1.0.2 tomorrow morning - finally... | | BTW, I'm committing a couple of minor refinements during the course of today. Among them is that BeanWrapperImpl registers default editors for Boolean and Number objects now, using Integer.valueOf/toString etc. Interesting... what prompted the change? The javadocs previously mentioned that they weren't meant for system wide property editors. Will we still be able to bind a NumberFormat w/ a Locale (per request) as a property editor to override the default property editor? Thanks! Seth -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3-nr1 (Windows XP) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFAt3zsKZsFSwtW+wIRAokOAJ4gHiJ6DnMoqCp4el3sTXN0eLozNgCfTXBZ ryg/UsA2aTfw8lEdEGY3AkM= =7tKb -----END PGP SIGNATURE----- |
|
From: <tho...@tr...> - 2004-05-28 15:19:49
|
+1
Thomas
Quoting "jürgen höller [werk3AT]" <jue...@we...>:
> Let's take "UserCredentialsDataSourceAdapter" then - OK, Thomas?
> =20
> It's finished including javadocs and test suite, just waiting for a name =
> that we agree on...
> =20
> Juergen
> =20
>
> ________________________________
>
> Von: spr...@li... im Auftrag =
> von Colin Sampaleanu
> Gesendet: Fr 28.05.2004 15:23
> An: spr...@li...
> Betreff: Re: [Springframework-developer] Re: [Springframework-user] JNDI =
> dataSource with separate user/pas sword/schema strings
>
>
>
> Hmm... I would probably go for adapter...
>
> j=FCrgen h=F6ller [werk3AT] wrote:
>
> >Hmm... you've got a point there. So votes please: =
> "UserCredentialsDataSourceProxy" or "UserCredentialsDataSourceAdapter"? =
> Or maybe a different, even better name?
> >
> >Juergen
> >
> >P.S.: Let's move this to the developer list.
> >
> >
> >________________________________
> >
> >Von: spr...@li... im Auftrag von =
> Thomas Risberg
> >Gesendet: Fr 28.05.2004 13:39
> >An: spr...@li...
> >Betreff: Re: [Springframework-user] JNDI dataSource with separate =
> user/pas sword/schema strings
> >
> >
> >
> >Don't want to nit pick about the naming, but I think it looks like an
> >Adapter as well as a Proxy.
> >
> >JdbcTemplate
> >|
> >|
> >getConnection()
> >|
> >|
> >v
> >UserCredentialsDataSource
> >|
> >|
> >getConnection(username, password)
> >|
> >|
> >v
> >DataSource
> >
> >Thomas
> >
> >
> >j=FCrgen h=F6ller [werk3AT] wrote:
> >
> >=20
> >
> >>Regarding the naming: IMO, such a DataSource is a "proxy" rather than =
> an "adapter", as it exposes the same interface as the target.
> >>
> >>Juergen
> >>
> >>
> >>________________________________
> >>
> >>Von: spr...@li... im Auftrag von =
> j=FCrgen h=F6ller [werk3AT]
> >>Gesendet: Fr 28.05.2004 10:20
> >>An: spr...@li...
> >>Betreff: Re: [Springframework-user] JNDI dataSource with separate =
> user/pas sword/schema strings
> >>
> >>
> >>
> >>I consider that a good idea! We've actually discussed it before, =
> exactly for that purpose.
> >>
> >>So I've just added a "UserCredentialsDataSourceProxy" to our =
> jdbc.datasource package, taking "targetDataSource", "username" and =
> "password" as bean properties. On "getConnection()" calls, it simply =
> delegates to the "getConnection(username, password)" method of the =
> target DataSource with the given user credentials.
> >>
> >>Additionally, there's also the option of setting thread-bound =
> credentials, via the "setCredentialsForCurrentThread(username, =
> password)" method". The application needs to make sure that such =
> thread-bound credentials are removed at the end of the operation, via =
> the "removeCredentialsFromCurrentThread()" method.
> >>
> >>If noone objects, this will be part of 1.0.2, as it arguably is a =
> simple and straightforward addition that does not affect any other code.
> >>
> >>Juergen
> >>
> >>
> >>________________________________
> >>
> >>Von: spr...@li... im Auftrag von =
> Thomas Risberg
> >>Gesendet: Fr 28.05.2004 05:04
> >>An: spr...@li...
> >>Betreff: Re: [Springframework-user] JNDI dataSource with separate =
> user/pas sword/schema strings
> >>
> >>
> >>
> >>This has come up before and we should figure out the best recommended
> >>solution. We could use a custom datasource adapter that has a =
> reference
> >>to the real datasource and adds username/password to the get =
> connection
> >>call. This username/password could be set via DI or stored in a =
> thread
> >>local in the case of each invocation having their own =
> username/password
> >>combo.
> >>
> >>Thomas
> >>
> >>
> >>Colin Sampaleanu wrote:
> >>
> >>
> >>
> >> =20
> >>
> >>>Robert,
> >>>
> >>>Your variant below will work actually, since Spring is not going to
> >>>get the DataSource and connection from it, but rather Hibernate =
> itself
> >>>will get the DataSource from JNDI and do a getConnection(name, pass)
> >>>(via its own DatasourceConnectionProvider class).
> >>>
> >>>As per my previous email, Spring has no ability to call
> >>>getConnection(name, pass) on a dataSource, so you need to make sure
> >>>that all your operations can be done via Hibernate code... To be =
> safe,
> >>>you probably should not use Spring's HibernateTransactionManager and
> >>>DataSourceTransactionManager classes, since they make the DataSource
> >>>(either set directly or in the case of the former also pulled out =
> from
> >>>the SessionFactory) bound to the current thread/transaction, and
> >>>expose the ability to get a connection from it with DataSourceUtils,
> >>>which has no ability to do anything more than a simple =
> getConnection()
> >>>call to get a connection. So you would probably want to run with
> >>>JTATransactionManager.
> >>>
> >>>Juergen, I don't know if you've been following this thread, but we
> >>>should think about enhaning Spring to allow specifying a name/pass =
> and
> >>>make it user getConnection(name, pass) in that case...
> >>>
> >>>Colin
> >>>
> >>>
> >>>Loren, Robert wrote:
> >>>
> >>>=20
> >>>
> >>> =20
> >>>
> >>>>Greetings-
> >>>>
> >>>>Ok, now I've got this working.
> >>>>So it seems that I now need something like
> >>>>PropertyPlaceholderConfigurer,
> >>>>only using JNDI.
> >>>>
> >>>>----------------------------------------
> >>>>IN appcontext.xml:
> >>>>
> >>>> <!-- Hibernate SessionFactory -->
> >>>> <bean id=3D"sessionFactory"
> >>>>class=3D"org.springframework.orm.hibernate.LocalSessionFactoryBean">
> >>>> <!--<property name=3D"dataSource"><ref
> >>>>local=3D"dataSource"/></property>-->
> >>>> <property name=3D"mappingResources">
> >>>> <value>/WEB-INF/OurApp.hbm.xml</value>
> >>>> </property>
> >>>> <property name=3D"hibernateProperties">
> >>>> <props>
> >>>> <prop
> >>>>key=3D"hibernate.dialect">${hibernate.dialect}</prop>
> >>>> <prop
> >>>>key=3D"hibernate.show_sql">${hibernate.showsql}</prop>
> >>>> <prop
> >>>>key=3D"hibernate.connection.username">${hibernate.connection.username=
> }</prop
> >>>>
> >>>>
> >>>>
> >>>> <prop
> >>>>key=3D"hibernate.connection.password">${hibernate.connection.password=
> }</prop
> >>>>
> >>>>
> >>>>
> >>>> <prop
> >>>>key=3D"hibernate.connection.datasource">${hibernate.connection.dataso=
> urce}</
> >>>>
> >>>>prop>
> >>>> </props>
> >>>> </property>
> >>>> </bean>
> >>>>--------------------------------------
> >>>>IN jdbc.properties:
> >>>>
> >>>>hibernate.dialect=3Dnet.sf.hibernate.dialect.DB2Dialect
> >>>>hibernate.showsql=3Dtrue
> >>>>hibernate.connection.username=3Dme
> >>>>hibernate.connection.password=3Dmypassword
> >>>>hibernate.connection.datasource=3Djdbc/mydatasource
> >>>>
> >>>>Let's see what I can find,
> >>>>Rob
> >>>>
> >>>>-----Original Message-----
> >>>>From: Loren, Robert [mailto:Rob...@ca...]
> >>>>Sent: Thursday, May 27, 2004 7:16 PM
> >>>>To: 'spr...@li...'
> >>>>Subject: RE: [Springframework-user] JNDI dataSource with separate
> >>>>user/pas sword/schema strings
> >>>>
> >>>>
> >>>>Thanks for your reply, Colin.
> >>>>
> >>>>Yes, we do want the datasource to be setup by the admin in the
> >>>>container,
> >>>>then accessed by the app. In DB2, you can pass the username and =
> password
> >>>>to the getConnection() method of the datasource, and that is what
> >>>>most of
> >>>>our in-house code is doing. We then use the schema name in our =
> queries
> >>>>when connecting up. I guess it's the runtime use of these =
> parameters,
> >>>>through the session/template, that we're trying to emulate. If the
> >>>>datasource could be injected with the user and password somehow, =
> that
> >>>>would be fine, but I don't see that as possible.
> >>>>
> >>>>Hibernate has properties such as "hibernate.connection.username" =
> that
> >>>>seem
> >>>>available for the SessionFactory. I'm trying to get those to work =
> with
> >>>>strings at the moment. But if successful there, I'd like to somehow =
> swap
> >>>>them out with JNDI-located strings.
> >>>>
> >>>>Hope this gives you more,
> >>>>Rob
> >>>>
> >>>>-----Original Message-----
> >>>>From: Colin Sampaleanu [mailto:col...@ex...]
> >>>>Sent: Thursday, May 27, 2004 6:47 PM
> >>>>To: spr...@li...
> >>>>Subject: Re: [Springframework-user] JNDI dataSource with separate
> >>>>user/password/schema strings
> >>>>
> >>>>
> >>>>Loren, Robert wrote:
> >>>>
> >>>>
> >>>>
> >>>> =20
> >>>>
> >>>> =20
> >>>>
> >>>>>Hi,
> >>>>>
> >>>>>We're looking to deploy into a WAS 5/DB2 environment with a
> >>>>>Spring/Hibernate-based application.
> >>>>>
> >>>>>We're excited, but worried at this point, trying to figure out how
> >>>>>to get
> >>>>>a pooled data source wired up from WAS's JNDI store.
> >>>>>
> >>>>>It was very easy to wire the data source itself, using the
> >>>>>JndiObjectFactoryBean from looking at the examples. However, our
> >>>>>Architecture group wants us to store the name, password, and schema =
> we
> >>>>>
> >>>>> =20
> >>>>>
> >>>>> =20
> >>>>>
> >>>>use
> >>>>
> >>>>
> >>>> =20
> >>>>
> >>>> =20
> >>>>
> >>>>>externally to the data source itself.
> >>>>>
> >>>>>I'm looking for something similar to how the strings are stored in =
> the
> >>>>>jdbc.properties file for DriverManagerDataSource, only maybe using =
> the
> >>>>>JndiObjectFactoryBeans wired into the SessionFactory properties.
> >>>>>
> >>>>>Does anyone have sample code on how this might be configured? =
> Should I
> >>>>>maybe be posting this to the developer group?
> >>>>>
> >>>>>Thanks very much for any help in advance, and thanks for Spring,
> >>>>>
> >>>>>Rob
> >>>>>
> >>>>>
> >>>>>
> >>>>> =20
> >>>>>
> >>>>> =20
> >>>>>
> >>>>Rob,
> >>>>
> >>>>I'm a little confused about what you're trying to do, and about the
> >>>>DataSource lifecycle you want to achieve. I presume that as opposed
> >>>>to the normal scenario where a sysadmin or deployer sets up the one
> >>>>datasource (which gets bound to JNDI) in the appserver, you would
> >>>>like Spring to create the datasource, based on config params which
> >>>>are provided by/to Spring?
> >>>>
> >>>>There is nothing stopping you from creating something like an Apache
> >>>>DBCP Datasource, and using that. However, you are then going to give
> >>>>up the much more robust WAS DataSource impl. which is integrated =
> into
> >>>>the container and the container's transaction manager.
> >>>>
> >>>>Can you provide more details?
> >>>>
> >>>>Regards,
> >>>>Colin
> >>>>
> >>>>
> >>>> =20
> >>>>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: Oracle 10g
> Get certified on the hottest thing ever to hit the market... Oracle 10g.
> Take an Oracle 10g class now, and we'll give you the exam FREE.
> http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dick
> _______________________________________________
> Springframework-developer mailing list
> Spr...@li...
> https://lists.sourceforge.net/lists/listinfo/springframework-developer
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: Oracle 10g
> Get certified on the hottest thing ever to hit the market... Oracle 10g.
> Take an Oracle 10g class now, and we'll give you the exam FREE.
> http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
> _______________________________________________
> Springframework-developer mailing list
> Spr...@li...
> https://lists.sourceforge.net/lists/listinfo/springframework-developer
>
|
|
From: <jue...@we...> - 2004-05-28 14:58:32
|
Let's take "UserCredentialsDataSourceAdapter" then - OK, Thomas?
=20
It's finished including javadocs and test suite, just waiting for a name =
that we agree on...
=20
Juergen
=20
________________________________
Von: spr...@li... im Auftrag =
von Colin Sampaleanu
Gesendet: Fr 28.05.2004 15:23
An: spr...@li...
Betreff: Re: [Springframework-developer] Re: [Springframework-user] JNDI =
dataSource with separate user/pas sword/schema strings
Hmm... I would probably go for adapter...
j=FCrgen h=F6ller [werk3AT] wrote:
>Hmm... you've got a point there. So votes please: =
"UserCredentialsDataSourceProxy" or "UserCredentialsDataSourceAdapter"? =
Or maybe a different, even better name?
>
>Juergen
>
>P.S.: Let's move this to the developer list.
>
>
>________________________________
>
>Von: spr...@li... im Auftrag von =
Thomas Risberg
>Gesendet: Fr 28.05.2004 13:39
>An: spr...@li...
>Betreff: Re: [Springframework-user] JNDI dataSource with separate =
user/pas sword/schema strings
>
>
>
>Don't want to nit pick about the naming, but I think it looks like an
>Adapter as well as a Proxy.
>
>JdbcTemplate
>|
>|
>getConnection()
>|
>|
>v
>UserCredentialsDataSource
>|
>|
>getConnection(username, password)
>|
>|
>v
>DataSource
>
>Thomas
>
>
>j=FCrgen h=F6ller [werk3AT] wrote:
>
>=20
>
>>Regarding the naming: IMO, such a DataSource is a "proxy" rather than =
an "adapter", as it exposes the same interface as the target.
>>
>>Juergen
>>
>>
>>________________________________
>>
>>Von: spr...@li... im Auftrag von =
j=FCrgen h=F6ller [werk3AT]
>>Gesendet: Fr 28.05.2004 10:20
>>An: spr...@li...
>>Betreff: Re: [Springframework-user] JNDI dataSource with separate =
user/pas sword/schema strings
>>
>>
>>
>>I consider that a good idea! We've actually discussed it before, =
exactly for that purpose.
>>
>>So I've just added a "UserCredentialsDataSourceProxy" to our =
jdbc.datasource package, taking "targetDataSource", "username" and =
"password" as bean properties. On "getConnection()" calls, it simply =
delegates to the "getConnection(username, password)" method of the =
target DataSource with the given user credentials.
>>
>>Additionally, there's also the option of setting thread-bound =
credentials, via the "setCredentialsForCurrentThread(username, =
password)" method". The application needs to make sure that such =
thread-bound credentials are removed at the end of the operation, via =
the "removeCredentialsFromCurrentThread()" method.
>>
>>If noone objects, this will be part of 1.0.2, as it arguably is a =
simple and straightforward addition that does not affect any other code.
>>
>>Juergen
>>
>>
>>________________________________
>>
>>Von: spr...@li... im Auftrag von =
Thomas Risberg
>>Gesendet: Fr 28.05.2004 05:04
>>An: spr...@li...
>>Betreff: Re: [Springframework-user] JNDI dataSource with separate =
user/pas sword/schema strings
>>
>>
>>
>>This has come up before and we should figure out the best recommended
>>solution. We could use a custom datasource adapter that has a =
reference
>>to the real datasource and adds username/password to the get =
connection
>>call. This username/password could be set via DI or stored in a =
thread
>>local in the case of each invocation having their own =
username/password
>>combo.
>>
>>Thomas
>>
>>
>>Colin Sampaleanu wrote:
>>
>>
>>
>> =20
>>
>>>Robert,
>>>
>>>Your variant below will work actually, since Spring is not going to
>>>get the DataSource and connection from it, but rather Hibernate =
itself
>>>will get the DataSource from JNDI and do a getConnection(name, pass)
>>>(via its own DatasourceConnectionProvider class).
>>>
>>>As per my previous email, Spring has no ability to call
>>>getConnection(name, pass) on a dataSource, so you need to make sure
>>>that all your operations can be done via Hibernate code... To be =
safe,
>>>you probably should not use Spring's HibernateTransactionManager and
>>>DataSourceTransactionManager classes, since they make the DataSource
>>>(either set directly or in the case of the former also pulled out =
from
>>>the SessionFactory) bound to the current thread/transaction, and
>>>expose the ability to get a connection from it with DataSourceUtils,
>>>which has no ability to do anything more than a simple =
getConnection()
>>>call to get a connection. So you would probably want to run with
>>>JTATransactionManager.
>>>
>>>Juergen, I don't know if you've been following this thread, but we
>>>should think about enhaning Spring to allow specifying a name/pass =
and
>>>make it user getConnection(name, pass) in that case...
>>>
>>>Colin
>>>
>>>
>>>Loren, Robert wrote:
>>>
>>>=20
>>>
>>> =20
>>>
>>>>Greetings-
>>>>
>>>>Ok, now I've got this working.
>>>>So it seems that I now need something like
>>>>PropertyPlaceholderConfigurer,
>>>>only using JNDI.
>>>>
>>>>----------------------------------------
>>>>IN appcontext.xml:
>>>>
>>>> <!-- Hibernate SessionFactory -->
>>>> <bean id=3D"sessionFactory"
>>>>class=3D"org.springframework.orm.hibernate.LocalSessionFactoryBean">
>>>> <!--<property name=3D"dataSource"><ref
>>>>local=3D"dataSource"/></property>-->
>>>> <property name=3D"mappingResources">
>>>> <value>/WEB-INF/OurApp.hbm.xml</value>
>>>> </property>
>>>> <property name=3D"hibernateProperties">
>>>> <props>
>>>> <prop
>>>>key=3D"hibernate.dialect">${hibernate.dialect}</prop>
>>>> <prop
>>>>key=3D"hibernate.show_sql">${hibernate.showsql}</prop>
>>>> <prop
>>>>key=3D"hibernate.connection.username">${hibernate.connection.username=
}</prop
>>>>
>>>>
>>>>
>>>> <prop
>>>>key=3D"hibernate.connection.password">${hibernate.connection.password=
}</prop
>>>>
>>>>
>>>>
>>>> <prop
>>>>key=3D"hibernate.connection.datasource">${hibernate.connection.dataso=
urce}</
>>>>
>>>>prop>
>>>> </props>
>>>> </property>
>>>> </bean>
>>>>--------------------------------------
>>>>IN jdbc.properties:
>>>>
>>>>hibernate.dialect=3Dnet.sf.hibernate.dialect.DB2Dialect
>>>>hibernate.showsql=3Dtrue
>>>>hibernate.connection.username=3Dme
>>>>hibernate.connection.password=3Dmypassword
>>>>hibernate.connection.datasource=3Djdbc/mydatasource
>>>>
>>>>Let's see what I can find,
>>>>Rob
>>>>
>>>>-----Original Message-----
>>>>From: Loren, Robert [mailto:Rob...@ca...]
>>>>Sent: Thursday, May 27, 2004 7:16 PM
>>>>To: 'spr...@li...'
>>>>Subject: RE: [Springframework-user] JNDI dataSource with separate
>>>>user/pas sword/schema strings
>>>>
>>>>
>>>>Thanks for your reply, Colin.
>>>>
>>>>Yes, we do want the datasource to be setup by the admin in the
>>>>container,
>>>>then accessed by the app. In DB2, you can pass the username and =
password
>>>>to the getConnection() method of the datasource, and that is what
>>>>most of
>>>>our in-house code is doing. We then use the schema name in our =
queries
>>>>when connecting up. I guess it's the runtime use of these =
parameters,
>>>>through the session/template, that we're trying to emulate. If the
>>>>datasource could be injected with the user and password somehow, =
that
>>>>would be fine, but I don't see that as possible.
>>>>
>>>>Hibernate has properties such as "hibernate.connection.username" =
that
>>>>seem
>>>>available for the SessionFactory. I'm trying to get those to work =
with
>>>>strings at the moment. But if successful there, I'd like to somehow =
swap
>>>>them out with JNDI-located strings.
>>>>
>>>>Hope this gives you more,
>>>>Rob
>>>>
>>>>-----Original Message-----
>>>>From: Colin Sampaleanu [mailto:col...@ex...]
>>>>Sent: Thursday, May 27, 2004 6:47 PM
>>>>To: spr...@li...
>>>>Subject: Re: [Springframework-user] JNDI dataSource with separate
>>>>user/password/schema strings
>>>>
>>>>
>>>>Loren, Robert wrote:
>>>>
>>>>
>>>>
>>>> =20
>>>>
>>>> =20
>>>>
>>>>>Hi,
>>>>>
>>>>>We're looking to deploy into a WAS 5/DB2 environment with a
>>>>>Spring/Hibernate-based application.
>>>>>
>>>>>We're excited, but worried at this point, trying to figure out how
>>>>>to get
>>>>>a pooled data source wired up from WAS's JNDI store.
>>>>>
>>>>>It was very easy to wire the data source itself, using the
>>>>>JndiObjectFactoryBean from looking at the examples. However, our
>>>>>Architecture group wants us to store the name, password, and schema =
we
>>>>>
>>>>> =20
>>>>>
>>>>> =20
>>>>>
>>>>use
>>>>
>>>>
>>>> =20
>>>>
>>>> =20
>>>>
>>>>>externally to the data source itself.
>>>>>
>>>>>I'm looking for something similar to how the strings are stored in =
the
>>>>>jdbc.properties file for DriverManagerDataSource, only maybe using =
the
>>>>>JndiObjectFactoryBeans wired into the SessionFactory properties.
>>>>>
>>>>>Does anyone have sample code on how this might be configured? =
Should I
>>>>>maybe be posting this to the developer group?
>>>>>
>>>>>Thanks very much for any help in advance, and thanks for Spring,
>>>>>
>>>>>Rob
>>>>>
>>>>>
>>>>>
>>>>> =20
>>>>>
>>>>> =20
>>>>>
>>>>Rob,
>>>>
>>>>I'm a little confused about what you're trying to do, and about the
>>>>DataSource lifecycle you want to achieve. I presume that as opposed
>>>>to the normal scenario where a sysadmin or deployer sets up the one
>>>>datasource (which gets bound to JNDI) in the appserver, you would
>>>>like Spring to create the datasource, based on config params which
>>>>are provided by/to Spring?
>>>>
>>>>There is nothing stopping you from creating something like an Apache
>>>>DBCP Datasource, and using that. However, you are then going to give
>>>>up the much more robust WAS DataSource impl. which is integrated =
into
>>>>the container and the container's transaction manager.
>>>>
>>>>Can you provide more details?
>>>>
>>>>Regards,
>>>>Colin
>>>>
>>>>
>>>> =20
>>>>
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dick
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge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29yay1kZXZlbG9wZXIgbWFpbGluZyBsaXN0DQoJU3ByaW5nZnJhbWV3b3JrLWRldmVs b3BlckBsaXN0cy5zb3VyY2Vmb3JnZS5uZXQNCglodHRwczovL2xpc3RzLnNvdXJjZWZvcmdlLm5l dC9saXN0cy9saXN0aW5mby9zcHJpbmdmcmFtZXdvcmstZGV2ZWxvcGVyDQoJDQoNCg== |
|
From: Colin S. <col...@ex...> - 2004-05-28 13:24:07
|
Hmm... I would probably go for adapter...
j=FCrgen h=F6ller [werk3AT] wrote:
>Hmm... you've got a point there. So votes please: "UserCredentialsDataSo=
urceProxy" or "UserCredentialsDataSourceAdapter"? Or maybe a different, e=
ven better name?
>=20
>Juergen
>=20
>P.S.: Let's move this to the developer list.
>=20
>
>________________________________
>
>Von: spr...@li... im Auftrag von Tho=
mas Risberg
>Gesendet: Fr 28.05.2004 13:39
>An: spr...@li...
>Betreff: Re: [Springframework-user] JNDI dataSource with separate user/p=
as sword/schema strings
>
>
>
>Don't want to nit pick about the naming, but I think it looks like an
>Adapter as well as a Proxy.
>
>JdbcTemplate
>|
>|
>getConnection()
>|
>|
>v
>UserCredentialsDataSource
>|
>|
>getConnection(username, password)
>|
>|
>v
>DataSource
>
>Thomas
>
>
>j=FCrgen h=F6ller [werk3AT] wrote:
>
> =20
>
>>Regarding the naming: IMO, such a DataSource is a "proxy" rather than a=
n "adapter", as it exposes the same interface as the target.
>>
>>Juergen
>>
>>
>>________________________________
>>
>>Von: spr...@li... im Auftrag von j=FC=
rgen h=F6ller [werk3AT]
>>Gesendet: Fr 28.05.2004 10:20
>>An: spr...@li...
>>Betreff: Re: [Springframework-user] JNDI dataSource with separate user/=
pas sword/schema strings
>>
>>
>>
>>I consider that a good idea! We've actually discussed it before, exactl=
y for that purpose.
>>
>>So I've just added a "UserCredentialsDataSourceProxy" to our jdbc.datas=
ource package, taking "targetDataSource", "username" and "password" as be=
an properties. On "getConnection()" calls, it simply delegates to the "ge=
tConnection(username, password)" method of the target DataSource with the=
given user credentials.
>>
>>Additionally, there's also the option of setting thread-bound credentia=
ls, via the "setCredentialsForCurrentThread(username, password)" method".=
The application needs to make sure that such thread-bound credentials ar=
e removed at the end of the operation, via the "removeCredentialsFromCurr=
entThread()" method.
>>
>>If noone objects, this will be part of 1.0.2, as it arguably is a simpl=
e and straightforward addition that does not affect any other code.
>>
>>Juergen
>>
>>
>>________________________________
>>
>>Von: spr...@li... im Auftrag von Th=
omas Risberg
>>Gesendet: Fr 28.05.2004 05:04
>>An: spr...@li...
>>Betreff: Re: [Springframework-user] JNDI dataSource with separate user/=
pas sword/schema strings
>>
>>
>>
>>This has come up before and we should figure out the best recommended
>>solution. We could use a custom datasource adapter that has a referenc=
e
>>to the real datasource and adds username/password to the get connection
>>call. This username/password could be set via DI or stored in a thread
>>local in the case of each invocation having their own username/password
>>combo.
>>
>>Thomas
>>
>>
>>Colin Sampaleanu wrote:
>>
>>
>>
>> =20
>>
>>>Robert,
>>>
>>>Your variant below will work actually, since Spring is not going to
>>>get the DataSource and connection from it, but rather Hibernate itself
>>>will get the DataSource from JNDI and do a getConnection(name, pass)
>>>(via its own DatasourceConnectionProvider class).
>>>
>>>As per my previous email, Spring has no ability to call
>>>getConnection(name, pass) on a dataSource, so you need to make sure
>>>that all your operations can be done via Hibernate code... To be safe,
>>>you probably should not use Spring's HibernateTransactionManager and
>>>DataSourceTransactionManager classes, since they make the DataSource
>>>(either set directly or in the case of the former also pulled out from
>>>the SessionFactory) bound to the current thread/transaction, and
>>>expose the ability to get a connection from it with DataSourceUtils,
>>>which has no ability to do anything more than a simple getConnection()
>>>call to get a connection. So you would probably want to run with
>>>JTATransactionManager.
>>>
>>>Juergen, I don't know if you've been following this thread, but we
>>>should think about enhaning Spring to allow specifying a name/pass and
>>>make it user getConnection(name, pass) in that case...
>>>
>>>Colin
>>>
>>>
>>>Loren, Robert wrote:
>>>
>>> =20
>>>
>>> =20
>>>
>>>>Greetings-
>>>>
>>>>Ok, now I've got this working.
>>>>So it seems that I now need something like
>>>>PropertyPlaceholderConfigurer,
>>>>only using JNDI.
>>>>
>>>>----------------------------------------
>>>>IN appcontext.xml:
>>>>
>>>> <!-- Hibernate SessionFactory -->
>>>> <bean id=3D"sessionFactory"
>>>>class=3D"org.springframework.orm.hibernate.LocalSessionFactoryBean">
>>>> <!--<property name=3D"dataSource"><ref
>>>>local=3D"dataSource"/></property>-->
>>>> <property name=3D"mappingResources">
>>>> <value>/WEB-INF/OurApp.hbm.xml</value>
>>>> </property>
>>>> <property name=3D"hibernateProperties">
>>>> <props>
>>>> <prop
>>>>key=3D"hibernate.dialect">${hibernate.dialect}</prop>
>>>> <prop
>>>>key=3D"hibernate.show_sql">${hibernate.showsql}</prop>
>>>> <prop
>>>>key=3D"hibernate.connection.username">${hibernate.connection.username=
}</prop
>>>>
>>>>
>>>>
>>>> <prop
>>>>key=3D"hibernate.connection.password">${hibernate.connection.password=
}</prop
>>>>
>>>>
>>>>
>>>> <prop
>>>>key=3D"hibernate.connection.datasource">${hibernate.connection.dataso=
urce}</
>>>>
>>>>prop>
>>>> </props>
>>>> </property>
>>>> </bean>
>>>>--------------------------------------
>>>>IN jdbc.properties:
>>>>
>>>>hibernate.dialect=3Dnet.sf.hibernate.dialect.DB2Dialect
>>>>hibernate.showsql=3Dtrue
>>>>hibernate.connection.username=3Dme
>>>>hibernate.connection.password=3Dmypassword
>>>>hibernate.connection.datasource=3Djdbc/mydatasource
>>>>
>>>>Let's see what I can find,
>>>>Rob
>>>>
>>>>-----Original Message-----
>>>>From: Loren, Robert [mailto:Rob...@ca...]
>>>>Sent: Thursday, May 27, 2004 7:16 PM
>>>>To: 'spr...@li...'
>>>>Subject: RE: [Springframework-user] JNDI dataSource with separate
>>>>user/pas sword/schema strings
>>>>
>>>>
>>>>Thanks for your reply, Colin.
>>>>
>>>>Yes, we do want the datasource to be setup by the admin in the
>>>>container,
>>>>then accessed by the app. In DB2, you can pass the username and passw=
ord
>>>>to the getConnection() method of the datasource, and that is what
>>>>most of
>>>>our in-house code is doing. We then use the schema name in our querie=
s
>>>>when connecting up. I guess it's the runtime use of these parameters,
>>>>through the session/template, that we're trying to emulate. If the
>>>>datasource could be injected with the user and password somehow, that
>>>>would be fine, but I don't see that as possible.
>>>>
>>>>Hibernate has properties such as "hibernate.connection.username" that
>>>>seem
>>>>available for the SessionFactory. I'm trying to get those to work wit=
h
>>>>strings at the moment. But if successful there, I'd like to somehow s=
wap
>>>>them out with JNDI-located strings.
>>>>
>>>>Hope this gives you more,
>>>>Rob
>>>>
>>>>-----Original Message-----
>>>>From: Colin Sampaleanu [mailto:col...@ex...]
>>>>Sent: Thursday, May 27, 2004 6:47 PM
>>>>To: spr...@li...
>>>>Subject: Re: [Springframework-user] JNDI dataSource with separate
>>>>user/password/schema strings
>>>>
>>>>
>>>>Loren, Robert wrote:
>>>>
>>>>
>>>>
>>>> =20
>>>>
>>>> =20
>>>>
>>>>>Hi,
>>>>>
>>>>>We're looking to deploy into a WAS 5/DB2 environment with a
>>>>>Spring/Hibernate-based application.
>>>>>
>>>>>We're excited, but worried at this point, trying to figure out how
>>>>>to get
>>>>>a pooled data source wired up from WAS's JNDI store.
>>>>>
>>>>>It was very easy to wire the data source itself, using the
>>>>>JndiObjectFactoryBean from looking at the examples. However, our
>>>>>Architecture group wants us to store the name, password, and schema =
we
>>>>>
>>>>> =20
>>>>>
>>>>> =20
>>>>>
>>>>use
>>>>
>>>>
>>>> =20
>>>>
>>>> =20
>>>>
>>>>>externally to the data source itself.
>>>>>
>>>>>I'm looking for something similar to how the strings are stored in t=
he
>>>>>jdbc.properties file for DriverManagerDataSource, only maybe using t=
he
>>>>>JndiObjectFactoryBeans wired into the SessionFactory properties.
>>>>>
>>>>>Does anyone have sample code on how this might be configured? Should=
I
>>>>>maybe be posting this to the developer group?
>>>>>
>>>>>Thanks very much for any help in advance, and thanks for Spring,
>>>>>
>>>>>Rob
>>>>>
>>>>>
>>>>>
>>>>> =20
>>>>>
>>>>> =20
>>>>>
>>>>Rob,
>>>>
>>>>I'm a little confused about what you're trying to do, and about the
>>>>DataSource lifecycle you want to achieve. I presume that as opposed
>>>>to the normal scenario where a sysadmin or deployer sets up the one
>>>>datasource (which gets bound to JNDI) in the appserver, you would
>>>>like Spring to create the datasource, based on config params which
>>>>are provided by/to Spring?
>>>>
>>>>There is nothing stopping you from creating something like an Apache
>>>>DBCP Datasource, and using that. However, you are then going to give
>>>>up the much more robust WAS DataSource impl. which is integrated into
>>>>the container and the container's transaction manager.
>>>>
>>>>Can you provide more details?
>>>>
>>>>Regards,
>>>>Colin
>>>>
>>>>
>>>> =20
>>>>
|
|
From: <jue...@we...> - 2004-05-28 12:58:14
|
Mike,
=20
Your approach seems to be perfectly OK. I've just tried to reproduce =
your issue but wasn't able to: I always get a single instance, no matter =
if implementing ApplicationListener or not. Could you double-check the =
effect, and possibly send a minimal test case that reproduces the =
problem?
=20
Juergen
=20
________________________________
Von: spr...@li... im Auftrag =
von Mike Cannon-Brookes
Gesendet: Fr 28.05.2004 08:39
An: Spring Developer
Betreff: [Springframework-developer] Strange 'double' singleton bug
I'm not sure if this is a bug or not, it's certainly strange behaviour.
We had a singleton bean that was operating normally, but when we make
it implement ApplicationListener - we get _two_ instances of it
created. (Tested by simply putting a debug point in the constructor -
two separate beans are created)
Here's the config snippet:
<bean id=3D"macroManager"
class=3D"com.atlassian.renderer.macro.DefaultMacroManager">
<constructor-arg>
<ref local=3D"macroStateStore"/>
</constructor-arg>
<constructor-arg>
<list>
<ref local=3D"beanMacroLoader"/>
<ref local=3D"classpathMacroLoader"/>
</list>
</constructor-arg>
</bean>
Is this a known bug, a feature or am I not meant to use
ApplicationListener this way? (if it's a bug it's quite serious I'd
say)
I want to do it this way because another part of Confluence fires an
event to say that all setup has finished - and I want this bean to
listen for that event and further initialize itself.
I just guessed that in Spring I would just need to implement the
ApplicationListener interface and listen for events - if I need to do
anything else, let me know :)
Cheers,
Mike
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3D3149&alloc_id=3D8166&op=3Dclick
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
|
|
From: <jue...@we...> - 2004-05-28 12:50:04
|
Hi Ross, =20 Interesting stuff! Out of curiosity, are you using Mule yourself in a = concrete application at Atlassian? =20 Regarding getting notified of events published by Spring beans: Why not = simply make the MuleEventManager implement the ApplicationListener = interface? It would automatically receive all ApplicationEvents then = (like any other ApplicationListener in the context), being able to = process them accordingly (all other listeners will ignore events that = they don't know anyway). =20 So I don't really see a reason why you'd need to hook into the = ApplicationEventMulticaster here. Please tell me if I missed your point = :-) =20 Juergen =20 ________________________________ Von: spr...@li... im Auftrag = von Mason, Ross Gesendet: Fr 28.05.2004 13:42 An: spr...@li... Betreff: [Springframework-developer] Spring / Mule integration - step 1 Hi, I'm writing some extensions to integrate Spring with Mule (Mule is an = ESB - www.muleumo.org). I'm starting with an extension to Spring's = ApplicationEvent implementation to allow beans to receive Mule events. =20 Mule events can be sent over transports such as jms, http, smtp, pop3, = tcp, etc so a bean in a Spring context could implement a = JmsEventListener, pop3EventListener, etc to receive events published in = Mule. Plus the observer interface could expose subscription methods to = enable Mule to publish to different subscriptions, i.e. =20 public class JmsEventListener implements ApplicationEvent { =20 public void setSubscription(String subscription); =20 public String getSubscription(); } =20 This would allow springs beans to receive Jms messages, emails, data = over http. Mule handles the transformation of these events = transparently. =20 for publishing events, the application code could publish a MuleEvent = with an endpoint and a transport to the applicationContext, which could = be recieved by a MuleEventManager bean. =20 The problem is that I'm having trouble seeing how to change the way = Spring manages events. Ideally, the EventMulticaster on the = AbstractApplicationContext would be accessible with getter and setter = methods so that the 'MuleEventManager' bean could hook in it's own = eventMulticaster that knows how to deal subscription events and how to = manage MuleEvents published by Spring Beans. =20 I think this sort of extension would add value to Spring, would you guys = consider exposing the EventMulticaster? =20 Cheers, =20 Ross |
|
From: Dmitriy K. <dko...@ru...> - 2004-05-28 12:45:04
|
I've created a component in JIRA for documentation called SpringDOCO Regards, Dmitriy. Alef Arendsen wrote: > Errr, I replied to the wrong email I guess ;-) > > It was supposed to be a reply to the scheduling question from Mike CB > > Alef > > > -----Original Message----- > From: spr...@li... [mailto:spr...@li...] On Behalf Of Alef Arendsen > Sent: Friday, May 28, 2004 10:16 AM > To: spr...@li... > Subject: RE: [Springframework-developer] Strange 'double' singleton bug > > I've inserted an issue in JIRA. I'll see what I can do today. > > By the way, could somebody create a component for documentation in JIRA? > > Alef > > > -----Original Message----- > From: spr...@li... > [mailto:spr...@li...] On Behalf > Of Mike Cannon-Brookes > Sent: Friday, May 28, 2004 8:46 AM > To: Spring Developer > Subject: [Springframework-developer] Strange 'double' singleton bug > > I'm not sure if this is a bug or not, it's certainly strange behaviour. > > We had a singleton bean that was operating normally, but when we make > it implement ApplicationListener - we get _two_ instances of it > created. (Tested by simply putting a debug point in the constructor - > two separate beans are created) > > Here's the config snippet: > > <bean id="macroManager" > class="com.atlassian.renderer.macro.DefaultMacroManager"> > <constructor-arg> > <ref local="macroStateStore"/> > </constructor-arg> > <constructor-arg> > <list> > <ref local="beanMacroLoader"/> > <ref local="classpathMacroLoader"/> > </list> > </constructor-arg> > </bean> > > Is this a known bug, a feature or am I not meant to use > ApplicationListener this way? (if it's a bug it's quite serious I'd > say) > > I want to do it this way because another part of Confluence fires an > event to say that all setup has finished - and I want this bean to > listen for that event and further initialize itself. > > I just guessed that in Spring I would just need to implement the > ApplicationListener interface and listen for events - if I need to do > anything else, let me know :) > > Cheers, > Mike > > > ------------------------------------------------------- > This SF.Net email is sponsored by: Oracle 10g > Get certified on the hottest thing ever to hit the market... Oracle 10g. > > Take an Oracle 10g class now, and we'll give you the exam FREE. > http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: Oracle 10g > Get certified on the hottest thing ever to hit the market... Oracle 10g. > Take an Oracle 10g class now, and we'll give you the exam FREE. > http://ads.osdn.com/?ad_id149&alloc_id66&op=ick > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: Oracle 10g > Get certified on the hottest thing ever to hit the market... Oracle 10g. > Take an Oracle 10g class now, and we'll give you the exam FREE. > http://ads.osdn.com/?ad_id149&alloc_id66&op=click > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer |
|
From: <jue...@we...> - 2004-05-28 12:30:59
|
Thomas,
=20
A further naming issue: I've recently introduced a common base class for =
SqlOutParameter and SqlReturnResultSet, with the name =
"ResultSetAwareSqlParameter". However, I've just noticed that that name =
is not entirely appropriate: "ResultSetSupportingSqlParameter" would =
probably be better. What do you think?
=20
Juergen
=20
________________________________
Von: spr...@li... im Auftrag von =
j=FCrgen h=F6ller [werk3AT]
Gesendet: Fr 28.05.2004 14:11
An: spr...@li...; =
spr...@li...
Betreff: Re: [Springframework-user] JNDI dataSource with separate =
user/pas sword/schema strings
Hmm... you've got a point there. So votes please: =
"UserCredentialsDataSourceProxy" or "UserCredentialsDataSourceAdapter"? =
Or maybe a different, even better name?
Juergen
P.S.: Let's move this to the developer list.
________________________________
Von: spr...@li... im Auftrag von =
Thomas Risberg
Gesendet: Fr 28.05.2004 13:39
An: spr...@li...
Betreff: Re: [Springframework-user] JNDI dataSource with separate =
user/pas sword/schema strings
Don't want to nit pick about the naming, but I think it looks like an
Adapter as well as a Proxy.
JdbcTemplate
|
|
getConnection()
|
|
v
UserCredentialsDataSource
|
|
getConnection(username, password)
|
|
v
DataSource
Thomas
j=FCrgen h=F6ller [werk3AT] wrote:
>Regarding the naming: IMO, such a DataSource is a "proxy" rather than =
an "adapter", as it exposes the same interface as the target.
>
>Juergen
>
>
>________________________________
>
>Von: spr...@li... im Auftrag von =
j=FCrgen h=F6ller [werk3AT]
>Gesendet: Fr 28.05.2004 10:20
>An: spr...@li...
>Betreff: Re: [Springframework-user] JNDI dataSource with separate =
user/pas sword/schema strings
>
>
>
>I consider that a good idea! We've actually discussed it before, =
exactly for that purpose.
>
>So I've just added a "UserCredentialsDataSourceProxy" to our =
jdbc.datasource package, taking "targetDataSource", "username" and =
"password" as bean properties. On "getConnection()" calls, it simply =
delegates to the "getConnection(username, password)" method of the =
target DataSource with the given user credentials.
>
>Additionally, there's also the option of setting thread-bound =
credentials, via the "setCredentialsForCurrentThread(username, =
password)" method". The application needs to make sure that such =
thread-bound credentials are removed at the end of the operation, via =
the "removeCredentialsFromCurrentThread()" method.
>
>If noone objects, this will be part of 1.0.2, as it arguably is a =
simple and straightforward addition that does not affect any other code.
>
>Juergen
>
>
>________________________________
>
>Von: spr...@li... im Auftrag von =
Thomas Risberg
>Gesendet: Fr 28.05.2004 05:04
>An: spr...@li...
>Betreff: Re: [Springframework-user] JNDI dataSource with separate =
user/pas sword/schema strings
>
>
>
>This has come up before and we should figure out the best recommended
>solution. We could use a custom datasource adapter that has a =
reference
>to the real datasource and adds username/password to the get connection
>call. This username/password could be set via DI or stored in a thread
>local in the case of each invocation having their own username/password
>combo.
>
>Thomas
>
>
>Colin Sampaleanu wrote:
>
>
>
>>Robert,
>>
>>Your variant below will work actually, since Spring is not going to
>>get the DataSource and connection from it, but rather Hibernate itself
>>will get the DataSource from JNDI and do a getConnection(name, pass)
>>(via its own DatasourceConnectionProvider class).
>>
>>As per my previous email, Spring has no ability to call
>>getConnection(name, pass) on a dataSource, so you need to make sure
>>that all your operations can be done via Hibernate code... To be safe,
>>you probably should not use Spring's HibernateTransactionManager and
>>DataSourceTransactionManager classes, since they make the DataSource
>>(either set directly or in the case of the former also pulled out from
>>the SessionFactory) bound to the current thread/transaction, and
>>expose the ability to get a connection from it with DataSourceUtils,
>>which has no ability to do anything more than a simple getConnection()
>>call to get a connection. So you would probably want to run with
>>JTATransactionManager.
>>
>>Juergen, I don't know if you've been following this thread, but we
>>should think about enhaning Spring to allow specifying a name/pass and
>>make it user getConnection(name, pass) in that case...
>>
>>Colin
>>
>>
>>Loren, Robert wrote:
>>
>> =20
>>
>>>Greetings-
>>>
>>>Ok, now I've got this working.
>>>So it seems that I now need something like
>>>PropertyPlaceholderConfigurer,
>>>only using JNDI.
>>>
>>>----------------------------------------
>>>IN appcontext.xml:
>>>
>>> <!-- Hibernate SessionFactory -->
>>> <bean id=3D"sessionFactory"
>>>class=3D"org.springframework.orm.hibernate.LocalSessionFactoryBean">
>>> <!--<property name=3D"dataSource"><ref
>>>local=3D"dataSource"/></property>-->
>>> <property name=3D"mappingResources">
>>> <value>/WEB-INF/OurApp.hbm.xml</value>
>>> </property>
>>> <property name=3D"hibernateProperties">
>>> <props>
>>> <prop
>>>key=3D"hibernate.dialect">${hibernate.dialect}</prop>
>>> <prop
>>>key=3D"hibernate.show_sql">${hibernate.showsql}</prop>
>>> <prop
>>>key=3D"hibernate.connection.username">${hibernate.connection.username}=
</prop
>>>
>>>
>>>
>>> <prop
>>>key=3D"hibernate.connection.password">${hibernate.connection.password}=
</prop
>>>
>>>
>>>
>>> <prop
>>>key=3D"hibernate.connection.datasource">${hibernate.connection.datasou=
rce}</
>>>
>>>prop>
>>> </props>
>>> </property>
>>> </bean>
>>>--------------------------------------
>>>IN jdbc.properties:
>>>
>>>hibernate.dialect=3Dnet.sf.hibernate.dialect.DB2Dialect
>>>hibernate.showsql=3Dtrue
>>>hibernate.connection.username=3Dme
>>>hibernate.connection.password=3Dmypassword
>>>hibernate.connection.datasource=3Djdbc/mydatasource
>>>
>>>Let's see what I can find,
>>>Rob
>>>
>>>-----Original Message-----
>>>From: Loren, Robert [mailto:Rob...@ca...]
>>>Sent: Thursday, May 27, 2004 7:16 PM
>>>To: 'spr...@li...'
>>>Subject: RE: [Springframework-user] JNDI dataSource with separate
>>>user/pas sword/schema strings
>>>
>>>
>>>Thanks for your reply, Colin.
>>>
>>>Yes, we do want the datasource to be setup by the admin in the
>>>container,
>>>then accessed by the app. In DB2, you can pass the username and =
password
>>>to the getConnection() method of the datasource, and that is what
>>>most of
>>>our in-house code is doing. We then use the schema name in our =
queries
>>>when connecting up. I guess it's the runtime use of these parameters,
>>>through the session/template, that we're trying to emulate. If the
>>>datasource could be injected with the user and password somehow, that
>>>would be fine, but I don't see that as possible.
>>>
>>>Hibernate has properties such as "hibernate.connection.username" that
>>>seem
>>>available for the SessionFactory. I'm trying to get those to work =
with
>>>strings at the moment. But if successful there, I'd like to somehow =
swap
>>>them out with JNDI-located strings.
>>>
>>>Hope this gives you more,
>>>Rob
>>>
>>>-----Original Message-----
>>>From: Colin Sampaleanu [mailto:col...@ex...]
>>>Sent: Thursday, May 27, 2004 6:47 PM
>>>To: spr...@li...
>>>Subject: Re: [Springframework-user] JNDI dataSource with separate
>>>user/password/schema strings
>>>
>>>
>>>Loren, Robert wrote:
>>>
>>>
>>>
>>> =20
>>>
>>>>Hi,
>>>>
>>>>We're looking to deploy into a WAS 5/DB2 environment with a
>>>>Spring/Hibernate-based application.
>>>>
>>>>We're excited, but worried at this point, trying to figure out how
>>>>to get
>>>>a pooled data source wired up from WAS's JNDI store.
>>>>
>>>>It was very easy to wire the data source itself, using the
>>>>JndiObjectFactoryBean from looking at the examples. However, our
>>>>Architecture group wants us to store the name, password, and schema =
we
>>>>
>>>> =20
>>>>
>>>use
>>>
>>>
>>> =20
>>>
>>>>externally to the data source itself.
>>>>
>>>>I'm looking for something similar to how the strings are stored in =
the
>>>>jdbc.properties file for DriverManagerDataSource, only maybe using =
the
>>>>JndiObjectFactoryBeans wired into the SessionFactory properties.
>>>>
>>>>Does anyone have sample code on how this might be configured? Should =
I
>>>>maybe be posting this to the developer group?
>>>>
>>>>Thanks very much for any help in advance, and thanks for Spring,
>>>>
>>>>Rob
>>>>
>>>>
>>>>
>>>> =20
>>>>
>>>Rob,
>>>
>>>I'm a little confused about what you're trying to do, and about the
>>>DataSource lifecycle you want to achieve. I presume that as opposed
>>>to the normal scenario where a sysadmin or deployer sets up the one
>>>datasource (which gets bound to JNDI) in the appserver, you would
>>>like Spring to create the datasource, based on config params which
>>>are provided by/to Spring?
>>>
>>>There is nothing stopping you from creating something like an Apache
>>>DBCP Datasource, and using that. However, you are then going to give
>>>up the much more robust WAS DataSource impl. which is integrated into
>>>the container and the container's transaction manager.
>>>
>>>Can you provide more details?
>>>
>>>Regards,
>>>Colin
>>>
>>>
>>> =20
>>>
>>
>>-------------------------------------------------------
>>This SF.Net email is sponsored by: Oracle 10g
>>Get certified on the hottest thing ever to hit the market... Oracle
>>10g. Take an Oracle 10g class now, and we'll give you the exam FREE.
>>http://ads.osdn.com/?ad_id=3D3149&alloc_id=3D8166&op=3Dclick
>>_______________________________________________
>>Springframework-user mailing list
>>Spr...@li...
>>https://lists.sourceforge.net/lists/listinfo/springframework-user
>>
>>
>>
>> =20
>>
>
>
>
>-------------------------------------------------------
>This SF.Net email is sponsored by: Oracle 10g
>Get certified on the hottest thing ever to hit the market... Oracle =
10g.
>Take an Oracle 10g class now, and we'll give you the exam FREE.
>http://ads.osdn.com/?ad_id=3D3149&alloc_id=3D8166&op=3Dclick
>_______________________________________________
>Springframework-user mailing list
>Spr...@li...
>https://lists.sourceforge.net/lists/listinfo/springframework-user
>
>
>
>
>-------------------------------------------------------
>This SF.Net email is sponsored by: Oracle 10g
>Get certified on the hottest thing ever to hit the market... Oracle =
10g.
>Take an Oracle 10g class now, and we'll give you the exam FREE.
>http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dick
>_______________________________________________
>Springframework-user mailing list
>Spr...@li...
>https://lists.sourceforge.net/lists/listinfo/springframework-user
>
>
>
>
>-------------------------------------------------------
>This SF.Net email is sponsored by: Oracle 10g
>Get certified on the hottest thing ever to hit the market... Oracle =
10g.
>Take an Oracle 10g class now, and we'll give you the exam FREE.
>http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dclick
>_______________________________________________
>Springframework-user mailing list
>Spr...@li...
>https://lists.sourceforge.net/lists/listinfo/springframework-user
>
>
>
>
>
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3D3149&alloc_id=3D8166&op=3Dclick
_______________________________________________
Springframework-user mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-user
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dick
_______________________________________________
Springframework-user mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-user
|
|
From: <jue...@we...> - 2004-05-28 12:14:15
|
Hmm... you've got a point there. So votes please: =
"UserCredentialsDataSourceProxy" or "UserCredentialsDataSourceAdapter"? =
Or maybe a different, even better name?
=20
Juergen
=20
P.S.: Let's move this to the developer list.
=20
________________________________
Von: spr...@li... im Auftrag von =
Thomas Risberg
Gesendet: Fr 28.05.2004 13:39
An: spr...@li...
Betreff: Re: [Springframework-user] JNDI dataSource with separate =
user/pas sword/schema strings
Don't want to nit pick about the naming, but I think it looks like an
Adapter as well as a Proxy.
JdbcTemplate
|
|
getConnection()
|
|
v
UserCredentialsDataSource
|
|
getConnection(username, password)
|
|
v
DataSource
Thomas
j=FCrgen h=F6ller [werk3AT] wrote:
>Regarding the naming: IMO, such a DataSource is a "proxy" rather than =
an "adapter", as it exposes the same interface as the target.
>
>Juergen
>
>
>________________________________
>
>Von: spr...@li... im Auftrag von =
j=FCrgen h=F6ller [werk3AT]
>Gesendet: Fr 28.05.2004 10:20
>An: spr...@li...
>Betreff: Re: [Springframework-user] JNDI dataSource with separate =
user/pas sword/schema strings
>
>
>
>I consider that a good idea! We've actually discussed it before, =
exactly for that purpose.
>
>So I've just added a "UserCredentialsDataSourceProxy" to our =
jdbc.datasource package, taking "targetDataSource", "username" and =
"password" as bean properties. On "getConnection()" calls, it simply =
delegates to the "getConnection(username, password)" method of the =
target DataSource with the given user credentials.
>
>Additionally, there's also the option of setting thread-bound =
credentials, via the "setCredentialsForCurrentThread(username, =
password)" method". The application needs to make sure that such =
thread-bound credentials are removed at the end of the operation, via =
the "removeCredentialsFromCurrentThread()" method.
>
>If noone objects, this will be part of 1.0.2, as it arguably is a =
simple and straightforward addition that does not affect any other code.
>
>Juergen
>
>
>________________________________
>
>Von: spr...@li... im Auftrag von =
Thomas Risberg
>Gesendet: Fr 28.05.2004 05:04
>An: spr...@li...
>Betreff: Re: [Springframework-user] JNDI dataSource with separate =
user/pas sword/schema strings
>
>
>
>This has come up before and we should figure out the best recommended
>solution. We could use a custom datasource adapter that has a =
reference
>to the real datasource and adds username/password to the get connection
>call. This username/password could be set via DI or stored in a thread
>local in the case of each invocation having their own username/password
>combo.
>
>Thomas
>
>
>Colin Sampaleanu wrote:
>
>=20
>
>>Robert,
>>
>>Your variant below will work actually, since Spring is not going to
>>get the DataSource and connection from it, but rather Hibernate itself
>>will get the DataSource from JNDI and do a getConnection(name, pass)
>>(via its own DatasourceConnectionProvider class).
>>
>>As per my previous email, Spring has no ability to call
>>getConnection(name, pass) on a dataSource, so you need to make sure
>>that all your operations can be done via Hibernate code... To be safe,
>>you probably should not use Spring's HibernateTransactionManager and
>>DataSourceTransactionManager classes, since they make the DataSource
>>(either set directly or in the case of the former also pulled out from
>>the SessionFactory) bound to the current thread/transaction, and
>>expose the ability to get a connection from it with DataSourceUtils,
>>which has no ability to do anything more than a simple getConnection()
>>call to get a connection. So you would probably want to run with
>>JTATransactionManager.
>>
>>Juergen, I don't know if you've been following this thread, but we
>>should think about enhaning Spring to allow specifying a name/pass and
>>make it user getConnection(name, pass) in that case...
>>
>>Colin
>>
>>
>>Loren, Robert wrote:
>>
>> =20
>>
>>>Greetings-
>>>
>>>Ok, now I've got this working.
>>>So it seems that I now need something like
>>>PropertyPlaceholderConfigurer,
>>>only using JNDI.
>>>
>>>----------------------------------------
>>>IN appcontext.xml:
>>>
>>> <!-- Hibernate SessionFactory -->
>>> <bean id=3D"sessionFactory"
>>>class=3D"org.springframework.orm.hibernate.LocalSessionFactoryBean">
>>> <!--<property name=3D"dataSource"><ref
>>>local=3D"dataSource"/></property>-->
>>> <property name=3D"mappingResources">
>>> <value>/WEB-INF/OurApp.hbm.xml</value>
>>> </property>
>>> <property name=3D"hibernateProperties">
>>> <props>
>>> <prop
>>>key=3D"hibernate.dialect">${hibernate.dialect}</prop>
>>> <prop
>>>key=3D"hibernate.show_sql">${hibernate.showsql}</prop>
>>> <prop
>>>key=3D"hibernate.connection.username">${hibernate.connection.username}=
</prop
>>>
>>>
>>>
>>> <prop
>>>key=3D"hibernate.connection.password">${hibernate.connection.password}=
</prop
>>>
>>>
>>>
>>> <prop
>>>key=3D"hibernate.connection.datasource">${hibernate.connection.datasou=
rce}</
>>>
>>>prop>
>>> </props>
>>> </property>
>>> </bean>
>>>--------------------------------------
>>>IN jdbc.properties:
>>>
>>>hibernate.dialect=3Dnet.sf.hibernate.dialect.DB2Dialect
>>>hibernate.showsql=3Dtrue
>>>hibernate.connection.username=3Dme
>>>hibernate.connection.password=3Dmypassword
>>>hibernate.connection.datasource=3Djdbc/mydatasource
>>>
>>>Let's see what I can find,
>>>Rob
>>>
>>>-----Original Message-----
>>>From: Loren, Robert [mailto:Rob...@ca...]
>>>Sent: Thursday, May 27, 2004 7:16 PM
>>>To: 'spr...@li...'
>>>Subject: RE: [Springframework-user] JNDI dataSource with separate
>>>user/pas sword/schema strings
>>>
>>>
>>>Thanks for your reply, Colin.
>>>
>>>Yes, we do want the datasource to be setup by the admin in the
>>>container,
>>>then accessed by the app. In DB2, you can pass the username and =
password
>>>to the getConnection() method of the datasource, and that is what
>>>most of
>>>our in-house code is doing. We then use the schema name in our =
queries
>>>when connecting up. I guess it's the runtime use of these parameters,
>>>through the session/template, that we're trying to emulate. If the
>>>datasource could be injected with the user and password somehow, that
>>>would be fine, but I don't see that as possible.
>>>
>>>Hibernate has properties such as "hibernate.connection.username" that
>>>seem
>>>available for the SessionFactory. I'm trying to get those to work =
with
>>>strings at the moment. But if successful there, I'd like to somehow =
swap
>>>them out with JNDI-located strings.
>>>
>>>Hope this gives you more,
>>>Rob
>>>
>>>-----Original Message-----
>>>From: Colin Sampaleanu [mailto:col...@ex...]
>>>Sent: Thursday, May 27, 2004 6:47 PM
>>>To: spr...@li...
>>>Subject: Re: [Springframework-user] JNDI dataSource with separate
>>>user/password/schema strings
>>>
>>>
>>>Loren, Robert wrote:
>>>
>>>
>>>
>>> =20
>>>
>>>>Hi,
>>>>
>>>>We're looking to deploy into a WAS 5/DB2 environment with a
>>>>Spring/Hibernate-based application.
>>>>
>>>>We're excited, but worried at this point, trying to figure out how
>>>>to get
>>>>a pooled data source wired up from WAS's JNDI store.
>>>>
>>>>It was very easy to wire the data source itself, using the
>>>>JndiObjectFactoryBean from looking at the examples. However, our
>>>>Architecture group wants us to store the name, password, and schema =
we
>>>>
>>>> =20
>>>>
>>>use
>>>
>>>
>>> =20
>>>
>>>>externally to the data source itself.
>>>>
>>>>I'm looking for something similar to how the strings are stored in =
the
>>>>jdbc.properties file for DriverManagerDataSource, only maybe using =
the
>>>>JndiObjectFactoryBeans wired into the SessionFactory properties.
>>>>
>>>>Does anyone have sample code on how this might be configured? Should =
I
>>>>maybe be posting this to the developer group?
>>>>
>>>>Thanks very much for any help in advance, and thanks for Spring,
>>>>
>>>>Rob
>>>>
>>>>
>>>>
>>>> =20
>>>>
>>>Rob,
>>>
>>>I'm a little confused about what you're trying to do, and about the
>>>DataSource lifecycle you want to achieve. I presume that as opposed
>>>to the normal scenario where a sysadmin or deployer sets up the one
>>>datasource (which gets bound to JNDI) in the appserver, you would
>>>like Spring to create the datasource, based on config params which
>>>are provided by/to Spring?
>>>
>>>There is nothing stopping you from creating something like an Apache
>>>DBCP Datasource, and using that. However, you are then going to give
>>>up the much more robust WAS DataSource impl. which is integrated into
>>>the container and the container's transaction manager.
>>>
>>>Can you provide more details?
>>>
>>>Regards,
>>>Colin
>>>
>>>
>>> =20
>>>
>>
>>-------------------------------------------------------
>>This SF.Net email is sponsored by: Oracle 10g
>>Get certified on the hottest thing ever to hit the market... Oracle
>>10g. Take an Oracle 10g class now, and we'll give you the exam FREE.
>>http://ads.osdn.com/?ad_id=3D3149&alloc_id=3D8166&op=3Dclick
>>_______________________________________________
>>Springframework-user mailing list
>>Spr...@li...
>>https://lists.sourceforge.net/lists/listinfo/springframework-user
>>
>>
>>
>> =20
>>
>
>
>
>-------------------------------------------------------
>This SF.Net email is sponsored by: Oracle 10g
>Get certified on the hottest thing ever to hit the market... Oracle =
10g.
>Take an Oracle 10g class now, and we'll give you the exam FREE.
>http://ads.osdn.com/?ad_id=3D3149&alloc_id=3D8166&op=3Dclick
>_______________________________________________
>Springframework-user mailing list
>Spr...@li...
>https://lists.sourceforge.net/lists/listinfo/springframework-user
>
>
>
>
>-------------------------------------------------------
>This SF.Net email is sponsored by: Oracle 10g
>Get certified on the hottest thing ever to hit the market... Oracle =
10g.
>Take an Oracle 10g class now, and we'll give you the exam FREE.
>http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dick
>_______________________________________________
>Springframework-user mailing list
>Spr...@li...
>https://lists.sourceforge.net/lists/listinfo/springframework-user
>
>
>
>
>-------------------------------------------------------
>This SF.Net email is sponsored by: Oracle 10g
>Get certified on the hottest thing ever to hit the market... Oracle =
10g.
>Take an Oracle 10g class now, and we'll give you the exam FREE.
>http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dclick
>_______________________________________________
>Springframework-user mailing list
>Spr...@li...
>https://lists.sourceforge.net/lists/listinfo/springframework-user
>
>
>
>=20
>
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3D3149&alloc_id=3D8166&op=3Dclick
_______________________________________________
Springframework-user mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-user
|
|
From: Mason, R. <ros...@vi...> - 2004-05-28 11:42:43
|
SGksDQpJJ20gd3JpdGluZyBzb21lIGV4dGVuc2lvbnMgdG8gaW50ZWdyYXRlIFNwcmluZyB3aXRo IE11bGUgKE11bGUgaXMgYW4gRVNCIC0gd3d3Lm11bGV1bW8ub3JnKS4gSSdtIHN0YXJ0aW5nIHdp dGggYW4gZXh0ZW5zaW9uIHRvIFNwcmluZydzIEFwcGxpY2F0aW9uRXZlbnQgaW1wbGVtZW50YXRp b24gdG8gYWxsb3cgYmVhbnMgdG8gcmVjZWl2ZSBNdWxlIGV2ZW50cy4NCiANCk11bGUgZXZlbnRz IGNhbiBiZSBzZW50IG92ZXIgdHJhbnNwb3J0cyBzdWNoIGFzIGptcywgaHR0cCwgc210cCwgcG9w MywgdGNwLCBldGMgc28gYSBiZWFuIGluIGEgU3ByaW5nIGNvbnRleHQgY291bGQgaW1wbGVtZW50 IGEgSm1zRXZlbnRMaXN0ZW5lciwgcG9wM0V2ZW50TGlzdGVuZXIsIGV0YyB0byByZWNlaXZlIGV2 ZW50cyBwdWJsaXNoZWQgaW4gTXVsZS4gIFBsdXMgdGhlIG9ic2VydmVyIGludGVyZmFjZSBjb3Vs ZCBleHBvc2Ugc3Vic2NyaXB0aW9uIG1ldGhvZHMgdG8gZW5hYmxlIE11bGUgdG8gcHVibGlzaCB0 byBkaWZmZXJlbnQgc3Vic2NyaXB0aW9ucywgaS5lLg0KIA0KcHVibGljIGNsYXNzIEptc0V2ZW50 TGlzdGVuZXIgaW1wbGVtZW50cyBBcHBsaWNhdGlvbkV2ZW50IHsNCiANCiAgICBwdWJsaWMgdm9p ZCBzZXRTdWJzY3JpcHRpb24oU3RyaW5nIHN1YnNjcmlwdGlvbik7DQogDQogICAgcHVibGljIFN0 cmluZyBnZXRTdWJzY3JpcHRpb24oKTsNCn0NCiANClRoaXMgd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lciBleHBvc2luZyB0aGUgRXZlbnRNdWx0 aWNhc3Rlcj8NCiANCkNoZWVycywNCiANClJvc3MNCg== |
|
From: <jue...@we...> - 2004-05-28 11:25:53
|
I plan to release 1.0.2 tomorrow morning - finally... =20 BTW, I'm committing a couple of minor refinements during the course of = today. Among them is that BeanWrapperImpl registers default editors for = Boolean and Number objects now, using Integer.valueOf/toString etc. =20 Juergen =20 ________________________________ Von: spr...@li... im Auftrag = von Alef Arendsen Gesendet: Fr 28.05.2004 12:47 An: spr...@li... Betreff: RE: [Springframework-developer] Preparing for 1.0.2 Juergen, if you still need to release 1.0.2, the doco for the scheduler = can still make it. I've inserted an issue in jira, but set the fix = version to 1.0.3, if the doco makes it, I'll switch it to 1.0.2 Alef -----Original Message----- From: spr...@li... = [mailto:spr...@li...] On Behalf = Of j=FCrgen h=F6ller [werk3AT] Sent: Thursday, May 27, 2004 7:01 PM To: spr...@li... Subject: Re: [Springframework-developer] Preparing for 1.0.2 Looking at it the other way round: Why not use the DataSource itself as = key? That's what we're doing to manage transactional resources too. Juergen -----Original Message----- From: spr...@li... [mailto:spr...@li...]On Behalf Of tho...@tr... Sent: Thursday, May 27, 2004 5:38 PM To: spr...@li... Subject: Re: [Springframework-developer] Preparing for 1.0.2 I remember we considered it extremely unlikely that two datasources for different database products would have the same hash value - also, the = worst case scenario would be a poor translation of an error. It would not = cause an error. If you feel using the actual datasource as the key is safer, then I'm OK = with that too. Thomas Quoting "j=FCrgen h=F6ller [werk3AT]" <jue...@we...>: > I've also reworked SQLErrorCodesFactory to use the DataSource itself = as =3D > key of the dataSourceProductName HashMap, instead of the previous =3D > Integer built from DataSource.hashCode. With the new SQLErrorCodes =3D > themselves being held in a WeakReference, this shouldn't cause garbage = =3D > collection issues. > > Actually, the previous strategy wasn't entirely safe: If two different = =3D > DataSources had the same hashCode, they would have overwritten each = =3D > other in the Map, as the corresponding Integer keys would have been = =3D > equal. With the DataSources themselves as keys, same hashCodes would = =3D > just result in less efficient hash lookup but correct storage of both = =3D > DataSources. > > Juergen > > > -----Original Message----- > From: spr...@li... > [mailto:spr...@li...]On = Behalf > Of j=3DFCrgen h=3DF6ller [werk3AT] > Sent: Thursday, May 27, 2004 11:08 AM > To: spr...@li... > Subject: Re: [Springframework-developer] Preparing for 1.0.2 > > > Further minor refinements that I committed yesterday: > =3D20 > - added IncorrectResultSizeDataAccessException to dao package > - added DataAccessUtils class to dao.support package, providing =3D > "uniqueResult" and "requiredUniqueResult" methods > - refactored SqlQuery.findObject to delegate to =3D > DataAccessUtils.uniqueResult > =3D20 > DataAccessUtils.uniqueResult should be useful for any DAO that = receives =3D > a List and expects a unique result object in it, for example with =3D > Hibernate finders, i.e. Session.find respectively =3D > HibernateTemplate.find. The uniqueResult method throws =3D > IncorrectResultSizeDataAccessException if the result is not actually = =3D > unique; that's why it is in the dao.support package. > =3D20 > Juergen > =3D20 > > ________________________________ > > Von: spr...@li... im Auftrag = =3D > von j=3DFCrgen h=3DF6ller [werk3AT] > Gesendet: Do 27.05.2004 10:33 > An: spr...@li... > Betreff: Re: [Springframework-developer] Preparing for 1.0.2 > > > > Oh well, time schedules and my perfectionism... > > I've done some further polishing, committed yesterday morning =3D > respectively today: > > - I've factored out RowMapperResultReader from SqlParameter, to make = =3D > RowMapper usable for plain JDBC queries too > - JdbcTemplate.call respectively StoredProcedure supports =3D > ResultSetExtractor as output parameter too > - I've slightly refactored JdbcTemplate.call's implementation to allow = =3D > for a higher level of code reuse > > - AbstractAutowireCapableBeanFactory catches Throwable on bean = creation, =3D > rethrowing it as meaningful BeanCreationException > - DefaultListableBeanFactory.preInstantiateSingletons cleans up = already =3D > created singletons if it fails > - XmlViewResolver and ResourceBundleViewResolver clean up their view = =3D > bean factories on context shutdown > > Thomas, it would be great if you had a chance to review the JDBC =3D > changes, and maybe run a couple of integration tests with stored =3D > procedures - to make sure that I haven't broken anything, even if the = =3D > test suite passes. > > As there haven't been any reports on problems with the garbage =3D > collection changes, I plan to go ahead and finalize 1.0.2 for = tomorrow. > > Juergen > > > ________________________________ > > Von: spr...@li... im Auftrag = =3D > von j=3DFCrgen h=3DF6ller [werk3AT] > Gesendet: Mi 26.05.2004 07:38 > An: spr...@li... > Betreff: Re: [Springframework-developer] Preparing for 1.0.2 > > > > There hasn't been any change in AbstractXsltView since 1.0 final, so I = =3D > guess this is usual behavior... > > BTW, current planned release date: tonight! I know, I know - this time = =3D > for real, provided that there's no showstopper :-) > > Juergen > > > ________________________________ > > Von: spr...@li... im Auftrag = =3D > von Darren Davison > Gesendet: Mi 26.05.2004 01:40 > An: spr...@li... > Betreff: Re: [Springframework-developer] Preparing for 1.0.2 > > > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On Wednesday 26 May 2004 00:27, Darren Davison wrote: > > > AbstractXsltView (line 143) shown below is throwing a > > TransformerConfigurationException. The stylesheet is correctly = loaded > > and appears valid whether loaded from a servlet context resource or = a > > classpath resource (the 2 I tried). > > hmm.. > > it seems that removing any <xsl:output> tags in the stylesheets =3D > themselves > makes the problem disappear. That strikes me as a bit odd though: has > something changed recently in XSL world? I can't find any info on =3D > this.. > > Cheers, > - -- > Darren Davison > Public Key: http://www.davison.uk.net/pages/key.htm > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.2.4 (GNU/Linux) > > iD8DBQFAs9l7KLMLAN01aw0RAgFCAJ97NbqA547fyx6rCQLiSXkCUFWreQCghOiD > Tle6ycCFcmn5hNf2ZLZznX0=3D3D > =3D3D4YWT > -----END PGP SIGNATURE----- > > > ------------------------------------------------------- > This SF.Net email is sponsored by: Oracle 10g > Get certified on the hottest thing ever to hit the market... Oracle = 10g. > Take an Oracle 10g class now, and we'll give you the exam FREE. > http://ads.osdn.com/?ad_id149&alloc_id=3D8166&op=3D3Dick > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: Oracle 10g > Get certified on the hottest thing ever to hit the market... Oracle = 10g. > Take an Oracle 10g class now, and we'll give you the exam FREE. > http://ads.osdn.com/?ad_id149&alloc_id=3D8166&op=3D3Dick > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: Oracle 10g > Get certified on the hottest thing ever to hit the market... Oracle = 10g. > Take an Oracle 10g class now, and we'll give you the exam FREE. > http://ads.osdn.com/?ad_id149&alloc_id=3D8166&op=3D3Dick > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: Oracle 10g > Get certified on the hottest thing ever to hit the market... Oracle = 10g. =3D > > Take an Oracle 10g class now, and we'll give you the exam FREE. > http://ads.osdn.com/?ad_id149&alloc_id=3D8166&op=3D3Dick > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > > > ------------------------------------------------------- > This SF.Net email is sponsored by: Oracle 10g > Get certified on the hottest thing ever to hit the market... Oracle = 10g. > Take an Oracle 10g class now, and we'll give you the exam FREE. > http://ads.osdn.com/?ad_id=3D3149&alloc_id=3D8166&op=3Dclick > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3D3149&alloc_id=3D8166&op=3Dclick _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dick _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dick _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |
|
From: Alef A. <al...@jt...> - 2004-05-28 10:45:39
|
Juergen, if you still need to release 1.0.2, the doco for the scheduler = can still make it. I've inserted an issue in jira, but set the fix = version to 1.0.3, if the doco makes it, I'll switch it to 1.0.2 Alef -----Original Message----- From: spr...@li... = [mailto:spr...@li...] On Behalf = Of j=FCrgen h=F6ller [werk3AT] Sent: Thursday, May 27, 2004 7:01 PM To: spr...@li... Subject: Re: [Springframework-developer] Preparing for 1.0.2 Looking at it the other way round: Why not use the DataSource itself as = key? That's what we're doing to manage transactional resources too. Juergen -----Original Message----- From: spr...@li... [mailto:spr...@li...]On Behalf Of tho...@tr... Sent: Thursday, May 27, 2004 5:38 PM To: spr...@li... Subject: Re: [Springframework-developer] Preparing for 1.0.2 I remember we considered it extremely unlikely that two datasources for different database products would have the same hash value - also, the = worst case scenario would be a poor translation of an error. It would not = cause an error. If you feel using the actual datasource as the key is safer, then I'm OK = with that too. Thomas Quoting "j=FCrgen h=F6ller [werk3AT]" <jue...@we...>: > I've also reworked SQLErrorCodesFactory to use the DataSource itself = as =3D > key of the dataSourceProductName HashMap, instead of the previous =3D > Integer built from DataSource.hashCode. With the new SQLErrorCodes =3D > themselves being held in a WeakReference, this shouldn't cause garbage = =3D > collection issues. > > Actually, the previous strategy wasn't entirely safe: If two different = =3D > DataSources had the same hashCode, they would have overwritten each = =3D > other in the Map, as the corresponding Integer keys would have been = =3D > equal. With the DataSources themselves as keys, same hashCodes would = =3D > just result in less efficient hash lookup but correct storage of both = =3D > DataSources. > > Juergen > > > -----Original Message----- > From: spr...@li... > [mailto:spr...@li...]On = Behalf > Of j=3DFCrgen h=3DF6ller [werk3AT] > Sent: Thursday, May 27, 2004 11:08 AM > To: spr...@li... > Subject: Re: [Springframework-developer] Preparing for 1.0.2 > > > Further minor refinements that I committed yesterday: > =3D20 > - added IncorrectResultSizeDataAccessException to dao package > - added DataAccessUtils class to dao.support package, providing =3D > "uniqueResult" and "requiredUniqueResult" methods > - refactored SqlQuery.findObject to delegate to =3D > DataAccessUtils.uniqueResult > =3D20 > DataAccessUtils.uniqueResult should be useful for any DAO that = receives =3D > a List and expects a unique result object in it, for example with =3D > Hibernate finders, i.e. Session.find respectively =3D > HibernateTemplate.find. The uniqueResult method throws =3D > IncorrectResultSizeDataAccessException if the result is not actually = =3D > unique; that's why it is in the dao.support package. > =3D20 > Juergen > =3D20 > > ________________________________ > > Von: spr...@li... im Auftrag = =3D > von j=3DFCrgen h=3DF6ller [werk3AT] > Gesendet: Do 27.05.2004 10:33 > An: spr...@li... > Betreff: Re: [Springframework-developer] Preparing for 1.0.2 > > > > Oh well, time schedules and my perfectionism... > > I've done some further polishing, committed yesterday morning =3D > respectively today: > > - I've factored out RowMapperResultReader from SqlParameter, to make = =3D > RowMapper usable for plain JDBC queries too > - JdbcTemplate.call respectively StoredProcedure supports =3D > ResultSetExtractor as output parameter too > - I've slightly refactored JdbcTemplate.call's implementation to allow = =3D > for a higher level of code reuse > > - AbstractAutowireCapableBeanFactory catches Throwable on bean = creation, =3D > rethrowing it as meaningful BeanCreationException > - DefaultListableBeanFactory.preInstantiateSingletons cleans up = already =3D > created singletons if it fails > - XmlViewResolver and ResourceBundleViewResolver clean up their view = =3D > bean factories on context shutdown > > Thomas, it would be great if you had a chance to review the JDBC =3D > changes, and maybe run a couple of integration tests with stored =3D > procedures - to make sure that I haven't broken anything, even if the = =3D > test suite passes. > > As there haven't been any reports on problems with the garbage =3D > collection changes, I plan to go ahead and finalize 1.0.2 for = tomorrow. > > Juergen > > > ________________________________ > > Von: spr...@li... im Auftrag = =3D > von j=3DFCrgen h=3DF6ller [werk3AT] > Gesendet: Mi 26.05.2004 07:38 > An: spr...@li... > Betreff: Re: [Springframework-developer] Preparing for 1.0.2 > > > > There hasn't been any change in AbstractXsltView since 1.0 final, so I = =3D > guess this is usual behavior... > > BTW, current planned release date: tonight! I know, I know - this time = =3D > for real, provided that there's no showstopper :-) > > Juergen > > > ________________________________ > > Von: spr...@li... im Auftrag = =3D > von Darren Davison > Gesendet: Mi 26.05.2004 01:40 > An: spr...@li... > Betreff: Re: [Springframework-developer] Preparing for 1.0.2 > > > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On Wednesday 26 May 2004 00:27, Darren Davison wrote: > > > AbstractXsltView (line 143) shown below is throwing a > > TransformerConfigurationException. The stylesheet is correctly = loaded > > and appears valid whether loaded from a servlet context resource or = a > > classpath resource (the 2 I tried). > > hmm.. > > it seems that removing any <xsl:output> tags in the stylesheets =3D > themselves > makes the problem disappear. That strikes me as a bit odd though: has > something changed recently in XSL world? I can't find any info on =3D > this.. > > Cheers, > - -- > Darren Davison > Public Key: http://www.davison.uk.net/pages/key.htm > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.2.4 (GNU/Linux) > > iD8DBQFAs9l7KLMLAN01aw0RAgFCAJ97NbqA547fyx6rCQLiSXkCUFWreQCghOiD > Tle6ycCFcmn5hNf2ZLZznX0=3D3D > =3D3D4YWT > -----END PGP SIGNATURE----- > > > ------------------------------------------------------- > This SF.Net email is sponsored by: Oracle 10g > Get certified on the hottest thing ever to hit the market... Oracle = 10g. > Take an Oracle 10g class now, and we'll give you the exam FREE. > http://ads.osdn.com/?ad_id149&alloc_id=3D8166&op=3D3Dick > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: Oracle 10g > Get certified on the hottest thing ever to hit the market... Oracle = 10g. > Take an Oracle 10g class now, and we'll give you the exam FREE. > http://ads.osdn.com/?ad_id149&alloc_id=3D8166&op=3D3Dick > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: Oracle 10g > Get certified on the hottest thing ever to hit the market... Oracle = 10g. > Take an Oracle 10g class now, and we'll give you the exam FREE. > http://ads.osdn.com/?ad_id149&alloc_id=3D8166&op=3D3Dick > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: Oracle 10g > Get certified on the hottest thing ever to hit the market... Oracle = 10g. =3D > > Take an Oracle 10g class now, and we'll give you the exam FREE. > http://ads.osdn.com/?ad_id149&alloc_id=3D8166&op=3D3Dick > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > > > ------------------------------------------------------- > This SF.Net email is sponsored by: Oracle 10g > Get certified on the hottest thing ever to hit the market... Oracle = 10g. > Take an Oracle 10g class now, and we'll give you the exam FREE. > http://ads.osdn.com/?ad_id=3D3149&alloc_id=3D8166&op=3Dclick > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. = Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3D3149&alloc_id=3D8166&op=3Dclick _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. = Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dick _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |
|
From: Alef A. <al...@jt...> - 2004-05-28 10:42:54
|
Done... It's in the CVS but still needs to be published. Will do that later on! Alef -----Original Message----- From: spr...@li... [mailto:spr...@li...] On Behalf Of Mike Cannon-Brookes Sent: Friday, May 28, 2004 9:31 AM To: Spring Developer Subject: [Springframework-developer] Documentation todo A small todo - I was reading the documentation today: http://www.springframework.org/docs/reference/index.html (truly excellent start btw - I didn't even know this existed, great work!) It doesn't currently contain anything about Quartz, probably should be a small chapter at the end like the Mail chapter (for the sake of completeness). Cheers, Mike ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3D3149&alloc_id=3D8166&op=3Dclick _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |
|
From: Alef A. <al...@jt...> - 2004-05-28 08:24:48
|
Errr, I replied to the wrong email I guess ;-)
It was supposed to be a reply to the scheduling question from Mike CB
Alef
-----Original Message-----
From: spr...@li... =
[mailto:spr...@li...] On Behalf =
Of Alef Arendsen
Sent: Friday, May 28, 2004 10:16 AM
To: spr...@li...
Subject: RE: [Springframework-developer] Strange 'double' singleton bug
I've inserted an issue in JIRA. I'll see what I can do today.
By the way, could somebody create a component for documentation in JIRA?
Alef
-----Original Message-----
From: spr...@li...
[mailto:spr...@li...] On Behalf
Of Mike Cannon-Brookes
Sent: Friday, May 28, 2004 8:46 AM
To: Spring Developer
Subject: [Springframework-developer] Strange 'double' singleton bug
I'm not sure if this is a bug or not, it's certainly strange behaviour.
We had a singleton bean that was operating normally, but when we make
it implement ApplicationListener - we get _two_ instances of it
created. (Tested by simply putting a debug point in the constructor -
two separate beans are created)
Here's the config snippet:
<bean id=3D"macroManager"
class=3D"com.atlassian.renderer.macro.DefaultMacroManager">
<constructor-arg>
<ref local=3D"macroStateStore"/>
</constructor-arg>
<constructor-arg>
<list>
<ref local=3D"beanMacroLoader"/>
<ref local=3D"classpathMacroLoader"/>
</list>
</constructor-arg>
</bean>
Is this a known bug, a feature or am I not meant to use
ApplicationListener this way? (if it's a bug it's quite serious I'd
say)
I want to do it this way because another part of Confluence fires an
event to say that all setup has finished - and I want this bean to
listen for that event and further initialize itself.
I just guessed that in Spring I would just need to implement the
ApplicationListener interface and listen for events - if I need to do
anything else, let me know :)
Cheers,
Mike
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3D3149&alloc_id=3D8166&op=3Dclick
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. =
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dick
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
|
|
From: Alef A. <al...@jt...> - 2004-05-28 08:09:58
|
I've inserted an issue in JIRA. I'll see what I can do today.
By the way, could somebody create a component for documentation in JIRA?
Alef
-----Original Message-----
From: spr...@li...
[mailto:spr...@li...] On Behalf
Of Mike Cannon-Brookes
Sent: Friday, May 28, 2004 8:46 AM
To: Spring Developer
Subject: [Springframework-developer] Strange 'double' singleton bug
I'm not sure if this is a bug or not, it's certainly strange behaviour.
We had a singleton bean that was operating normally, but when we make
it implement ApplicationListener - we get _two_ instances of it
created. (Tested by simply putting a debug point in the constructor -
two separate beans are created)
Here's the config snippet:
<bean id=3D"macroManager"
class=3D"com.atlassian.renderer.macro.DefaultMacroManager">
<constructor-arg>
<ref local=3D"macroStateStore"/>
</constructor-arg>
<constructor-arg>
<list>
<ref local=3D"beanMacroLoader"/>
<ref local=3D"classpathMacroLoader"/>
</list>
</constructor-arg>
</bean>
Is this a known bug, a feature or am I not meant to use
ApplicationListener this way? (if it's a bug it's quite serious I'd
say)
I want to do it this way because another part of Confluence fires an
event to say that all setup has finished - and I want this bean to
listen for that event and further initialize itself.
I just guessed that in Spring I would just need to implement the
ApplicationListener interface and listen for events - if I need to do
anything else, let me know :)
Cheers,
Mike
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3D3149&alloc_id=3D8166&op=3Dclick
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
|
|
From: Mike Cannon-B. <mca...@gm...> - 2004-05-28 07:18:28
|
A small todo - I was reading the documentation today: http://www.springframework.org/docs/reference/index.html (truly excellent start btw - I didn't even know this existed, great work!) It doesn't currently contain anything about Quartz, probably should be a small chapter at the end like the Mail chapter (for the sake of completeness). Cheers, Mike |
|
From: Mike Cannon-B. <mca...@gm...> - 2004-05-28 06:39:50
|
I'm not sure if this is a bug or not, it's certainly strange behaviour.
We had a singleton bean that was operating normally, but when we make
it implement ApplicationListener - we get _two_ instances of it
created. (Tested by simply putting a debug point in the constructor -
two separate beans are created)
Here's the config snippet:
<bean id="macroManager"
class="com.atlassian.renderer.macro.DefaultMacroManager">
<constructor-arg>
<ref local="macroStateStore"/>
</constructor-arg>
<constructor-arg>
<list>
<ref local="beanMacroLoader"/>
<ref local="classpathMacroLoader"/>
</list>
</constructor-arg>
</bean>
Is this a known bug, a feature or am I not meant to use
ApplicationListener this way? (if it's a bug it's quite serious I'd
say)
I want to do it this way because another part of Confluence fires an
event to say that all setup has finished - and I want this bean to
listen for that event and further initialize itself.
I just guessed that in Spring I would just need to implement the
ApplicationListener interface and listen for events - if I need to do
anything else, let me know :)
Cheers,
Mike
|
|
From: Rodrigo K. <ku...@re...> - 2004-05-27 21:42:18
|
Hi. I tried to produce some sort of classloading hack to minimize this problem but I found that it's nether Spring's or Tomcat's fault. The problem can be caused by simple use of j2se APIs. All your patches won't really reduce the problem as no class can be collected before it's classloader, the spec says that and the ClassLoader implementation from Sun enforce. Most of the times the OOM during hotdeploy is caused by not having enouth memory for the class semi-space, or whatever it's name is, and not for regular objects. Some API's have caching and thus break class unloading, an example is java.beans.Introspector, you must call Introspector.flushCaches() during context destroy on Sun JVM, and this is a bug as it should use weak references. I believe the solution is to look for these classes and never use any non-standard classes the container makes available. Anyway, it will only work if your container provides classloading that is not broken like some AS do. |