>> 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