Re: [jboss-dev-forums] [JBoss Microcontainer Development POJO Server] - Implementing a non-flat deployment for Weld Integration
by Flavia Rainone
Flavia Rainone [http://community.jboss.org/people/flavia.rainone%40jboss.com] replied to the discussion
"Implementing a non-flat deployment for Weld Integration"
To view the discussion, visit: http://community.jboss.org/message/554183#554183
--------------------------------------------------------------
Making myself clearer.
> Flavia Rainone wrote:
>
> *public* BeanDeploymentArchive loadBeanDeploymentArchive(Class<?> beanClass)
> {
> // collection to mark the archives we have already searched
> Collection<Archive> searchedArchives = *new* HashSet<Archive>();
> // collection to mark the classpaths we have already searched
> Collection<Classpath> searchedClasspaths = *new* HashSet<Classpath>();
> // TODO -- why the search? beanClass' ClassLoader should be mapped to Archive?
> // need to throw an IllegalArgumentException if the Archive is not reachable from
> // the archives contained in the archives of this deployment
> Archive archive = findArchive(beanClass, archives, searchedArchives, searchedClasspaths);
> *if* (archive == *null*)
>
>
>
Currently, findArchive method, invoked by loadBeanDeploymentArchive as shown above, walks through the Archive graph in order to find an Archive associated with the requested beanClass (i.e., an Archive that is associated with the same ClassLoader that loaded beanClass).
If the Archive is not reachable in the graph, it means that we need to throw IllegalArgumentException.
Ales suggested to replace the findArchive call by a lookup in a ClassLoader -> Archive map. That way, all I would need to do is looking up for the archive that corresponds to the beanClass CL. This is faster than walking through the Archive graph, but I wouldn't be able to know whether the Archive is reachable from the current Deployment or not, so I wouldn't be able to throw the IllegalArgumentException to point that beanClass is not visible to the current Deployment.
Which way should I go? Should I forego the "is beanClass visible to this Deployment" check and follow Ales's suggestion, or should I keep things the way they are?
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/554183#554183]
Start a new discussion in JBoss Microcontainer Development POJO Server at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 6 months
Re: [jboss-dev-forums] [JBoss Microcontainer Development POJO Server] - Implementing a non-flat deployment for Weld Integration
by Flavia Rainone
Flavia Rainone [http://community.jboss.org/people/flavia.rainone%40jboss.com] replied to the discussion
"Implementing a non-flat deployment for Weld Integration"
To view the discussion, visit: http://community.jboss.org/message/554152#554152
--------------------------------------------------------------
This is about the TODO comment that Ales added to DeploymentImpl:
public BeanDeploymentArchive loadBeanDeploymentArchive(Class<?> beanClass)
{
// collection to mark the archives we have already searched
Collection<Archive> searchedArchives = new HashSet<Archive>();
// collection to mark the classpaths we have already searched
Collection<Classpath> searchedClasspaths = new HashSet<Classpath>();
// TODO -- why the search? beanClass' ClassLoader should be mapped to Archive?
// need to throw an IllegalArgumentException if the Archive is not reachable from
// the archives contained in the archives of this deployment
Archive archive = findArchive(beanClass, archives, searchedArchives, searchedClasspaths);
if (archive == null)
I put a temporary answer right below the TODO as you can see. It is undeniable that Ales' suggested approach is much simpler and faster than searching for the Archive in the graph.
The problem is that we need to throw the IllegalArgumentException whenever the Archive is not reachable. I'm wondering if that exception is really necessary, as IMHO the gains of following Ales suggestion outweight the fact that we are not checking for Archive visibility.
So, in order for this exception to happen, we would need to assume that Weld is asking for a bean loaded by a ClassLoader that is not visible to the ClassLoader that loaded the current deployment. Would this scenario ever happen?
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/554152#554152]
Start a new discussion in JBoss Microcontainer Development POJO Server at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 6 months
[JBoss Web Development] - Error to migrating jboss3.2.6 to 5.1.0(to access external files)
by venkat Keerthi
venkat Keerthi [http://community.jboss.org/people/venkatkeerthi] created the discussion
"Error to migrating jboss3.2.6 to 5.1.0(to access external files)"
To view the discussion, visit: http://community.jboss.org/message/554082#554082
--------------------------------------------------------------
I am working on migrating my application jboss3.2.6 to jboss5.1.0, My application accessing static content which in virtual host
(accessing external files) about 150 GB content.
to access static content i have created network drive and updated path in profile.xml file vfs. xml file
i.e <property name="bootstrapURI">${jboss.server.home.url}conf/jboss-service.xml</property>
<property name="applicationURIs">
<list elementClass="java.net.URI">
<value>${jboss.server.home.url}deploy</value>
<value>file:///Y:/</value>
</list>
</property>
and updated vfs.xml file i.e
<entry>
<key>file:///Y:/staticdocs</key>
<value><inject bean="VfsNamesExceptionHandler"/></value>
</entry>
1) to start starting server 30 min taking.
2)it seems server is trying deploy all static content(trying to open zip files and pdf ) causing below error
ERROR [org.jboss.system.server.profileservice.repository.ProfileDeployAction] (main) Failed to add deployment: ap_end_tlg4_step200_notify_usd_05aug05.pdf
org.jboss.deployers.spi.DeploymentException: Error determining deployment structure for vfsfile:/Y:/channelweb/objects/asiapacific/reseller/pdfs/ap_end_tlg4_step200_notify_usd_05aug05.pdf
at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)
3) getting java.lang.OutOfMemoryError: Java heap space exception(i have already increased heap size 1024m)
Could you provide solution for above issues.
for more details attached server.log file.
Thanks,
Venkatesh Keerthi
91-8088759092
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/554082#554082]
Start a new discussion in JBoss Web Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 6 months