You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "David Jencks (JIRA)" <de...@geronimo.apache.org> on 2004/12/05 08:56:20 UTC

[jira] Created: (GERONIMO-513) jndi refs should result in dependencies, optionally

jndi refs should result in dependencies, optionally
---------------------------------------------------

         Key: GERONIMO-513
         URL: http://nagoya.apache.org/jira/browse/GERONIMO-513
     Project: Apache Geronimo
        Type: New Feature
  Components: naming  
    Versions: 1.0-M3    
    Reporter: David Jencks
 Assigned to: David Jencks 


After non-reference gbean dependencies (GERONIMO-512) are implemented, jndi refs should result in creating these dependencies.  They need to be optional to take account of (at least) these scenarios:

1. circular ejb references A uses B uses A.  
2. An ejb has 2 resource refs: if the first one isn't available, it tries the backup second one.

So, the naming schema needs an optional <optional/> tag to prevent a ref from turning into a dependency.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Closed: (GERONIMO-513) jndi refs should result in dependencies, optionally

Posted by "David Jencks (JIRA)" <de...@geronimo.apache.org>.
     [ http://issues.apache.org/jira/browse/GERONIMO-513?page=all ]
     
David Jencks closed GERONIMO-513:
---------------------------------

    Resolution: Fixed

re-closing after adding alternate solution.

> jndi refs should result in dependencies, optionally
> ---------------------------------------------------
>
>          Key: GERONIMO-513
>          URL: http://issues.apache.org/jira/browse/GERONIMO-513
>      Project: Geronimo
>         Type: New Feature
>   Components: naming
>     Versions: 1.0-M3
>     Reporter: David Jencks
>     Assignee: David Jencks
>      Fix For: 1.0
>  Attachments: jndi-dependencies.diff, jndi-dependencies.diff
>
> After non-reference gbean dependencies (GERONIMO-512) are implemented, jndi refs should result in creating these dependencies.  They need to be optional to take account of (at least) these scenarios:
> 1. circular ejb references A uses B uses A.  
> 2. An ejb has 2 resource refs: if the first one isn't available, it tries the backup second one.
> So, the naming schema needs an optional <optional/> tag to prevent a ref from turning into a dependency.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (GERONIMO-513) jndi refs should result in dependencies, optionally

Posted by "Aaron Mulder (JIRA)" <de...@geronimo.apache.org>.
     [ http://issues.apache.org/jira/browse/GERONIMO-513?page=all ]

Aaron Mulder updated GERONIMO-513:
----------------------------------

    Fix Version: 1.0
    Description: 
After non-reference gbean dependencies (GERONIMO-512) are implemented, jndi refs should result in creating these dependencies.  They need to be optional to take account of (at least) these scenarios:

1. circular ejb references A uses B uses A.  
2. An ejb has 2 resource refs: if the first one isn't available, it tries the backup second one.

So, the naming schema needs an optional <optional/> tag to prevent a ref from turning into a dependency.

  was:
After non-reference gbean dependencies (GERONIMO-512) are implemented, jndi refs should result in creating these dependencies.  They need to be optional to take account of (at least) these scenarios:

1. circular ejb references A uses B uses A.  
2. An ejb has 2 resource refs: if the first one isn't available, it tries the backup second one.

So, the naming schema needs an optional <optional/> tag to prevent a ref from turning into a dependency.

    Environment: 

> jndi refs should result in dependencies, optionally
> ---------------------------------------------------
>
>          Key: GERONIMO-513
>          URL: http://issues.apache.org/jira/browse/GERONIMO-513
>      Project: Geronimo
>         Type: New Feature
>   Components: naming
>     Versions: 1.0-M3
>     Reporter: David Jencks
>     Assignee: David Jencks
>      Fix For: 1.0

>
> After non-reference gbean dependencies (GERONIMO-512) are implemented, jndi refs should result in creating these dependencies.  They need to be optional to take account of (at least) these scenarios:
> 1. circular ejb references A uses B uses A.  
> 2. An ejb has 2 resource refs: if the first one isn't available, it tries the backup second one.
> So, the naming schema needs an optional <optional/> tag to prevent a ref from turning into a dependency.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Closed: (GERONIMO-513) jndi refs should result in dependencies, optionally

Posted by "David Jencks (JIRA)" <de...@geronimo.apache.org>.
     [ http://issues.apache.org/jira/browse/GERONIMO-513?page=all ]
     
David Jencks closed GERONIMO-513:
---------------------------------

    Resolution: Fixed

After more thought and discussion with Dain we are trying a simpler implementation.  All web app modules will depend on all ManagedConnectionFactory gbeans and all ejbs in the ear.  This will make sure that all possible jndi references for a servlet are started before the servlets init method is called.  This is overkill, but does allow for possible future use of non- java:comp jndi contexts that are so popular (even though we don't currently support that) and eliminates trying to figure out how to unwrap circular ejb dependencies.

Before implementing this I implemented a jndi-ref to dependency solution; I'll attach that as well for future reference.

Sending        modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java
Sending        modules/tomcat-builder/src/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
Adding         modules/web-builder/src/java/org/apache/geronimo/web/deployment/AbstractWebModuleBuilder.java
Transmitting file data ...
Committed revision 329128.

> jndi refs should result in dependencies, optionally
> ---------------------------------------------------
>
>          Key: GERONIMO-513
>          URL: http://issues.apache.org/jira/browse/GERONIMO-513
>      Project: Geronimo
>         Type: New Feature
>   Components: naming
>     Versions: 1.0-M3
>     Reporter: David Jencks
>     Assignee: David Jencks
>      Fix For: 1.0

>
> After non-reference gbean dependencies (GERONIMO-512) are implemented, jndi refs should result in creating these dependencies.  They need to be optional to take account of (at least) these scenarios:
> 1. circular ejb references A uses B uses A.  
> 2. An ejb has 2 resource refs: if the first one isn't available, it tries the backup second one.
> So, the naming schema needs an optional <optional/> tag to prevent a ref from turning into a dependency.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (GERONIMO-513) jndi refs should result in dependencies, optionally

Posted by "Aaron Mulder (JIRA)" <de...@geronimo.apache.org>.
     [ http://nagoya.apache.org/jira/browse/GERONIMO-513?page=comments#action_56203 ]
     
Aaron Mulder commented on GERONIMO-513:
---------------------------------------

In the case of optional references, I would prefer to turn this into an "optional dependency" instead of not creating a dependency at all.  In effect, I would like it to be the case that if the dependent resource is available, it will be started first, but if it is not available, no error will result.

I'm afraid that if we generate no dependency, there's no way to achieve the "start first if present" behavior, and the optional resource may start after the application that uses it, even when both are on the list to be started.  

> jndi refs should result in dependencies, optionally
> ---------------------------------------------------
>
>          Key: GERONIMO-513
>          URL: http://nagoya.apache.org/jira/browse/GERONIMO-513
>      Project: Apache Geronimo
>         Type: New Feature
>   Components: naming
>     Versions: 1.0-M3
>     Reporter: David Jencks
>     Assignee: David Jencks

>
> After non-reference gbean dependencies (GERONIMO-512) are implemented, jndi refs should result in creating these dependencies.  They need to be optional to take account of (at least) these scenarios:
> 1. circular ejb references A uses B uses A.  
> 2. An ejb has 2 resource refs: if the first one isn't available, it tries the backup second one.
> So, the naming schema needs an optional <optional/> tag to prevent a ref from turning into a dependency.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Commented: (GERONIMO-513) jndi refs should result in dependencies, optionally

Posted by "David Jencks (JIRA)" <de...@geronimo.apache.org>.
     [ http://nagoya.apache.org/jira/browse/GERONIMO-513?page=comments#action_56205 ]
     
David Jencks commented on GERONIMO-513:
---------------------------------------

I don't understand how your proposal would work.  I can understand that you could have "needs to be started" and "needs to exist" dependencies, but I don't quite understand a "doesn't have to exist, but must be started if it exists".  Wouldn't this result in random start order and stopping the bean with the dependency between the time the needed bean was created and when it was started?

Another way to look at this is that there really isn't any way to determine if a gbean is "available" without starting every configuration and looking.

I recommend we keep it simple and just have one kind of these dependencies, "needs to be started"

> jndi refs should result in dependencies, optionally
> ---------------------------------------------------
>
>          Key: GERONIMO-513
>          URL: http://nagoya.apache.org/jira/browse/GERONIMO-513
>      Project: Apache Geronimo
>         Type: New Feature
>   Components: naming
>     Versions: 1.0-M3
>     Reporter: David Jencks
>     Assignee: David Jencks

>
> After non-reference gbean dependencies (GERONIMO-512) are implemented, jndi refs should result in creating these dependencies.  They need to be optional to take account of (at least) these scenarios:
> 1. circular ejb references A uses B uses A.  
> 2. An ejb has 2 resource refs: if the first one isn't available, it tries the backup second one.
> So, the naming schema needs an optional <optional/> tag to prevent a ref from turning into a dependency.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Reopened: (GERONIMO-513) jndi refs should result in dependencies, optionally

Posted by "David Jencks (JIRA)" <de...@geronimo.apache.org>.
     [ http://issues.apache.org/jira/browse/GERONIMO-513?page=all ]
     
David Jencks reopened GERONIMO-513:
-----------------------------------


> jndi refs should result in dependencies, optionally
> ---------------------------------------------------
>
>          Key: GERONIMO-513
>          URL: http://issues.apache.org/jira/browse/GERONIMO-513
>      Project: Geronimo
>         Type: New Feature
>   Components: naming
>     Versions: 1.0-M3
>     Reporter: David Jencks
>     Assignee: David Jencks
>      Fix For: 1.0

>
> After non-reference gbean dependencies (GERONIMO-512) are implemented, jndi refs should result in creating these dependencies.  They need to be optional to take account of (at least) these scenarios:
> 1. circular ejb references A uses B uses A.  
> 2. An ejb has 2 resource refs: if the first one isn't available, it tries the backup second one.
> So, the naming schema needs an optional <optional/> tag to prevent a ref from turning into a dependency.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (GERONIMO-513) jndi refs should result in dependencies, optionally

Posted by "David Jencks (JIRA)" <de...@geronimo.apache.org>.
     [ http://issues.apache.org/jira/browse/GERONIMO-513?page=all ]

David Jencks updated GERONIMO-513:
----------------------------------

    Attachment: jndi-dependencies.diff
                jndi-dependencies.diff

Alternate solution that converts jndi refs to dependencies directly. This does not allow for optional dependencies.

> jndi refs should result in dependencies, optionally
> ---------------------------------------------------
>
>          Key: GERONIMO-513
>          URL: http://issues.apache.org/jira/browse/GERONIMO-513
>      Project: Geronimo
>         Type: New Feature
>   Components: naming
>     Versions: 1.0-M3
>     Reporter: David Jencks
>     Assignee: David Jencks
>      Fix For: 1.0
>  Attachments: jndi-dependencies.diff, jndi-dependencies.diff
>
> After non-reference gbean dependencies (GERONIMO-512) are implemented, jndi refs should result in creating these dependencies.  They need to be optional to take account of (at least) these scenarios:
> 1. circular ejb references A uses B uses A.  
> 2. An ejb has 2 resource refs: if the first one isn't available, it tries the backup second one.
> So, the naming schema needs an optional <optional/> tag to prevent a ref from turning into a dependency.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (GERONIMO-513) jndi refs should result in dependencies, optionally

Posted by "David Jencks (JIRA)" <de...@geronimo.apache.org>.
    [ http://issues.apache.org/jira/browse/GERONIMO-513?page=comments#action_12356179 ] 

David Jencks commented on GERONIMO-513:
---------------------------------------

Missed this file in initial commit:
Sending        modules/web-builder/project.xml
Transmitting file data .
Committed revision 329132.

> jndi refs should result in dependencies, optionally
> ---------------------------------------------------
>
>          Key: GERONIMO-513
>          URL: http://issues.apache.org/jira/browse/GERONIMO-513
>      Project: Geronimo
>         Type: New Feature
>   Components: naming
>     Versions: 1.0-M3
>     Reporter: David Jencks
>     Assignee: David Jencks
>      Fix For: 1.0
>  Attachments: jndi-dependencies.diff, jndi-dependencies.diff
>
> After non-reference gbean dependencies (GERONIMO-512) are implemented, jndi refs should result in creating these dependencies.  They need to be optional to take account of (at least) these scenarios:
> 1. circular ejb references A uses B uses A.  
> 2. An ejb has 2 resource refs: if the first one isn't available, it tries the backup second one.
> So, the naming schema needs an optional <optional/> tag to prevent a ref from turning into a dependency.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira