[JCA/JBoss] - Re: ManagedConnectionFactory.setLogger
by iit
"adrian(a)jboss.org" wrote :
| i.e. There will be no logging unless the appserver associates an output stream
| with MCF. If or how it does it is entirely down to it.
|
| Since JBoss uses log4j and always associates a writer you can control
| it using the log4j config.
|
| Since JBoss is Open Source you change those rules, if you don't like it.
| It's called a feature.
|
| I fail to see how you can argue with a straight face that overridding a policy decision
| can possibly be a bug?
You don't want understand, right?
To recap (from the javadoc): If you set a log writer, logging and tracing is ON! It doesn't matter if that is a null stream or not, because the MCF creates a huge debug/trace output.
To use a RA with debug/trace enabled in a high-load scenario in production is not appropriate. In our case it's not usable.
That is a bug.
But anyway, bug or not, it doesn't work and that's what matters.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4123568#4123568
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4123568
18 years, 3 months
[JBoss Messaging] - mail example no mails received
by dreuzel
I'm reading my mailbox
all properties seem to be setup correclty
| @MessageDriven(activationConfig={
| @ActivationConfigProperty(propertyName="mailServer", propertyValue="mail..net"),
| @ActivationConfigProperty(propertyName="mailFolder", propertyValue="INBOX"),
| @ActivationConfigProperty(propertyName="storeProtocol", propertyValue="pop3"),//pop3
| @ActivationConfigProperty(propertyName="pollingInterval", propertyValue="60000"), //1000 is 1 second 60*60 each hour
| @ActivationConfigProperty(propertyName="flush", propertyValue="false"), //do not remove the info from the mail
| @ActivationConfigProperty(propertyName="debug", propertyValue="true"), //do not remove the info from the mail
| @ActivationConfigProperty(propertyName="userName", propertyValue="seamMailbox"),
| @ActivationConfigProperty(propertyName="password", propertyValue="pass")
| })
| @ResourceAdapter("mail-ra.rar") //jboss-jca.jar annotation : org.jboss.annotation.ejb.* //It should be in $JBOSS_HOME/server/default/deploy/ejb3.deployer/jboss-annotations-ejb3.jar
| @Name("mailpoplistener")
| public class EmailPop implements MailListener
| { //email support include JBOSS-seam-mail.jar in WEB-INF/lib
| // or JBOSS JavaMail API lib/mail.jar (copy in activation.jar
| @Logger private Log log;
| @In(create=true) private Email email;
| @In(create=true) private Renderer render;//rendering email
| @In ("#{entityManager}") public EntityManager em;//allow for db ACCESS
|
| Exception ErrCod=null;
| String Env="Mail pop";
| public void onMessage(Message message) {
| // Process the message
| // detect beursmessage else Forward for attention
| try{ Env="Get Email message";
| log.info("mail from:"+message.getFrom());
| log.info("mail from:"+message.getSubject());
| log.info("mail from:"+message.getContentType());
| log.info("mail from:"+message.getContent());
|
| beursmail.process(message);
| } catch(Exception er)
| {ErrCod=er;
| String errmsg=er.getClass().getSimpleName() +" err: "+ er.getMessage();
| log.error(Env+" Modifying timeout failed "+ errmsg);
| }
| }
|
but no mails are getting in and as flush is enabled ; all mails are cleared
in debug mode I see following :
| DEBUG: JavaMail version 1.4ea
| 17:05:28,218 INFO [STDOUT] DEBUG: java.io.FileNotFoundException: C:\WINDOWS\programfiles\java\jre1.6.0_03\lib\javamail.providers (The system cannot find the file specified)
| 17:05:28,218 INFO [STDOUT] DEBUG: !anyLoaded
| 17:05:28,218 INFO [STDOUT] DEBUG: not loading resource: /META-INF/javamail.providers
| 17:05:28,218 INFO [STDOUT] DEBUG: successfully loaded resource: /META-INF/javamail.default.providers
| 17:05:28,218 INFO [STDOUT] DEBUG: Tables of loaded providers
| 17:05:28,218 INFO [STDOUT] DEBUG: Providers Listed By Class Name: {com.sun.mail.smtp.SMTPSSLTransport=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Sun Microsystems, Inc], com.sun.mail.smtp.SMTPTransport=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc], com.sun.mail.imap.IMAPSSLStore=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun Microsystems, Inc], com.sun.mail.pop3.POP3SSLStore=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Sun Microsystems, Inc], com.sun.mail.imap.IMAPStore=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc], com.sun.mail.pop3.POP3Store=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems, Inc]}
| 17:05:28,218 INFO [STDOUT] DEBUG: Providers Listed By Protocol: {imaps=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun Microsystems, Inc], imap=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc], smtps=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Sun Microsystems, Inc], pop3=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems, Inc], pop3s=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Sun Microsystems, Inc], smtp=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]}
| 17:05:28,218 INFO [STDOUT] DEBUG: successfully loaded resource: /META-INF/javamail.default.address.map
| 17:05:28,218 INFO [STDOUT] DEBUG: !anyLoaded
| 17:05:28,218 INFO [STDOUT] DEBUG: not loading resource: /META-INF/javamail.address.map
| 17:05:28,218 INFO [STDOUT] DEBUG: java.io.FileNotFoundException: C:\WINDOWS\programfiles\java\jre1.6.0_03\lib\javamail.address.map (The system cannot find the file specified)
| 17:05:28,218 INFO [STDOUT] DEBUG: setDebug: JavaMail version 1.4ea
| 17:05:28,218 INFO [STDOUT] DEBUG: getProvider() returning javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems, Inc]
| 17:05:28,218 INFO [STDOUT] DEBUG POP3: connecting to host "mail..net", port 110, isSSL false
| 17:05:28,718 INFO [STDOUT] S: +OK POP3 server ready <2260.1201277145@(null)>
| 17:05:28,718 INFO [STDOUT] C: USER seamMailbox
| 17:05:28,718 INFO [STDOUT] S: +OK please send PASS command
| 17:05:28,718 INFO [STDOUT] C: PASS pass
| 17:05:28,734 INFO [STDOUT] S: +OK 23 messages (295250 octets)
| 17:05:28,734 INFO [STDOUT] C: STAT
| 17:05:28,734 INFO [STDOUT] S: +OK 23 295250
| 17:05:28,734 INFO [STDOUT] C: NOOP
| 17:05:28,734 INFO [STDOUT] S: +OK
| 17:05:28,875 INFO [STDOUT] C: NOOP
| 17:05:28,875 INFO [STDOUT] S: +OK
| 17:05:28,875 INFO [STDOUT] C: QUIT
| 17:05:28,906 INFO [STDOUT] S: +OK POP3 server signing off
|
23 messages are effectively available non are read
nor is onMessage triggered
nor any other error message
any idea's ?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4123567#4123567
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4123567
18 years, 3 months
[Installation, Configuration & DEPLOYMENT] - Re: Configuration JNDI
by benjiii
Ok - thanks, you helped a lot - perhaps I don't understand everything, but I'm on the way now - and I got an idea about understanding all that.
Now there's the next problem I've got. If I understood right after googling the RAD generates non-JBoss-conform EJBQL - and so the Error tolds me I saw in the log-File. So I made a jbosscmp-jdbc.xml beside the jboss.xml with code for each query:
| <enterprise-beans>
| <entity>
| <ejb-name>Data</ejb-name>
| <query>
| <query-method>
| <method-name>ejbSelectLastId</method-name>
| <method-params>
| </method-params>
| </query-method>
| <ejb-ql><![CDATA[select max(o.data_id) from Data o]]></ejb-ql>
| </query>
| </ejb-name>Data</ejb-name>
| <!--[... donefor each EJB and query...]-->
| </entity>
| </enterprise-beans>
|
|
But RAD now gives syntax error - and I'm also not sure, if my file is correct - and will solve the EJB-problems.
For 2.: I also use direct SQL. The lookup for this - I'm not sure, if it will work - what lookup I have to put there? The same as for the EJB's?
Hope for another great answer ;-)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4123562#4123562
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4123562
18 years, 3 months
[JBoss Seam] - Multiple Domains
by etaham
Over the past week I have been reading a tremendous amount about jboss seam and how to use it. I'm very interested in using it for a new project I'm starting soon, but I'm couldn't find any documentation or examples described what I need.
The easiest way to described my project is a large site that spans multiple domains. The system will need to have unified login - meaning one login for a user will work across all of the sites/domains. What makes this complex is that a user can have different roles in each site. For example, userA might be an admin in www.sitea.com, but only be a moderator in www.siteb.com.
My question is as follows, is there a way to inject/set a site_id accessible by beans and security rule (drules)? This way when a user tries accessing a function I could check for the following tuple is a user has a roleA for siteA, or when a user goes to www.siteA.com/index.seam it will know to load with index for siteA and not siteB.
Is this possible using the seam framework? standalone jsf? Any ideas on how I could implement it? maybe using a phaselistener?
Thank you,
Eli
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4123558#4123558
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4123558
18 years, 3 months