Issue Details (XML | Word | Printable)

Key: DIRSERVER-285
Type: New Feature New Feature
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Alex Karasulu
Reporter: Simon Temple
Votes: 0
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
Directory ApacheDS

JBoss 3.2 ApacheDS MBean - contribution from SAA Consultants Ltd (UK)

Created: 22/Nov/05 11:09 PM   Updated: 08/Aug/06 03:41 AM
Return to search
Component/s: sar
Affects Version/s: 1.0-RC1
Fix Version/s: 1.0-RC3, 1.0-RC2, 1.0-RC1

Time Tracking:
Not Specified

File Attachments:
  Size
Zip Archive Licensed for inclusion in ASF works apache-server-sar.zip 2006-03-10 07:25 PM Simon Temple 13 kB
Environment: JBoss 3.2

Resolution Date: 08/Aug/06 03:41 AM


 Description  « Hide
This small contribution to the project is an MBean implementation of an embedded server with optional wire protocol support for JBoss 3.2

I've tested this with JBoss 3.2.2RC2 and JDK 1.4.1_03 and 1.4.2_07 so far running with 0.9.4 SNAPSHOTs

To install simply copy the directory.sar folder into the JBoss deploy folder.

There are a few simple methods on the MBean:

    changedEmbeddedAdminPassword() - used to stop the log4j warning about using the default admin password
    flushEmbeddedServerData()
    DirContext openDirContext() - becuase the Mbean can be configured to hold context information of embedded and none-embedded servers, this method can be called to always return a valid DirContext without the user having to know the connection details


 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Simon Temple added a comment - 22/Nov/05 11:16 PM
JBoss 3.2 ApacheDS MBean - contribution from SAA Consultants Ltd (UK)

Simon Temple added a comment - 22/Nov/05 11:34 PM
A few wrinkles:

1. jboss-service.xml: Contains a reference to ${reims.jboss.dir}. This is the name of our products configuration folder; passed in as a argument to the JVM at start-up "-Dreims.jboss.dir=c:\..."
- Either change the service xml file or ensure the JBoss start-up script supplies the right argument.

2. Our core product is called REIMS and hence the JMX object name for this MBean is "REIMS.system:service=Directory"
- Again, this can be changed in the service xml file.

3. When you connect to the server using LDAP for the first time you will see the following log4j warning:
WARN [org.apache.ldap.common.message.MessageDecoder](IoThreadPool-2) Could not find java.naming.ldap.attributes.binary key in environment. Using empty set for binaries.
- I'm currently not sure how to fix this as I think I'm setting the required environment... perhaps someone can help me here?

Simon Temple added a comment - 22/Nov/05 11:55 PM
Adding custom schema:

To assist creating custom schema for the embedded server I created

    etc\schema

Create your schema in etc\schema\src\main\schema
then run doit.bat to get the maven plugin to generate the java source files in etc\schema\target

It isn't that elegant but does appear to work.

Alex Karasulu added a comment - 02/Feb/06 11:53 AM
Got n intial commit in:

http://svn.apache.org/viewcvs.cgi/directory/trunks/apacheds/simple/sar/

I stripped many things from the bundle you attached. I still need to test out the sar that is generated since I had to patch the maven sar mojo over at codehaus to get this to work. Please take a look and try to test this out. If we need to patch it some let's do it before RC1 goes out the door in a few days here.

Thanks!

Simon Temple added a comment - 03/Feb/06 01:43 AM
Alex can we make this code and XML file the starting point for a contribution - it has the the disabling of the shutdown handler and is a lot closer to what I'm testing here?

Alex Karasulu added a comment - 03/Feb/06 09:19 PM
Simon I can re-enable the disablement :) of the shutdown hook. This setup is however really clean and easy for us to work with going forward. Is this patch to the current sar module in SVN here:

http://svn.apache.org/viewcvs.cgi/directory/trunks/apacheds/simple/sar/

Alex Karasulu added a comment - 07/Feb/06 10:42 AM
Simon still waiting to hear from you on this issue. Could you answer the question above? This is one of the last issues remaining before we release RC1.

Simon Temple added a comment - 07/Feb/06 10:07 PM
Sorry Alex. I responsed to the auto-generated email instead of commenting the JIRA issue.

Here's what I said:

No its not in SVN as I'm not configured as a contributor ;-)

The main reason for the update is because the last ZIP file contains the code I'm actually testing here right now against the latest trunk... so I know it works.

I realise you cut down the size of the contribution and supplied the m2 pom to build it etc. I guess its up to you guys. The simpler submission is probably easier as a working example however I'm not as able to support it as effectively - as I'm running my companys code base - I.e. The latest attachment.

I'm happy to follow your lead on this Alex...

SimonT


Alex Karasulu added a comment - 08/Feb/06 04:36 AM
Simon I just trimmed it down because we just want the project to deploy the one artifact (the sar). Other things around this are extras like the schema build mechanism you incorporated into it. We can add stuff like this to another project. The key though it to make this artifact a single simple one that someone can drop in and the server will come up. It should be as generic as possible without some of the company specific stuff i found in it.

BTW I know you don't have commit access but you can modify a checked out version of the svn repo and make modifications there. When you're done you can attach an 'svn diff' generated patch. I can then apply these patches for you until you gain karma to the repo.

Simon Temple added a comment - 09/Feb/06 12:28 AM
Alex

I have created an svn patch as requested (had to create src.zip for a new file addition).

I had a go at editing the pom.xml but my m2 skills are pretty poor...

The dependencies I need for build are in the POM. These are the dependencies I need at runtime and should be added to the SAR target:

antlr-2.7.2.jar
commons-lang-2.1.jar
directory-asn1-0.3.4-SNAPSHOT.jar
jdbm-1.0.jar
mina-core-0.9.1-SNAPSHOT.jar
mina-filter-codec-asn1-0.9.1-SNAPSHOT.jar
mina-filter-ssl-0.9.1-SNAPSHOT.jar
org.apache.directory.kerberos.common-0.7-SNAPSHOT.jar
org.apache.directory.protocol.changepw-0.7-SNAPSHOT.jar
org.apache.directory.protocol.common-0.7.1-SNAPSHOT.jar
org.apache.directory.protocol.dhcp-0.1-SNAPSHOT.jar
org.apache.directory.protocol.dns-0.3-SNAPSHOT.jar
org.apache.directory.protocol.kerberos-0.7-SNAPSHOT.jar
org.apache.directory.protocol.ldap-0.9.4-SNAPSHOT.jar
org.apache.directory.protocol.ntp-0.5-SNAPSHOT.jar
org.apache.ldap.common-0.9.4-SNAPSHOT.jar
org.apache.ldap.server.core-0.9.4-SNAPSHOT.jar
org.apache.ldap.server.core.unit-0.9.4-SNAPSHOT.jar
org.apache.ldap.server.plugin-0.9.4-SNAPSHOT.jar
org.apache.ldap.server.shared-0.9.4-SNAPSHOT.jar
org.apache.ldap.server.standalone.simple.jndi-0.9.4-SNAPSHOT.jar
regexp-1.3.jar
slf4j-log4j12.jar
bcprov-jdk14-124.jar
commons-io-1.0.jar
oro-2.0.8.jar

Remember, the DS and MINA JARs can't be used by JBoss unless you remove the maven meta data - see JIRA


Finally... I'm taking one week leave starting tomorrow so can't assist futher until I return... sorry its just bad timing.


Alex Karasulu added a comment - 10/Feb/06 02:39 PM
Ok non of these seemed to work simon I guess the patch was too old. Looks like the sources have changed since then. I'll just defer this issue until later when we can work on it some more for RC2. Sorry about the mess and thanks for trying hard and being a good sport about the patches. I guess up until RC1 there was too much flux in the source repo to let us get this done.

Alex Karasulu added a comment - 10/Feb/06 02:39 PM
Deferring to RC2.

Simon Temple added a comment - 10/Mar/06 07:25 PM
Alex

I have tested the attached with JBoss 3.2.5 and DS 1.0RC1

I still need some help with my pom.xml... can you assist as you update SVN?

The storm of refactoring that happened prior to the RC1 release rendered my previous submission(s) invalid... I hope this fares better.

Regards

SimonT

Alex Karasulu added a comment - 08/Aug/06 03:41 AM
This has been integrated a while back. It does however have issues.