Finally got smart and wrote a serlvet to map the Orion JNDI space.
Doesn't look like there's a logger in there, unless it's bound to some
subcontext not below "". Here's the output from the mapper:
Context "":
EJBLogger: com.mycompany.ejb.logger.EJBLoggerHome
jdbc: javax.naming.Context
OraclePooledDS: com.evermind.sql.OrionPooledDataSource
OracleDS: com.evermind.sql.DriverManagerDataSource
HypersonicDS: com.evermind.sql.OrionCMTDataSource
OracleEJBDS: com.evermind.sql.OrionCMTDataSource
xa: javax.naming.Context
HypersonicCoreDS: com.evermind.sql.DriverManagerDataSource
java:comp: javax.naming.Context
XATopicConnectionFactory:
com.evermind.server.jms.EvermindXATopicConnectionFactory
Administrator:
com.evermind.server.administration.ApplicationAdministrator
ResourceFinder:
com.evermind.server.administration.ResourceFinder
ServerAdministrator:
com.evermind.server.administration.ApplicationServerAdministrator
ApplicationClientConnector:
com.evermind.server.administration.ApplicationClientConnector
jms: javax.naming.Context
demoQueue: com.evermind.server.jms.EvermindQueue
QueueConnectionFactory:
com.evermind.server.jms.EvermindXAQueueConnectionFactory
demoTopic: com.evermind.server.jms.EvermindTopic
TopicConnectionFactory:
com.evermind.server.jms.EvermindXATopicConnectionFactory
XAQueueConnectionFactory:
com.evermind.server.jms.EvermindXAQueueConnectionFactory
Thought about working around by passing ServletContext to my EJB's log()
methods; but ServletContext isn't Serializable. Ugly solution anyway.
Soooo.... Well I hate admitting failure, but am out of ideas. Seems odd
there's no intuitive way to write to the application logs from an EJB --
seems natural to want to do this. Question for the Evermind folks: am I
the only one who's ever thought this would be a good thing to do? Just
curious.
P.S., if anybody's interested in this JNDI mapper utility, let me know
and I'll clean it up a little and post it to orionsupport.com. There
seem to be a lot of JNDI space related questions on the mailing list,
dunno if this will help anybody.
Thanks all!
--Mark
=============================
There's no standard way to do this unfortunately. There is an Orion
logger
which I was told how to use once (involves a JNDI lookup at
java:comp/env/logger or something like that) - I'll see if I can find
the
sample code.
Mike
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Mark
> Sent: Sunday, November 05, 2000 5:38 PM
> To: Orion-Interest
> Subject: writing to application.log from EJB
>
>
> Folks:
>
> How do you write to the default-application.log from an EJB?
>
> From a servlet you call getServletContext().log(). Can find anything
> analogous in EJB-Land.
>
> Thanks for your help! (Sorry if this is documented somewhere --
> couldn't find it, if it is.)
>
> --Mark
>
>
>