deltaspike-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Struberg <strub...@yahoo.de>
Subject Re: [DISCUSS] deltaspike-jpa module features
Date Sun, 06 May 2012 12:14:04 GMT


No, the container is NOT buggy, because it's simply NOT defined!
That's the whole mess about JNDI...

LieGrue,
strub




>________________________________
> From: Romain Manni-Bucau <rmannibucau@gmail.com>
>To: Mark Struberg <struberg@yahoo.de> 
>Sent: Sunday, May 6, 2012 2:01 PM
>Subject: Re: [DISCUSS] deltaspike-jpa module features
> 
>
>So this container is buggy, report an issue ;)
>Thinking of it this jndi path issue couldnt be resolved by configresolvers in ds?
>- Romain
>Le 6 mai 2012 13:58, "Mark Struberg" <struberg@yahoo.de> a écrit :
>
>yes, that crashes the container...
>>
>>
>>
>>
>>
>>>________________________________
>>> From: Romain Manni-Bucau <rmannibucau@gmail.com>
>>>To: Mark Struberg <struberg@yahoo.de>; deltaspike-dev@incubator.apache.org

>>>Sent: Sunday, May 6, 2012 1:52 PM
>>>Subject: Re: [DISCUSS] deltaspike-jpa module features
>>> 
>>>
>>>Mark, did you try providing a name starting with java:?
>>>- Romain
>>>Le 6 mai 2012 13:49, "Mark Struberg" <struberg@yahoo.de> a écrit :
>>>
>>>
>>>>
>>>>David, exactly this doesn't work out in practice!
>>>>
>>>>look at jboss5 datasource xml as an example:
>>>>
>>>><?xml version="1.0" encoding="UTF-8"?>
>>>><datasources>
>>>>        <local-tx-datasource>
>>>>                <jndi-name>myDS</jndi-name>
>>>>                <connection-url>jdbc:postgresql://someserver:5432/someDb</connection-url>
>>>>                <user-name>user</user-name>
>>>>                <password>pwd</password>
>>>>                <driver-class>org.postgresql.Driver</driver-class>             
>>>>        </local-tx-datasource>
>>>></datasources>
>>>>
>>>>This will create the following JNDI location in JBossAS5: java:/myDS
>>>>
>>>>NO comp, NO lang, NO other qualifier.
>>>>
>>>>Configuring the same in Geronimo gives you java:/comp/env/myDS
>>>>and it's again COMPLETEY different in JBossAS6, AS7, Glassfish, TomEE, etc
>>>>
>>>>
>>>>Thus: which JNDI location would you configure in your persistence.xml?
>>>>
>>>>That's the reason why we came up with the ConfigurableDataSource.
>>>>
>>>>Of course, we need to extend this concept and create a
>>>>
>>>>
>>>>public interface ConfigurableXaDataSource extends ConfigurableDataSource,
XaDataSource {}
>>>>
>>>>See what I mean?
>>>>
>>>>LieGrue,
>>>>strub
>>>>
>>>>
>>>>
>>>>
>>>>----- Original Message -----
>>>>> From: David Blevins <david.blevins@gmail.com>
>>>>> To: deltaspike-dev@incubator.apache.org; Mark Struberg <struberg@yahoo.de>
>>>>> Cc:
>>>>> Sent: Sunday, May 6, 2012 1:25 PM
>>>>> Subject: Re: [DISCUSS] deltaspike-jpa module features
>>>>>
>>>>>
>>>>> On May 6, 2012, at 2:37 AM, Mark Struberg wrote:
>>>>>
>>>>>>>  In plain Tomcat or
>>>>>>>  Jetty servers this needs to be configured in a container-specific
way.
>>>>>>  The problem with the container specific stuff is that every container
>>>>> serves the xml configured datasource on a different location in JNDI!
So you
>>>>> cannot provide a container independent implementation that way :/
>>>>>
>>>>> The portable way would be to declare your datasource properly via
>>>>> @Resource(name="java:app/Foo", type=DataSource.class) or via
>>>>> <resource-ref> xml.
>>>>>
>>>>> Most servers can map those references with little to no config.
>>>>>
>>>>>
>>>>> -David
>>>>>
>>>>
>>>
>>>
>
>

Mime
View raw message