Kevin,
Very good you will be able to use both dynamic (default) and static
weaving.
For your reference here is part of a tutorial and a previous
eclipselink-users discussion on the exclude-unlisted-classes element.
An example of EE usage of the exclude-unlisted-classes element.
http://wiki.eclipse.org/EclipseLink/Examples/JPA/WebLogic_Web_Tutorial#persistence.xml_with_three_persistence_units
A previous discussion on using exclude-unlisted-classes.
http://dev.eclipse.org/mhonarc/lists/eclipselink-users/msg02157.html
thank you
/michael
Kevin Haskett wrote:
Yes, I am on WAS 6.1 with the
EJB3 feature pack. I will give that setting a try next. Thanks
Kevin,
Hi, there are several solutions, A fellow developer Tom reminded me
of some settings you may use.
If you would like to keep your configuration as-is. Try adding
<exclude-unlisted-classes>true</exclude-unlisted-classes>
to your persistence.xml - in an EE environment this defaults to false
(it is true in an SE environment). You will need to specify all your
entities in persistence.xml if you modify this flag.
Also what version of WebSphere are you running? 6.1 with the ejb3
fixpack / 7 or something pre 6.1 (IE no JEE5 support).
If you are running a version less than 6.1 then dynamic weaving
will not be available anyway.
thank you
/michael
Kevin Haskett wrote:
Doing that sounds like
a maintenance nightmare for me. We have 10+ developers, 4 different
test environments, and keeping them all in synch outside of deploying
it in an EAR is problematic. I verified that I do not have any of
these eclipselink jar files located in anything other than the
eclipselink.jar itself. Any ideas on what would change between starts
and stops of the server? Initially it starts up very quickly, and
degrades after each server restart.
Khasket,
Hi, try removing eclipselink.jar entirely from your EAR (I assume
you only have 1 EAR containing multiple WARs), and create a shared
library in WebSphere to see if this solves your issue. Before you add
a shared-library, you may verify your EAR is clean by making sure you
get a provider not found exception when you try to run EclipseLink JPA
without an eclipselink.jar library defined - as a check.
However, the fact that you are getting classes in your WAR is odd.
Verify after you remove eclipselink.jar that there are no
"org.eclipse.persistence" classes in your expanded EAR/EJB/WAR jars and
also in the deployed expanded versions on the server - as the following
class should not be in your WAR.
\LineCPP\WebContent\WEB-INF\classes\org\eclipse\persistence\internal\expressions\QueryKeyExpression.class
thank you
/michael
khaskett wrote:
I do have the eclipselink.jar file as a EAR utility jar. It is not in the
individual war's.
mobrien wrote:
Khaskett,
Hi, just my small observation, but it looks like you may be
including the EclipseLink jar classes in your WAR. Since we will search
for entities in all the classes/* files, this may be the cause of your
slowdown because you are doing a predeploy() on 100's of extra classes
unrelated to your application.
It does this for all files in the persistence.xml even some eclipselink
files
\LineCPP\WebContent\WEB-INF\classes\org\eclipse\persistence\internal\expressions\QueryKeyExpression.class
I would recommend that you install EclipseLink as a shared library
that would be available to all your web projects at the higher websphere
server classpath level as a library.
See the following screen capture for WebLogic 6.1 that details how
to do this on the admin console by creating a shared library to
$server\lib\eclipselink.jar, depending on how high you want it, you may
need to deploy it to alternatively to $server\lib\ext\eclipselink.jar
http://wiki.eclipse.org/EclipseLink/Examples/JPA/WebSphere_Web_Tutorial#EclipseLink_JAR_location
If you require a separate eclipselink.jar to be in the specific war
classpath of each application then I would move it up to a lib directory
off of WebContent outside of the JPA search path.
hope this helps, thank you
/michael
www.eclipselink.org
khaskett wrote:
I did start it up in debug mode and was able to get a stack trace of what
was
going on at that time looks like this -
Daemon Thread [server.startup : 0] (Suspended)
WinNTFileSystem.getBooleanAttributes(File) line: not available [native
method]
File.exists() line: 731 [local variables unavailable]
SinglePathClassProvider$1.run() line: 301 [local variables unavailable]
AccessController.doPrivileged(PrivilegedAction) line: 63
SinglePathClassProvider.getClassBytesFromDir(String,
ClassProviderListener)
line: 292
SinglePathClassProvider.getClassBytes(String, ClassProviderListener)
line:
283
CompoundClassLoader.findClass(String, boolean) line: 547
CompoundClassLoader.loadClass(String, boolean) line: 422
CompoundClassLoader(ClassLoader).loadClass(String) line: 597
Class<T>.forNameImpl(String, boolean, ClassLoader) line: not available
[native method]
Class<T>.forName(String, boolean, ClassLoader) line: 163
PrivilegedAccessHelper.getClassForName(String, boolean, ClassLoader)
line:
86
XMLEntityMappings.getClassForName(String, ClassLoader) line: 138
XMLEntityMappings.getClassForName(String) line: 175
XMLEntityMappings.initPersistenceUnitClasses(HashMap<String,EntityAccessor>,
HashMap<String,EmbeddableAccessor>) line: 433
MetadataProcessor.initPersistenceUnitClasses() line: 202
MetadataProcessor.processEntityMappings() line: 425
PersistenceUnitProcessor.processORMetadata(MetadataProcessor, boolean)
line: 299
EntityManagerSetupImpl.predeploy(PersistenceUnitInfo, Map) line: 838
PersistenceProvider.createContainerEntityManagerFactory(PersistenceUnitInfo,
Map) line: 218
JPAPUnitInfo.getFactory(Context) line: 1191
JPAPxmlInfo.extractPersistenceUnits(JPAPXml, JPALooseConfig) line: 348
JPAScopeInfo.processPersistenceUnit(JPAPXml, JPALooseConfig) line: 140
JPAApplInfo.processModulePUs(DeployedModule) line: 169
JPAComponentImpl.startingDeployedModule(DeployedModule) line: 780
JPAComponentImpl.stateChanged(DeployedObjectEvent) line: 646
ApplicationMgrImpl.stateChanged(DeployedObjectEvent) line: 1226
DeployedApplicationImpl.fireDeployedObjectEvent(DeployedObjectEvent)
line:
1148
DeployedWARModuleImpl(DeployedModuleImpl).setState(DeployedObjectEvent)
line: 214
DeployedWARModuleImpl(DeployedModuleImpl).start() line: 584
DeployedApplicationImpl.start() line: 832
ApplicationMgrImpl.startApplication(DeployedApplicationImpl) line: 921
ApplicationMgrImpl$AppInitializer.run() line: 2124
WsComponentImpl$_AsynchInitializer.run() line: 342
ThreadPool$Worker.run() line: 1473
The odd thing about that is it is the process is looking for this file -
\LineCPP\WebContent\WEB-INF\classes\com\gmrc\jpa\domain\CpUserroleId.class
But LineCPP is my WebProject
and the CpUserroleId.class is in my JPA project
\CpsJPA\bin\com\gmrc\jpa\domain\CpUserroleId.class
It does this for all files in the persistence.xml even some eclipselink
files
\LineCPP\WebContent\WEB-INF\classes\org\eclipse\persistence\internal\expressions\QueryKeyExpression.class
I have 9 different WebProjects and I think it searches through all of
them.
Any ideas on whats going on here?
James Sutherland wrote:
Odd, it may not be this lines causing the hang though, it could be
anything the occurs in between. Try using a Java profiler such as
JProfiler to determine where the bottleneck is.
khaskett wrote:
When I start up the server for the first time the load time is very
quick. But then any subsequent restarts the start time degrades
quickly.
It seems to hang for several minutes on these two lines -
[4/15/09 15:23:04:921 CDT] 00000019 SystemOut O [EL Finer]:
2009-04-15
15:23:04.89--ServerSession(549331134)--Thread(Thread[server.startup :
2,5,main])--Searching for default mapping file in
file:/C:/Projects/Grinnell/Source/Head/CpsJPA/bin/
[4/15/09 15:25:00:437 CDT] 00000019 SystemOut O [EL Finer]:
2009-04-15
15:25:00.437--ServerSession(549331134)--Thread(Thread[server.startup :
2,5,main])--Searching for default mapping file in
file:/C:/Projects/Grinnell/Source/Head/CpsJPA/bin/
In my application I have two seperate JPA utility projects one for DB2
and the other for SQL Server. The each have their own Mapping file
listed
in the persistence.xml
<mapping-file>META-INF/cps-orm.xml</mapping-file>
and
<mapping-file>META-INF/sql-orm.xml</mapping-file>
Running on Websphere 6.1.0.23 with EJB3 Feature Pack installed.
Anything I can do to fix this?
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users
This message (including any attachments) is intended only for
the use of the individual or entity to which it is addressed and may
contain information that is non-public, proprietary, privileged,
confidential, and exempt from disclosure under applicable law or may
constitute as attorney work product. If you are not the intended
recipient, you are hereby notified that any use, dissemination,
distribution, or copying of this communication is strictly prohibited.
If you have received this communication in error, notify us immediately
by telephone and (i) destroy this message if a facsimile or (ii) delete
this message immediately if this is an electronic communication. Thank
you.
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users
This message (including any attachments) is intended only for
the use of the individual or entity to which it is addressed and
may contain information that is non-public, proprietary,
privileged, confidential, and exempt from disclosure under
applicable law or may constitute as attorney work product.
If you are not the intended recipient, you are hereby notified
that any use, dissemination, distribution, or copying of this
communication is strictly prohibited. If you have received this
communication in error, notify us immediately by telephone and
(i) destroy this message if a facsimile or (ii) delete this message
immediately if this is an electronic communication.
Thank you.
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users
|