Re: [jboss-user] [JBoss Microcontainer Development POJO Server] - Implementing a non-flat deployment for Weld Integration
by Ales Justin
Ales Justin [http://community.jboss.org/people/alesj] replied to the discussion
"Implementing a non-flat deployment for Weld Integration"
To view the discussion, visit: http://community.jboss.org/message/559359#559359
--------------------------------------------------------------
> Roughly speaking, this is how we would fill in the gaps of the TODO mark you added in your getLibraries method:
OK, refactored things a bit, I now have this:
// create an ArchiveInfo with the ClassLoader
ArchiveInfo archiveInfo = new ArchiveInfo(cl);
// finally create the Archive
Archive archive = ArchiveFactory.createArchive(archiveInfo, new ArrayList<EjbDescriptor<?>>());
// ... and the corresponding BDA
ServiceRegistry serviceRegistry = new SimpleServiceRegistry();
// TODO: fill in serviceRegistry? With which services?
libs.add(archive.createBeanDeploymentArchive(serviceRegistry));
// the env
WeldDiscoveryEnvironment environment = archiveInfo.getEnvironment();
// fill in the Weld classes
// the WBDiscoveryVisitor from ArchiveDiscoveryDeployer...
ResourceVisitor visitor = environment.visitor();
Module module = entry.getKey();
for (VirtualFile child : files)
{
URL beansXmlURL = child.getChild(provider.getResourceName()).toURL();
environment.addWeldXmlURL(beansXmlURL);
module.visit(visitor, ClassFilter.INSTANCE, null, child.toURL());
}
It all compiles. :-)
> The other piece of code that we are missing is the part that invokes this, right? At some point we need to fill in the DefaultDomain Classpath (take a look at ClasspathFactory for more details) with the lib BDAs created by your getLibraries method. As we agreed before, this should be done ideally at the first weld deployment. So, I would simply add a piece of code to ClasspathFactory that calls getLibraries, unless you prefer this call to be performed somewhere else.
OK, I still need to think about this one a bit.
> I think that the best way to check everything is working ok is adding a Weld jar to jboss lib prior to start up and make sure that a BDA is being created for it. Other than that, I don't have any use cases :-).
Yup, I'll create a simple test for this -- probably (until we do have a *real* CDI lib present) I'll have to create a new server config for it.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/559359#559359]
Start a new discussion in JBoss Microcontainer Development POJO Server at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years, 8 months
Re: [jboss-user] [jBPM] - Variables from ended process ...
by Charles Aznavour
Charles Aznavour [http://community.jboss.org/people/charles_a] replied to the discussion
"Variables from ended process ..."
To view the discussion, visit: http://community.jboss.org/message/559320#559320
--------------------------------------------------------------
Hi HuiSheng,
I´ve come back to this and tested it again. What Jaber is saying is correct. I can read back the history variables after the transaction. But why is it like that? In my understanding, when terminating a process, everything concerning history should be written to the db and after that we should be able to read it back - in the same transaction of course. As long as we´re in the same transaction everything should be readable even without a commit, shouldn´t it? Why is there the need to end the transaction?
Currently, we´re only stuck with that issue in our tests. But I can image reasonable real world scenarios, where such a constellation could happen. For example, you´ve written a framework around your workflows that checks after each processing step if the concerned process has ended, if yes, read some specific history variable and add it to a statistics table. Just as an example. Here, you would also like to do all in one transaction... and most probably also run into this issue.
Any feedback how to deal with it is really appreciated!
Cheers,
Charles
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/559320#559320]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years, 8 months