Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-dev] Hello and question about Connector

Hi Wonseok,

  Your changes looks good to me.  What testing have you done?

-Tom

Wonseok Kim wrote:
Hi Tom,
I attached the second patch considering your comments.

Also please see some comments inline:

On Fri, Mar 28, 2008 at 2:21 AM, Tom Ware <tom.ware@xxxxxxxxxx <mailto:tom.ware@xxxxxxxxxx>> wrote:

    Hi Wonseok,

      A couple of comments inline:

    Wonseok Kim wrote:
     > Hi Tom,
     >
     > I attached a patch for this.
     > https://bugs.eclipse.org/bugs/show_bug.cgi?id=224083
     >
     > Let me explain some code changes.
     >
     > Index:
     >
    /home/wons/works/eclipselink/jpa/eclipselink.jpa/src/org/eclipse/persistence/internal/jpa/EntityManagerSetupImpl.java
     > ===================================================================
     > ---
     >
    /home/wons/works/eclipselink/jpa/eclipselink.jpa/src/org/eclipse/persistence/internal/jpa/EntityManagerSetupImpl.java
     > (revision 13857)
     > +++
     >
    /home/wons/works/eclipselink/jpa/eclipselink.jpa/src/org/eclipse/persistence/internal/jpa/EntityManagerSetupImpl.java
     > (working copy)
     > @@ -765,9 +765,6 @@
     >                  // Process the Object/relational metadata from
    XML and
     > annotations.
> PersistenceUnitProcessor.processORMetadata(processor,
     > throwExceptionOnFail);
     >
     > -                // The connector will be reconstructed when the
    session
     > is actually deployed
     > -                session.getProject().getLogin().setConnector(new
     > DefaultConnector());
     > -
     >                  if (session.getIntegrityChecker().hasErrors()){
     >                      session.handleException(new
     > IntegrityException(session.getIntegrityChecker()));
     >                  }
     >
     > Above code(in predeploy phase) wasn't needed at all because the Login
     > object has already dummy DefaultConnector at creation time.

    There is actually a case where there might not be a dummy connector.
     If the
    session is setup using EclipseLink sessions XML, there may be some login
    information in that file.  You may be able to isolate where we dummy
    out the
    connector to that case, but I don't think it can be removed entirely.


I investigated your concern and confirmed that with sample sessions.xml. This should be reflected in the updateLoginDefaultConnector() method. Also session customizer could be invoked after that to set new Connector, I realized that checking eclipselink.jdbc.url at the method is not right time. Please see diff for code changes.

However above lines have nothing to do with sessions.xml or customizer. It's actually called when there is no sessions.xml and this is just duplicate since DefaultConnector is already set when Login is initialized as I showed below.


     >
     > 674:            session = new ServerSession(new Project(new
     > DatabaseLogin()));
     > ->
     >     public DatabaseLogin(DatabasePlatform databasePlatform) {
     >         super(databasePlatform);
     >         this.useDefaultDriverConnect();
     >     }
     > ->
     >     public void useDefaultDriverConnect() {
     >         setConnector(new DefaultConnector());
     >     }
     >


Thanks for your review.
-Wonseok


------------------------------------------------------------------------

_______________________________________________
eclipselink-dev mailing list
eclipselink-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-dev


Back to the top