[Design of POJO Server] - Re: JSR77 View
by adrian@jboss.org
"alesj" wrote :
| Otherwise I'll have a go, starting from tomorrow.
| Trying to mimic the old LocalJBossServerDomain in more generic+MC fashion.
|
I wouldn't go for a full rewrite now, that would be a lot more work.
A simpler solution would be to look at
org.jboss.management.j2ee.*
in the management project.
These are basically just mbeans that need to be created along with the
relevant component.
So you could for example have an EJBJSR77Deployer that looks at the
ejb metadata and then either creates the ServiceMetaData for the relevant
jsr77 mbean(s) or talks to the LocalJBossServerDomain directly.
The same would go for the other types.
See LocalJBossServerDomain which previously worked by listening to
the old deployers and then did a type->factory thing in handleNotification().
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4182185#4182185
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4182185
16 years, 3 months
[Design of POJO Server] - Re: JBAS-6061 or weird nested jar
by alesj
"adrian(a)jboss.org" wrote :
| Well in that case, a more generic solution would be to write a deployer
| that runs in PostParse.
|
| It would then check that all the VFS files in getClassPath()
| are valid and remove those that aren't. This would of course be an
| optional deployer (not configured by default) for backwards compatiblity purposes.
|
Makes sense.
But there's a catch.
This behavior is only triggered when somebody tries to read something from that jar - in this case load some class.
Which starts zip entries read, stumbling upon that broken jar.
How would you know what read/lookup to trigger in this deployer?
Or how would you actually check if all entries - e.g. some similar weird double nested crap - is all legit?
Perhaps we should add another (hard keeping track of all) flag to VFS,
that would also ignore everything - as did the old code.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4182178#4182178
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4182178
16 years, 3 months
[Design of POJO Server] - Re: JBAS-6061 or weird nested jar
by adrian@jboss.org
"alesj" wrote : "adrian(a)jboss.org" wrote :
| | It's only referenced by the VFS because the JarStructure is adding it as a
| | subdeployment.
| No, that's not the case here. ;-)
|
| If you look at the actual JIRA issue,
| you'll see that Luc has added it to server/some-as-config/lib
| - as that's how/why conf/jboss-service.xml is able to see it in its classpath -
| meaning it's referenced via this piece of xml (from jboss-service.xml):
|
| | <server>
| |
| | <!-- Load all jars from the JBOSS_DIST/server/<config>/lib directory. This
| | can be restricted to specific jars by specifying them in the archives
| | attribute.
| | -->
| | <classpath codebase="${jboss.server.lib.url:lib}" archives="*"/>
| |
| Being added to conf/jboss-service.xml as part of its classpath in SARDeployer::processXMLClasspath.
|
| Hence the actual jar is checked/read in some CL impl details,
| no way to add some flag and ignore it if it's broken.
Well in that case, a more generic solution would be to write a deployer
that runs in PostParse.
It would then check that all the VFS files in getClassPath()
are valid and remove those that aren't. This would of course be an
optional deployer (not configured by default) for backwards compatiblity purposes.
Looking at the old MainDeployer, it ignored everything:
| private void makeLocalCopy(DeploymentInfo sdi)
| {
| try
| {
| if (sdi.url.getProtocol().equals("file") && (!copyFiles || sdi.isDirectory))
| {
| // If local copies have been disabled, do nothing
| sdi.localUrl = sdi.url;
| return;
| }
| // Are we already in the localCopyDir?
| else if (inLocalCopyDir(sdi.url))
| {
| sdi.localUrl = sdi.url;
| return;
| }
| else
| {
| String shortName = sdi.shortName;
| File localFile = File.createTempFile("tmp", shortName, tempDir);
| sdi.localUrl = localFile.toURL();
| copy(sdi.url, localFile);
| }
| }
| catch (Exception e)
| {
|
| // HERE ignore problem and log an error
|
| log.error("Could not make local copy for " + sdi.url, e);
| }
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4182169#4182169
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4182169
16 years, 3 months