Community Updates, August 22 - August 29
by JBoss Community
===============================================================
Community Updates for August 22 - August 29
===============================================================
Latest Activity from the people, places, and content you are following
* Using Hornetq within the same JBOSS AS. [https://community.jboss.org/thread/232009]
new activity by William Moore [https://community.jboss.org/people/billhmoore]
, Justin Bertram [https://community.jboss.org/people/jbertram]
, Andy Taylor [https://community.jboss.org/people/ataylor]
* Performance Degradation while in paging (v2.3.0) [https://community.jboss.org/thread/231923]
new activity by bra [https://community.jboss.org/people/bra]
, Clebert Suconic [https://community.jboss.org/people/clebert.suconic]
, John Muhlestein [https://community.jboss.org/people/johnnysoccer]
* [sbs-test2] What has changed? [https://community.jboss.org/thread/232016]
new activity by Dmytro Lisnichenko [https://community.jboss.org/people/dlisnich]
, Administrator Administrator [https://community.jboss.org/people/admin]
* Latest Likes:
new activity by Nkosingiphile Nkambule [https://community.jboss.org/people/nkosi_187]
, Lord of Bugs [https://community.jboss.org/people/goldwater]
, George Gastaldi [https://community.jboss.org/people/gastaldi]
, Joshua Davis [https://community.jboss.org/people/pgmjsd]
, Dimitris Andreadis [https://community.jboss.org/people/dimitris]
, and more.
* mod_cluster httpd configuration [https://community.jboss.org/thread/232017]
new activity by Rab McGill [https://community.jboss.org/people/rabmcgill]
* May I install mod_Cluster in linux machine ? [https://community.jboss.org/thread/231952]
new activity by Arun Raj [https://community.jboss.org/people/arun2arunraj]
, Radoslav Husar [https://community.jboss.org/people/rhusar]
, Jean-Frederic Clere [https://community.jboss.org/people/jfclere]
* calling an oracle funtion part of the package from teiid returns error. [https://community.jboss.org/thread/231895]
new activity by Amit Agrawal [https://community.jboss.org/people/amitagrawal]
, Steven Hawkins [https://community.jboss.org/people/shawkins]
* [sbs-test2] prod test 1 [https://community.jboss.org/thread/232013]
new activity by Dmytro Lisnichenko [https://community.jboss.org/people/dlisnich]
, Administrator Administrator [https://community.jboss.org/people/admin]
* Issue with Session ID generation in JBoss EAP 6.0.1 [https://community.jboss.org/thread/231751]
new activity by jaikiran pai [https://community.jboss.org/people/jaikiran]
, Jean-Frederic Clere [https://community.jboss.org/people/jfclere]
, Madhusudhan raju [https://community.jboss.org/people/madhusudhanraju_26]
* Unable to deploy MDB in Jboss EAP 6 [https://community.jboss.org/thread/201429]
new activity by aqtwrdnr aqtwrdnr [https://community.jboss.org/people/aqtwrdnr]
, Justin Bertram [https://community.jboss.org/people/jbertram]
Your Content
* testing the new list server [https://community.jboss.org/thread/127309]
was viewed 13,220 times and replied to by 3 people
Tips and tricks - Join a Group
People naturally form groups to share ideas and accomplish goals. Try finding a group to join, or create your own.
Find out more.
Not interested in these emails anymore, or want to change how often they come? Update your email preferences by visiting: https://community.jboss.org/user-preferences!input.jspa
11 years, 2 months
Community Updates, August 15 - August 22
by JBoss Community
===============================================================
Community Updates for August 15 - August 22
===============================================================
Your Content
* testing the new list server [https://community.jboss.org/thread/127309]
was viewed 13,220 times and replied to by 3 people
* No Link to Jboss Nukes [https://community.jboss.org/thread/90785]
was viewed 111,602 times and replied to by 3 people
Your Connections - Activity by people you are following
You don't have any connections yet. Find people and connect! [https://community.jboss.org/people/]
Popular Content - The content that is most viewed and participated in
* Open Session in View [https://community.jboss.org/docs/DOC-13954]
* Data Source Configuration in AS 7 [https://community.jboss.org/docs/DOC-16657]
* Start and Stop the JBoss Application Server [https://community.jboss.org/docs/DOC-12306]
* Statement Regarding Security Threat to JBoss Application Server [https://community.jboss.org/blogs/mjc/2011/10/20/statement-regarding-secu...]
* JBoss Tools 4.1 and Red Hat JBoss Developer Studio 7 go GA [https://community.jboss.org/community/tools/blog/2013/07/23/jboss-tools-4...]
* Deploy from Eclipse to OpenShift in a breeze [https://community.jboss.org/community/tools/blog/2012/06/27/deploy-from-e...]
* Re: Jboss admin console password [https://community.jboss.org/message/826509#826509]
* Re: HTTPS on JBoss AS 7 - truststore configuration [https://community.jboss.org/message/809854#809854]
* Re: Jboss and mysql connector [https://community.jboss.org/message/833467#833467]
Tips and tricks - Remember Who, not Where
Have you ever forgotten the location of a file, but remembered who worked on it? With Community you can easily get to all of the content that someone has worked on. Just navigate to their profile and go to their Stuff tab. Inside that tab you can filter by the type of content, like document, discussion, task, or blog post.
Not interested in these emails anymore, or want to change how often they come? Update your email preferences by visiting: https://community.jboss.org/user-notification-preferences!input.jspa
11 years, 2 months
[jBPM Development] - JBPM6 Spring Persistence and Runtime Manager
by Alexander Herwix
Alexander Herwix [https://community.jboss.org/people/herwix] created the discussion
"JBPM6 Spring Persistence and Runtime Manager"
To view the discussion, visit: https://community.jboss.org/message/833455#833455
--------------------------------------------------------------
Hey guys,
I have been trying to integrate JBPM6 in my Spring-Hibernate based Grails application, but it seems that I'm stuck and maybe you guys here could point me in the right direction.
I am trying to get the RuntimeManager working with a local spring transaction scheme. I have tried a lot of stuff but can't seem to find the right approach.
I have set up a EntityManagerFactory bean, which loads the persistence-unit org.jbpm.presistence.jpa (with transaction-type "Resource_local") with the org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter.
I have also set up a org.springframework.orm.jpa.JpaTransactionManager bean.
When I now try to get a runtimeEngine via the RuntimeEnvironmentBuilder:
RuntimeEnvironment environment = RuntimeEnvironmentBuilder.getDefaultInMemory()
.userGroupCallback(getUserGroupCallback())
.entityManagerFactory(entityManagerFactory)
.registerableItemsFactory(new KModuleRegisterableItemsFactory(kcontainer,''))
.addEnvironmentEntry(EnvironmentName.TRANSACTION_MANAGER,jbpmTransactionManager)
.get();
RuntimeManager manager = RuntimeManagerFactory.Factory.get().newPerProcessInstanceRuntimeManager(environment);
RuntimeEngine runtime = manager.getRuntimeEngine(ProcessInstanceIdContext.get());
I get the following error:
NamingException occurred when processing request: [GET] /bpm/test/
Cannot create resource instance. Stacktrace follows:
javax.naming.NamingException: Cannot create resource instance
at org.apache.naming.factory.TransactionFactory.getObjectInstance(TransactionFactory.java:116)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:321)
at org.apache.naming.NamingContext.lookup(NamingContext.java:843)
at org.apache.naming.NamingContext.lookup(NamingContext.java:154)
at org.apache.naming.NamingContext.lookup(NamingContext.java:831)
at org.apache.naming.NamingContext.lookup(NamingContext.java:168)
at org.apache.naming.SelectorContext.lookup(SelectorContext.java:158)
at javax.naming.InitialContext.lookup(InitialContext.java:411)
at org.drools.persistence.jta.JtaTransactionManager.findUserTransaction(JtaTransactionManager.java:122)
at org.drools.persistence.jta.JtaTransactionManager.<init>(JtaTransactionManager.java:69)
at org.jbpm.shared.services.impl.JbpmJTATransactionManager.<init>(JbpmJTATransactionManager.java:39)
at org.jbpm.runtime.manager.impl.factory.LocalTaskServiceFactory.newTaskService(LocalTaskServiceFactory.java:48)
at org.jbpm.runtime.manager.impl.PerProcessInstanceRuntimeManager.getRuntimeEngine(PerProcessInstanceRuntimeManager.java:94)
at org.jbpm.runtime.manager.impl.PerProcessInstanceRuntimeManager.init(PerProcessInstanceRuntimeManager.java:258)
at org.jbpm.runtime.manager.impl.RuntimeManagerFactoryImpl.newPerProcessInstanceRuntimeManager(RuntimeManagerFactoryImpl.java:103)
at org.jbpm.runtime.manager.impl.RuntimeManagerFactoryImpl.newPerProcessInstanceRuntimeManager(RuntimeManagerFactoryImpl.java:94)
at bpm.TestController$$EOFBIT6u.index(TestController.groovy:82)
at grails.plugin.cache.web.filter.PageFragmentCachingFilter.doFilter(PageFragmentCachingFilter.java:200)
at grails.plugin.cache.web.filter.AbstractFilter.doFilter(AbstractFilter.java:63)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)
Looking at the stacktrace I found the the LocalTaskServiceFactory where the documentation says:
/**
* Regular <code>TaskServiceFactory</code> implementation that shall be used for non CDI environments.
* Creates new <code>TaskService</code> instance for every call to the factory.
* <code>TaskService</code> instance will be equipped with <code>JbpmJTATransactionManager</code>
* for transaction management, this is mandatory as it must participate in already active
* transaction if such exists.
*/
So it seems it's not possible to use the RuntimeManager without a JTA Transaction Manager? I thought it might be possible to supply the localTransactionManager via the Environment? But I am fishing in the dark.
If I am totally off the mark here in what I am doing, I would appreciate any pointer into the recommended way to integrate jbpm6 (and especially the runtime manager) into a spring-hibernate based application. I have looked at kie-spring, but there is little jbpm specific stuff.
Cheers, Alex
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/833455#833455]
Start a new discussion in jBPM Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 2 months
[JBoss AS 7 Development] - Module Compatible Classloading Guide
by Paco Soberón
Paco Soberón [https://community.jboss.org/people/unratito] modified the document:
"Module Compatible Classloading Guide"
To view the document, visit: https://community.jboss.org/docs/DOC-16701
--------------------------------------------------------------
h3. Introduction
Modular classloading has a much greater focus on isolation and separation than traditional hierarchical models, so it is far less forgiving about using the "wrong" classloader. Unfortunately, this means that any dynamic classloading code you have written in the past may need to be updated to play nicely in a modular environment. However, the good news is that code that is module compatible is more correct, and therefore less error prone in traditional environments. This article provides some background infromation along with some pointers on how to make this transition.
h3. Common Terms
This article assumes that the following terms are well understood.
*Defining Classloade*r - The classloader which loaded the calling class. This is what is used when you use Class.forName() without specifying a classloader. It's also what loads classes that you reference statically (e.g. via an import). It can be obtained by calling *getClass().getClassLoader()* on the respective class.
*Thread Context Classloader (TCCL)* - The classloader which has been assigned to the calling thread. Its meaning is specific to the environment it was assigned in. In Java EE code, the TCCL is always the classloader of the relevant deployment. *+The TCCL is the most commonly misused classloader.+*
*Dynamic Classloading* - Loading a class by name using a ClassLoader. This is typically used for pluggable architectures that discover some kind of extension. An example is an API framework that supports multiple implementations/providers (e.g. JAXP). It dynamically loads the provider by name using some kind of service discovery mechanism (a file in META-INF/services, a system property, etc). Another example is application server code which needs to operate against a deployment's classes. Since they are logically isolated, and may even be hot-deployed, static linking (imports) can not be used.
*JDK Service Provider Loading* - The common pattern used by Java SE and Java EE frameworks to load different providers / implementations of an API. This is done by checking a system property, a special properties file, and more commonly looking for files in META-INF/services. See the http://download.oracle.com/javase/6/docs/api/java/util/ServiceLoader.html ServiceLoader javadoc for more info on how the process works.
*Module* - A single consistent class loading namespace. It encompases classes/resources directly available in the module (contents of one or more jar(s)) local to the module, as well as all module dependencies defined on the module. Every module has its own ClassLoader which it uses to load all classes that can be loaded from the module.
*Deployment* - A deployment is a user provided package of components. In AS7, every deployment has a Module. In some cases a deployment may contain nested deployments or other artifacts. Those are often represented by a module of their own.
*System Classloader* - Also commonly referred to as the "application classloader". It represents everything that is defined on java.class.path, and commonly includes java extensions and some jdk classes.
h3. Picking the "Right" Classloader
The key to loading classes in a modular environment is to use the correct classloader. In the past many frameworks, including many Java standard APIs, expect that the users classes (or the deployment classes) and the framework classes are accessible via the same classloader.* +The problem with this assumption is that it prevents proper isolation of the framework implementation classes and a user's classes.+* In many cases though it would work in a hierarchical model (as long as there was no name conflicts), since class sharing is done by inheritance rather than explicit links as is the case in a modular environment. This single bad assumption makes it impossible to achieve capabilities like allowing a user to use their own XML parser.
The correct way to pick a ClassLoader is to always use the one that is directly associated with the class you are trying to load. So if a framework wants to load a class from one of its dependencies +*then it should use its defining classloader.*+ Likewise, If the framework wants to load a class from a deployment, then it should use the deployment's classloader. In some cases, like in the case of service provider discovery, a framework might want to look for a particular resource in both its classloader (say a default provider), and the user Classloader. Under this scenario the framework should check both ClassLoaders following the order that best suits its needs.
h3. *FRAMEWORKS, NEVER LOAD YOUR CLASSES FROM THE TCCL!!*
If you expect portability between different classloading environments, it is always wrong for a framework to load its classes from the TCCL. +*Instead use the right classloader, which is most often the defining classloader.*+ If the defining classloader is not the right classloader, then look for a way to get the right loader and use it to load classes. Even if you have an inheritance model with a hierarchy that sees the classes you want, it is always more correct to pick the classloader that "owns" the classes.
The TCCL should be used with extreme care. EE code is required to see the defining deployments classloader as the TCCL. Beware though that other frameworks may have different rules, and may set it to another value when executing in their context. +*If you have access to the classloader you want it's always better to use it over the TCCL.*+
Note that AS7 subsystems that are executing within any kind of EE context can safely asssume that the TCCL will point to the deployment classloader. They should, however, never attempt to load AS7 code from the deployment classloader.
h3. What To Export/Expose
The only thing that a module should ever expose is classes that make up its API contracts. In most cases this means that an AS7 module should not export it's dependencies. This allows for the module and its calling module to use completely different versions of the same dependency. Deployments can, for example, use commons-bah 1.2 and AS7 code can happily use commons-blah 1.0.
h3. How to deal with "Bad" dependencies
If your module/deployment/framework depends on something that isn't compatible with a modular environment. Then you have a couple of options that may workaround the issue. However in some cases the only workable solution is to patch the bad framework.
Common workarounds include:
* *Swapping TCCL* - If a call to a framework method incorrectly uses the TCCL to load its classes/resources, and the same call does not need to see deployment classes, then temporarily set the TCCL to the framework's defining classloader. (e.g. Thread.currentThread().setContextClassLoader(frameworkClass.getClass().getClassLoader()
* *Prefer calls which have a CL argument* - If you can pass a classloader, prefer that to calls which try to guess (usually picking the TCCL) if possible.
* *Hierarchical Emulation -* This is a worst case workaround that should only be used as a last resort. In the unfortunate case where a framework expects both deployment classes and its own classes to be on the same classloader, a custom classloader can be created which delegates first to the deployment classsloader and second to frameworks defining classloader. This classloader can the be swapped to the TCCL as described above, or somehow passed to the framework via a mechnism it exposes. This has the undesirable effect of a possible conflict between a user's implementation choices and the frameworks. However, it at least does not pollute the deployment module.
If you have a bad dependency then file a bug to get it fixed/replaced. In particularly if you have to use hierarchical emulation.
h3. How to use JAXP and other service provider APIs from AS/Framework code
EE applications can safely use the no-arg newInstance() methods provided by JAXP. However framework code must either not use them, or use the swapping TCCL workaround described in the "bad" dependencies section above. This ensures that either the container's xml parser is used or the parser explictly imported by the frameworks module (requires a service import). Not doing this will result in the deployments xml parser being used (since the deployment CL is often the TCCL), which may be incompatible.
The following is an example of setting the TCCL to the framework's defining classloader. It's recommended to create a simple utility method for every occurence of this in your framework.
public class Util {
public static DocumentBuilderFactory createDocumentBuilderFactory() {
ClassLoader cl = Thread.currentThread().getContextClassLoader();
DocumentBuilderFactory factory;
try {
Thread.currentThread().setContextClassLoader(Util.class.getClassLoader());
factory = DocumentBuilderFactory.newInstance();
} finally {
Thread.currentThread().setContextClassLoader(cl);
}
return factory;
}
}
h3. Serialization
See the aritcle on https://community.jboss.org/docs/DOC-17244 Modular Serialization.
--------------------------------------------------------------
Comment by going to Community
[https://community.jboss.org/docs/DOC-16701]
Create a new document in JBoss AS 7 Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=102&c...]
11 years, 2 months
Re: [jboss-dev-forums] [JBoss AS 7 Development] - Design of AS7 multi-JSF feature
by Stan Silvert
Stan Silvert [https://community.jboss.org/people/ssilvert] commented on the document
"Design of AS7 multi-JSF feature"
To view all comments on this document, visit: https://community.jboss.org/docs/DOC-47689#comment-12597
--------------------------------------------------
> liumin hu wrote:
>
>
>
> hi,
> i tried this guide to install a mojorra 2.2.2 for a jboss eap 6.1. after execute the cli generated by jboss-jsf-installer-AS7-installer.
> the modules is added directely under the directory modules, but in eap 6.1, other modules are under systems/layers/base/.
> after some tests, i found :
> 1.if i let the 3 modules under moduels/, the console find only mojorra jsf actived, in this case, i need change the default jsf slot,
> 2.if i move this 3 modues to systems/layers/base/, the jboss can only find main and 1.2.
> is this normal?
>
If I remember right, that was a bug in EAP 6.1. It is working correctly in WildFly 8.
--------------------------------------------------
11 years, 2 months