[wildfly-dev] adding several more NoSQL specific connection attributes and sucking less in MongoDriverSubsystemAdd.performBoottime/CassandraDriverSubsystemAdd.performBoottime

Scott Marlow smarlow at redhat.com
Fri May 27 10:19:38 EDT 2016



On 05/27/2016 09:33 AM, Brian Stansberry wrote:
> Can a new profile be added post-boot without requiring a reload to take
> effect? If yes, the add handler for the profile resource should do the
> service installation for that profile. It shouldn't count on the parent
> to do it, as the parent logic will only execute during boot.

I like the idea of adding a new profile post-boot, without requiring a 
reload of all of the profiles defined by the MongoDB/Cassandra subsystem.

Currently, the standalone*.xml might contain:

<subsystem xmlns="urn:jboss:domain:mongodb:1.0">
   <mongo name="default" id="mongodbtestprofile" 
jndi-name="java:jboss/mongodb/test" database="mongotestdb">
     <host name="default" outbound-socket-binding-ref="mongotesthost"/>
   </mongo>
   <mongo name="default2" id="mongodbdiary" 
jndi-name="java:jboss/mongodb/diary" database="diarydb">
     <host name="default" outbound-socket-binding-ref="mongotesthost"/>
   </mongo>
</subsystem>

If the user wants to add an additional profile to the mongodb subsystem, 
I think it would be worth us making the code changes to allow that. 
Will be great to add a new "otherDB", without stopping the existing 
database profiles.

For supporting "remove" of an existing profile, I think that we will 
need dependencies added on the underlying 
MongoDriverService/CassandraDriverService, will be very worthwhile to 
have that as well!  Great feedback! :-)

>
> BTW, if post-boot profile adds/removes don't require reload, then [1]
> should not be inside the "if
> (mongoSubsystem.hasDefined(CommonAttributes.PROFILE)) {" block?

Makes sense, looks like we need a remove handler also for the profile 
resource.

> Same
> question applies for the cassandra add handler.

We should change the cassandra add handler also.

Thanks again,
Scott

>
> [1]
> https://github.com/scottmarlow/wildfly/blob/nosql-dev9/nosql/mongodb/src/main/java/org/wildfly/extension/nosql/subsystem/mongodb/MongoDriverSubsystemAdd.java#L124
>
> On 5/26/16 3:02 PM, Scott Marlow wrote:
>> Hi,
>>
>> We will soon add several (nested) NoSQL configuration settings.  Before
>> we do that, I would like some feedback on the current NoSQL subsystem
>> code that reads connection settings.
>>
>> Any major corrections that you can suggest for the NoSQL subsystem code
>> [1][2]?  Especially, the
>> MongoDriverSubsystemAdd.performBoottime/CassandraDriverSubsystemAdd.performBoottime
>> methods.
>>
>> Should we continue to read all of the configuration settings from one
>> AddStepHandler or should we do that differently (perhaps with separate
>> AbstractAddStepHandler's)?
>>
>> Thanks,
>> Scott
>>
>> [1]
>> https://github.com/scottmarlow/wildfly/tree/nosql-dev9/nosql/cassandra/src/main/java/org/wildfly/extension/nosql/subsystem/cassandra
>>
>> [2]
>> https://github.com/scottmarlow/wildfly/tree/nosql-dev9/nosql/mongodb/src/main/java/org/wildfly/extension/nosql/subsystem/mongodb
>> _______________________________________________
>> wildfly-dev mailing list
>> wildfly-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/wildfly-dev
>>
>
>


More information about the wildfly-dev mailing list