Domain Management - Add support for database authentication. Need advice
by Flemming Harms
Hi everybody
I'm currently working on "Domain Management - Add support for database
authentication" https://issues.jboss.org/browse/AS7-1370 and
https://issues.jboss.org/browse/AS7-1371 and struggling with a design
issue. What I need to solve is that you are able to setup a connection pool
for database authentication, and I was told that I could not depend on the
JBOSS subsystem when running in domain mode.
So I basic need some functionality to handle a database connection pool, I
can see 3 options but I don't know what is the best approach and what the
guidelines are
1. Reuse some existing code in the project, I don't if it possible to take
advantage of existing code for maintaining a database connection pool?
2. Use an existing 3 party lib, that will provide this functionality. I
don't what are the common guidelines for adding new 3 party libs to the
project?.
3. Write my own simple connection pool manager.
I was started on no. 3 and don't think it will be a huge task.
What do you think, does it make sense?
br
Flemming
12 years, 5 months
min-occurs / max-occurs contraints
by Tomaz Cerar
Hi,
we ware talking with Kabir about min/max-occurs that we have defined in many manually written DescriptionProviders
They are supposed to be used to define constraints on on how many children resource can have.
The problem we have with this is that there is no support for it when using ResourceDefinition to define resources.
As we ware looking at adding it we found out that for us to do it properly support should be added to ResourceDefinition
and ImmutableManagementResourceRegistration (IMRR) which makes it look bit odd especaly as you would get min/max-occurs on resource
but it would actually apply to parent(you tell how may children resource can have and child holds information about this)
so any way we look at it is bit odd and looks like it does not belong.
The issue was brought up as result of Jeff's conversion of messaging subsystem (which is a great job btw) where resulting model
was missing min/max-occurs for children.
Question is do we even want to support this as currently there is no support for validating and enforcing this constraints.
only thing we have is that some manually written model defines it.
If we add support for this on RD and IMRR we should probably add support for enforcing / validating it.
Also we have figured out that when we converted subsystem we have lost this information. Would it make sense to re-add it?
I would purpose to remove min/max-occurs all together as adding proper support for it at this stage would be quite braking.
But it should be included from start in AS8. Support for it could be more easily and properly added...
--
tomaz
12 years, 5 months
Preventing merge commits
by Jason T. Greene
If you want to prevent merge commits from ever entering a particular
branch of yours, say master, just do this:
git config branch.master.mergeoptions --ff-only
--
Jason T. Greene
JBoss AS Lead / EAP Platform Architect
JBoss, a division of Red Hat
12 years, 5 months
subsytem interdependency
by Thomas Diesler
Folks,
related to [web,ejb,cdi,etc]/osgi integration an issue came up whereby
those ee subsystems don't want to have a dependency on osgi because osgi
is not a core component of the server. Likewise, osgi should not have a
dependency on these ee subsystems because it may be configured to run
independently.
More general if foo and bar are both optional subsystems where do we put
the code that integrates foo and bar. foo-bar integration might require
to add a some DUPs. How are these registered?
cheers
-thomas
--
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Thomas Diesler
JBoss OSGi Lead
JBoss, a division of Red Hat
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
12 years, 5 months
Re: [jboss-as7-dev] Component upgrade of Javassist for AS7-5127...
by Stuart Douglas
Sure, I will try and have a look at in the next week or so. It should be fairly easy as the other proxy code is pretty much already written, it just needs to be translated from class file writer to javassist.
Stuart
On 12/07/2012, at 12:14 AM, Steve Ebersole wrote:
> Stuart, would you be willing to help us look at "dump[ing] the javassist proxy factory, and copy the jboss-invocation proxy factories into the hibernate code base"?
>
>
> On Tue 10 Jul 2012 08:28:17 PM CDT, Stuart Douglas wrote:
>>
>> Just had some time to look into this.
>>
>> The javassist change is basically bogus, as it introduces the possibility that a handler may get null as one of the methods:
>>
>> if (methods[index] == null) {
>> Method m1 = thisMethod == null ? null findMethod(self, thisMethod, desc);
>> Method m0 = findSuperMethod(self, superMethod, desc);
>> synchronized (methods) {
>> if (methods[index] == null) {
>> methods[index + 1] = m1;
>> methods[index] = m0;
>> }
>> }
>>
>> According to the JVM memory model the
>>
>> if(methods[index] == null)
>>
>> can return false, while methods[index +1] is still null. Even though methods[index + 1] is assigned first. This is because the JVM is allowed to (and does) re-order writes, so another thread could see methods[index] written before methods[index + 1].
>>
>> In the AS7 proxies I store the Methods in static final fields that are loaded in a static constructor, so we so not not need anything like this.
>>
>> It would probably not be to hard to change javasisst proxies to use a similar method, but I am not 100% sure that there would be no client visible changes. Perhaps it would be easiest to dump the javassist proxy factory, and copy the jboss-invocation proxy factories into the hibernate code base (and change them to use javassist rather than classfilewriter).
>>
>> Stuart
>>
>> On 11/07/2012, at 1:52 AM, Scott Marlow wrote:
>>
>>> On 07/06/2012 10:40 AM, Kabir Khan wrote:
>>>>
>>>> On 6 Jul 2012, at 13:57, Scott Marlow wrote:
>>>>
>>>>> We aren't using the latest Javassist on AS7 master. Any arguments
>>>>> against switching to the latest/shiniest 3.1.7.0-GA javassist? That has
>>>>> a fix for AS7-5127.
>>>>>
>>>>> Currently, the following AS7 modules have dependencies on Javassist:
>>>>>
>>>>> org.jboss.ws.native.jbossws-native-core
>>>>> org.jboss.weld.core
>>>>> org.jboss.as.weld
>>>>> org.scannotation.scannotation
>>>>> org.hibernate (envers also)
>>>>>
>>>>> Also, could someone (familiar with javassist) take a look at the code
>>>>> change that AS7-5127 wants brought into AS7? In the updated method,
>>>>> parameter "java.lang.reflect.Method[] methods" is read outside of the
>>>>> synchronized lock.
>>>> I believe the check on line 53 needs to happen in a synchronized block as well to make sure it gets the latest, so rather than
>>>> if (methods[index] == null) {
>>>> Method m1 = thisMethod == null ? null
>>>> : findMethod(self, thisMethod, desc);
>>>> Method m0 = findSuperMethod(self, superMethod, desc);
>>>> synchronized (methods) {
>>>> if (methods[index] == null) {
>>>> methods[index + 1] = m1;
>>>> methods[index] = m0;
>>>> }
>>>> }
>>>> }
>>>>
>>>> Something along the lines of this would be more correct
>>>>
>>>> Method existing = null;
>>>> synchronized (methods) {
>>>> Method existing = methods[index];
>>>> }
>>>> if (existing == null) {
>>>> Method m1 = thisMethod == null ? null
>>>> : findMethod(self, thisMethod, desc);
>>>> Method m0 = findSuperMethod(self, superMethod, desc);
>>>> synchronized (methods) {
>>>> if (methods[index] == null) {
>>>> methods[index + 1] = m1;
>>>> methods[index] = m0;
>>>> }
>>>> }
>>>> }
>>>>
>>>>
>>>
>>> That looks better but probably not that much more concurrent then the
>>> original code that performed both the read/write in the same
>>> synchronization block.
>>>
>>> Does anyone know if the array is longer than two elements (just curious
>>> if it contains just two entries or multiple pairs?)
>>>
>>>>
>>>>>
>>>>> code change is here
>>>>> https://source.jboss.org/browse/Javassist/trunk/src/main/javassist/util/p...
>>>>>
>>>>> _______________________________________________
>>>>> jboss-as7-dev mailing list
>>>>> jboss-as7-dev(a)lists.jboss.org
>>>>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
>>>>
>>>
>>>
>>> _______________________________________________
>>> jboss-as7-dev mailing list
>>> jboss-as7-dev(a)lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
>>
>>
>> _______________________________________________
>> jboss-as7-dev mailing list
>> jboss-as7-dev(a)lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
12 years, 5 months
Mirgrating a complex J2EE application from AS5 to AS7 in a proper way
by Sergey Korobitsin
Hello all,
I'm new in this maillist, and I've found no rules or FAQ on the list,
so if I'm posting in the wrong place please advise me the right one.
I have a complex J2EE/Web application now successfully working in JBoss
AS 5, and I would like to mirgate it to AS 7. The problem is that my
application (not OpenSource) now built from sources using custom Ant
scripts, no Maven, etc., and consists of:
* Main EAR application with several WARs and EJB-JARs inside (now in
AS5 living at server/default/deploy dir)
* Several shared components as JARs (now living in AS5's
server/default/lib dir)
* External dependency libraries (e.g. mysql-connector, fontbox-1.6.0
and many other, now living in AS5's server/default/lib too)
* Complex external dependencies (e.g. JackRabbit as RAR, JBPM4 as
multiple SAR/WAR things, in AS5's deploy)
Due to JBoss AS7 moved to a considerably different class loading style
(JBoss Modules based), I need advises how to move all these to new way
properly. I'll be using standalone AS7 in nearest perspective, and
domain-based AS7 in (maybe near) future.
I've investigated an article on moving JBPM5 (only console) to AS7:
http://kverlaen.blogspot.com/2011/07/jbpm5-on-as7-lightning.html
but I see some, I think, improper ways of migrating, e.g.:
> Add the following jars from the jBPM runtime to the WEB-INF/lib folder
> of the server war: hibernate-core, hibernate-entitymanager,
> hibernate-commons-annotations, hibernate-annotations, dom4j, javassist
> [ ... skip ... ]
> Add your database driver (in our case h2.jar) to WEB-INF/lib of the
> server war
(I think these must be configured as separate Modules, maybe I'm wrong?)
The most complex question for me is how to handle my application's
dependencies in a manageable way: if I'll use Maven for building my app,
is there a way to generate AS7 module descriptions automagically from
Maven's build dependencies (also adding correct Dependencies: sections
into respective manifests)?
The other reason why I want to make all this in a proper way is a
question on my software's distributing. Now it's packaged to several
(Debian) packages, which includes a pre-configured AS package,
application's external dependencies package, and the application package
itself. So if I change pre-configuration of AS (very seldom),
dependencies (seldom), and the app itself (frequent), I can control the
update traffic and complexness for customers. I would like to save this
flexibility (and increase it, if possible) when moving to AS7.
--
Bright regards, Sergey Korobitsin,
Chief Research Officer
Arta Software, http://arta.kz/
xmpp:undertaker@jabber.arta.kz
--
BUGS
There are no bugs. Any resemblance thereof is delirium. Really.
-- man ucf.conf
12 years, 5 months
Component upgrade of Javassist for AS7-5127...
by Scott Marlow
We aren't using the latest Javassist on AS7 master. Any arguments
against switching to the latest/shiniest 3.1.7.0-GA javassist? That has
a fix for AS7-5127.
Currently, the following AS7 modules have dependencies on Javassist:
org.jboss.ws.native.jbossws-native-core
org.jboss.weld.core
org.jboss.as.weld
org.scannotation.scannotation
org.hibernate (envers also)
Also, could someone (familiar with javassist) take a look at the code
change that AS7-5127 wants brought into AS7? In the updated method,
parameter "java.lang.reflect.Method[] methods" is read outside of the
synchronized lock.
code change is here
https://source.jboss.org/browse/Javassist/trunk/src/main/javassist/util/p...
12 years, 5 months