-
1. 3831929
acoliver Apr 9, 2004 1:09 PM (in response to acoliver)Yeah it's probably not *real* hard, but there definitely is a learning curve between trusting run.bat and bootstrapping your own. But this is stuff I've always wanted to learn.
If Andy thinks uploading the path is okay, that'd be fine with me. I don't want anyone to make a special excuse for me on the "no patches without unit tests" rule. I don't mind learning the hard way, that way I won't forget as easy. -
2. Re: TODO: (post M1)
spiritualmechanic Apr 9, 2004 1:09 PM (in response to acoliver)Hey Steve. I put a patch page: http://jboss.org/wiki/Wiki.jsp?page=MailServicesPatches
Send it on through! Remeber the nice and gooey unit tests :-) -
3. Re: TODO: (post M1)
spiritualmechanic Apr 10, 2004 2:07 AM (in response to acoliver)I did a JCA adapter once, actually two, but I didn't have the release/closing working right, and I didn't have the time to test it correctly, so we ripped it out.
I'm on vacation right now, but I can start looking into it, if someone can help me with unit tests. The structures of JCA are pretty consistent, but it seems to be a little finicky/sensitive in getting the exact behavior you want.
Steve -
4. Re: TODO: (post M1)
spiritualmechanic Apr 10, 2004 2:37 AM (in response to acoliver)Just to get something clear, does the JCA use the MBean, or does the MBean use the JCA?
Right now I'm planning on just doing JCA 1.0, passing the subject in, depending on single user/caller identity/connection identity.
So I'll create an Authenticator that passes in the subject/CRI, decides which to use based on JMX config, and returns the correct session.
Let me know if I'm on the right track.
Steve -
5. Re: TODO: (post M1)
acoliver Apr 10, 2004 9:30 AM (in response to acoliver)on mbeans, my answer: Yes.
I think you're going in the right direction. We can always get more scott-speak for how to tweak later. -
6. Re: TODO: (post M1)
spiritualmechanic Apr 13, 2004 8:57 PM (in response to acoliver)Do we want to get the session from JNDI, or do we want to create each one with new properties/authentication? I'm thinking we want to create a new one.
Steve -
7. Re: TODO: (post M1)
acoliver Apr 14, 2004 2:42 PM (in response to acoliver)Gut says join the session but why do you feel we should create it.
-
8. Re: TODO: (post M1)
spiritualmechanic Apr 15, 2004 8:42 AM (in response to acoliver)I may be completely wrong, but if I'm binding to a mail server on port 25, with certain permissions, I want to make sure who I'm authenticating with. If I grab it from the session, I'm not sure what user it will be using, most likely the default user from the javamail MBean.
Maybe I can extend the javamail stuff to use the subject, if it's not null.
Steve -
9. Re: TODO: (post M1)
spiritualmechanic Apr 15, 2004 8:44 AM (in response to acoliver)Let me start looking that the standard javamail stuff in JBoss and maybe I'll get my answer.
Steve -
10. Re: TODO: (post M1)
spiritualmechanic Apr 15, 2004 9:31 AM (in response to acoliver)Now I'm wondering:
Am I securing the connection to an outside mail server (i.e. the socket to a port 25) or am I securing access to the Mail Session itself?
Steve -
11. Re: TODO: (post M1)
spiritualmechanic Apr 15, 2004 11:44 AM (in response to acoliver)Currently, also, I'm allowing multiple handles to access the same session. We may hit some synchronization issues eventually, but I'm basically copying the structure of the JDBC adapter in jbosscx.
In JCA, you have the option of handing out multiple handles per connection, or just one per.
Steve -
12. Re: TODO: (post M1)
spiritualmechanic Apr 15, 2004 11:47 AM (in response to acoliver)Also, I'm curious as to where the MBean falls in. If I remember my JBossSX correctly, if you set the property in *-ds.xml to Container, it'll send in the Subject. If not, subject is null, and you use whatever static user/pw there is.
Are there MBean properties we'll need to be using outside of the current MailService?
Steve -
13. Re: TODO: (post M1)
adrian.brock Apr 15, 2004 12:48 PM (in response to acoliver)Concurrency should not be an issue as long as you are doing pooling correctly.
Don't allow access to handles across threads (e.g. storing them in static fields
or shared objects).
Even then, this is only really an issue if you support transactions, it depends upon
what constraints you use outside a transaction.
e.g. jdbc allows concurrent access -it requires internal synchronization.
JMS says you must use external synchronization on the jms session.
I would say the JavaMail spec requires internal synchronization.
"When sharing the session object, all applications share authentication information, properties, and the rest of the state of the object."
Regards,
Adrian -
14. Re: TODO: (post M1)
spiritualmechanic Apr 15, 2004 2:47 PM (in response to acoliver)Interesting. Thanks, Adrian.
Is what Scott is asking for (at the end of all this) a relay server built on jboss-mail and the JCA-mail adapter? Like a subsystem of jboss-mail? Or maybe a subsystem on top of jboss-mail.
Right now I'm just focusing on promoting "the JavaMail Session to the same level as JDBC connections" via JCA.
Steve