You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by "rzo1 (via GitHub)" <gi...@apache.org> on 2023/06/27 08:46:54 UTC

[GitHub] [tomee] rzo1 opened a new pull request, #1059: TOMEE-4226 - Check for modern PostgreSQL driver, if JDBCUrl is not specified in @DataSourceDefinition

rzo1 opened a new pull request, #1059:
URL: https://github.com/apache/tomee/pull/1059

   # What does this PR do?
   
   Check for modern PostgreSQL driver, if JDBCUrl is not specified in @DataSourceDefinition
   
   Fixes TOMEE-4226: https://issues.apache.org/jira/browse/TOMEE-4226


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@tomee.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tomee] rmannibucau commented on pull request #1059: TOMEE-4226 - Check for modern PostgreSQL driver, if JDBCUrl is not specified in @DataSourceDefinition

Posted by "rmannibucau (via GitHub)" <gi...@apache.org>.
rmannibucau commented on PR #1059:
URL: https://github.com/apache/tomee/pull/1059#issuecomment-1609073330

   if it helps, my two cents would be it can be worth adding a DataSourceDefinitionUrlBuild openejb event since these guessed URL are rarely prod friendly urls so firing the event with the data we have (from the annot) and allowing to set an URL can be a way to enable users to customize the way the url is built (plugin like) then supporting by default all world patterns become less important since there are several cases we just have to do a choice so 50% it can be wrong ;).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@tomee.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tomee] rzo1 commented on pull request #1059: TOMEE-4226 - Check for modern PostgreSQL driver, if JDBCUrl is not specified in @DataSourceDefinition

Posted by "rzo1 (via GitHub)" <gi...@apache.org>.
rzo1 commented on PR #1059:
URL: https://github.com/apache/tomee/pull/1059#issuecomment-1609069001

   @cesarhernandezgt @jeanouii This can also happen for **MariaDB** driver, so I am wondering, if we should include that here as well (might be more common than **MySQL** these days). wdyt?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@tomee.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tomee] rzo1 merged pull request #1059: TOMEE-4226 - Check for modern PostgreSQL driver, if JDBCUrl is not specified in @DataSourceDefinition

Posted by "rzo1 (via GitHub)" <gi...@apache.org>.
rzo1 merged PR #1059:
URL: https://github.com/apache/tomee/pull/1059


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@tomee.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tomee] rzo1 commented on pull request #1059: TOMEE-4226 - Check for modern PostgreSQL driver, if JDBCUrl is not specified in @DataSourceDefinition

Posted by "rzo1 (via GitHub)" <gi...@apache.org>.
rzo1 commented on PR #1059:
URL: https://github.com/apache/tomee/pull/1059#issuecomment-1609300183

   I went ahead and did a test impl for the `@Event` `DataSourceDefinitionUrlBuild` (at least from my understanding of your idea :-) ) 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@tomee.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tomee] rzo1 commented on pull request #1059: TOMEE-4226 - Check for modern PostgreSQL driver, if JDBCUrl is not specified in @DataSourceDefinition

Posted by "rzo1 (via GitHub)" <gi...@apache.org>.
rzo1 commented on PR #1059:
URL: https://github.com/apache/tomee/pull/1059#issuecomment-1609117804

   If I understand the idea correctly, that would mean, that we create something like:
   
   ```bash
   
   package org.apache.openejb.config.event;
   
   import org.apache.openejb.jee.DataSource;
   import org.apache.openejb.observer.Event;
   
   @Event
   public class DataSourceDefinitionUrlBuild {
   
       private final DataSource ds;
   
       public DataSourceDefinitionUrlBuild(DataSource ds) {
           this.ds = ds;
       }
   
       //getters
   }
   
   ```
   and fire it as soon as we build a `org.apache.openejb.jee.DataSource` from `@DataSourceDefinition` in `AnnotationDeployer#buildDataSourceDefinition(...)` ?
   
   Someone could then do something like:
   
   ```bash
       public void adjustDataSourceDefinition(@Observes final DataSourceDefinitionUrlBuild event) {
         //do something (for example set a custom jdbc url).
       }
   ````
   
   and register that class via `org.apache.openejb.extension` in `META-INF`, right?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@tomee.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org