amx_mail.jar
JasonS
Posts: 229
Does anybody know if I can access email services thru an OSGi bundle? or is there a different method of sending emails from Duet?
0
Comments
After querying the Bundle for the amx_mail.jar file it does not report any Registered Services available thru OSGi. Is this only available to netlinx code? Does anyone know of a Duet module that sends emails? I don't know enough about OSGi to know wether I can just import the bundle. The Duet Manifest file configuration has a limited number of bundles? that can be imported, and I have not seen anyway to add to that list. I would prefer not to have to find a J2ME JDK 1.4 email client that is compatible, unless somebody has already been down this road?
Frustrated again by AMX's lack of support for Duet, it was an exercise just getting the documentation I needed to start.
I wrote some code that dumps all of the bundles and their registered services if anyone is interested. I also figured out how to manually add the amx_mail import to the manifest.duetmf file, but eclipse complains about not being able to resolve the packages when I import them in code. From what I have been reading about OSGi I think I might just need to import the jar into code and OSGi will simply not load it when the bundle is installed because it is already available in a bundle? In that case when I pack the module I could choose not to include the amx_mail.jar in my module jar? I am just speculating...
Then in your manifest.duetmf file you need to add com.amx.mail under the import packages section. I left the version number field blank because it did not work with either of the 2 version numbers I tried "1.0.1" for the Bundle-Version or "1.12.0" for the Manifest-Version of amx_mail.jar. I added amx_mail.jar to my Duet project by right clicking the project in the Navigator, selecting "Java Build Path", then the "Libraries" tab and then the "Add External JARs..." button. This step made the com.amx.mail classes resolve in the ide so i could compile. Unless anyone at AMX objects I will post the amx_mail.jar file and the JavaDocs that I received thru my AMX rep.