Jato 1.2 Log class

Hi
How can i set log level(Examle : JATO_TRACE ,APP_TRACE) for this new
Log class(Jato 1.2).Can i read this log level from a properties file.
Thanks in advance
Shyam Gotur

Hi Syam--
For your example, call:
Log.setEnabledLevels(
DEFAULT_LOG_LEVELS | APP_TRACE | JATO_TRACE);
You may also want to call Log.setEchoToSystemOut(true) to make the messages
appear at the console. If you want to set these values from a property
file, you'll need to create that mechanism yourself.
Also note that the application message feature now works consistently in
JATO 1.2. In earlier versions, the servlet would try to append these
messages to the output stream after a forward occurred. This worked in some
containers and not others. JATO 1.2 appends the application messages to the
rendered JSP at the close of the <jato:useViewBean> tag, guaranteeing they
appear every time. Therefore, you might find it more convenient to use the
following techniques for small debugging tasks:
appMessage(<message>) (usable inside any ContainerView);
getRequestContext().getMessageWriter().println(<message>);
(usable anywhere you have the request context)
Todd
----- Original Message -----
From: <shyam_gotur@p...>
Sent: Thursday, October 18, 2001 11:29 AM
Subject: [iPlanet-JATO] Jato 1.2 Log class
Hi
How can i set log level(Examle : JATO_TRACE ,APP_TRACE) for this new
Log class(Jato 1.2).Can i read this log level from a properties file.
Thanks in advance
Shyam Gotur
[email protected]

Similar Messages

  • How to use weblogic.logging classes in 6.0

    Hi,
    We developed a number of logging classes under 5.1. One used
    weblogic.logging.LogOutputStream to write messages out to the log. This
    code no longer works under WLS 6.0. Everything compiles and runs but I
    don't see any of our messages in any of the log files. Judging from the 6.0
    JavaDoc, it looks like LogOutputStream is no longer supported. So I
    switched over to using NonCatalogLogger. Same results - no output in the
    logs.
    What am I missing?
    Thanks.
    -brian

    My coding error. weblogic.logging.* classes work just fine in 6.0 (he said
    sheepishly)!
    -b
    "Brian J. Levine" <[email protected]> wrote in message
    news:[email protected]..
    Hi,
    We developed a number of logging classes under 5.1. One used
    weblogic.logging.LogOutputStream to write messages out to the log. This
    code no longer works under WLS 6.0. Everything compiles and runs but I
    don't see any of our messages in any of the log files. Judging from the6.0
    JavaDoc, it looks like LogOutputStream is no longer supported. So I
    switched over to using NonCatalogLogger. Same results - no output in the
    logs.
    What am I missing?
    Thanks.
    -brian

  • Thread safe logging class, using final and static

    Hi,
    I'm looking through a logging class (which writes entries to a text file and so on) written by someone else, and I'm trying to determine whether it's thread-safe...
    Essentially the class looks like this:
    public final class Logger {
    private static FileOutputStream fout;
    private static PrinterWriter pout;
    private static final long MaxLength = 100000;
    static {
    /* basically checks size of logfile, if bigger than 100k, then copy it as bak, and start again */
    public void write(String msg) {
    /* write entry into log file */
    public void writeWithTimeStamp(string msg) {
    /* write entry with time stamp into log file */
    Now, I could be wrong, but I don't think that the class is thread-safe is it? in order to be thread-safe, I would have to use synchronized before write() and writeWithTimeStamp(), right?
    My confusion arises from the use of the keyword "final" at the top of the class. This class isn't being inherited (or rather, there's no reason for the class not to be inheritable)... so what is it's purpose, if there is one?!
    And my other question concerns the static block. But I need to describe the current setup first: The Logger class is being use by a file server. File server basically sits there, accepts socket connections from the outside, and takes text files and output them into a local directory. When a new socket connection is created, a new thread is created. As it stands right now, each thread instantiates its own Logger object which seems weird! Bringing me to my question which was, if each thread instantiates its own Logger object, the static block is only ran ONCE, regardless of how many threads (and therefore Logger objects) are created, right??
    And wouldn't it be a better idea to simply create only ONE Logger object and pass it by reference to all newly created threads as they are needed so that all threads access the same and only Logger object? (and therefore utilize sychronization)
    Thanks!

    In JDK 1.4, there are already classes written that do all of that work. Check out the docs for the java.util.logging package. Specifically, check out FileHandler (which can rotate log files if they are greater than a specified size) and LogRecord (which is a standardized way to store logging entries). I believe the class is threadsafe, it doesn't say it isn't. Try it and see. If not, you can easily make a threadsafe wrapper for it (or any class for that matter).
    The online documentation is at:
    http://java.sun.com/j2se/1.4/docs/api/index.html
    If you are curious, the simplest way to make any class threadsafe, if you don't want to or are not able to modify the class code itself is to define another class that calls methods of the original class, but that is synchronized.
    Example:
        // NonThreadSafe.java
        public class NonThreadSafe {
            public NonThreadSafe (String s) {
                // Constructor
            public void SomeMethod (int param) {
                // Do some important stuff here...
            public int AnotherMethod (boolean param) {
                // Do some more important stuff here...
        // ThreadSafeWrapper.java
        public class ThreadSafeWrapper {
            protected NonThreadSafe nts;
            public ThreadSafeWrapper (String s) {
                nts = new NonThreadSafe(s);
            public synchronized void SomeMethod (int param) {
                nts.SomeMethod(param);
            public synchronized int AnotherMethod (boolean param) {
                return nts.AnotherMethod(param);
            public NonThreadSafe GetNonThreadSafe () {
                return nts;
        };Unfortunately, ThreadSafeWrapper isn't derived from NonThreadSafe, so you are somewhat limited in what you can do with it compared to what you could do with NonThreadSafe. AFAIK, you can't override unsynchronized methods with synchronized ones.
    Another thing you could do is just write a method that writes to your logging class, and synchronize just that method. For example:
        // ThreadSafeLogger.java
        public class ThreadSafeLogger {
            public static synchronized void LogMessage (MyLogger log, String msg) {
                log.writeString(msg);
        // In another thread, far, far away:
            ThreadSafeLogger.LogMessage(theLog, "Blah");
            ...Hope that helps.
    Jason Cipriani
    [email protected]
    [email protected]

  • Jato 1.2 UML Class Diagrams

    Hi All,
    I have put together some UML class diagrams for JATO 1.2. You may find them
    useful. Please let me know if you spot any errors.
    Regards,
    Dennis Parrott.
    Dennis Parrott
    Senior Consultant
    iPlanet Professional Services
    Sun Microsystems Limited
    Guillemont Park
    Camberley Mobile: +44 (0)7765 221938
    GU17 9QG Email : dparrott@i...
    iPlanet
    e-commerce solutions
    www.iplanet.com
    [Non-text portions of this message have been removed]

    Hi Dennis--
    Only we can post files for the group. We'll be happy to do so, or if you
    would rather host a public site for them, we can post a link in the group.
    (Looking forward to seeing the diagrams.)
    Todd
    ----- Original Message -----
    From: "Dennis Parrott" <dparrott@i...>
    Sent: Monday, December 17, 2001 7:41 AM
    Subject: RE: [iPlanet-JATO] Jato 1.2 UML Class Diagrams
    Note the deliberate mistake - the document was not included - actually it
    was removed - How can I publish this to the group?
    Dennis Parrott[PARA]Senior Consultant[PARA]iPlanet Professional
    Services[PARA]Sun Microsystems Limited[NL]Guillemont Park[NL]Camberley
    Mobile: +44 (0)7765 221938[NL]GU17 9QG Email :
    dparrott@i... iPlanet [PARA]e-commerce solutions
    [PARA]www.iplanet.com
    -----Original Message-----
    From: Dennis Parrott [mailto:<a href="/group/SunONE-JATO/post?protectID=114154113180127190050057203026021130134026057192209171188199">dparrott@i...</a>]
    Sent: 17 December 2001 15:35
    Subject: [iPlanet-JATO] Jato 1.2 UML Class Diagrams
    Hi All,
    I have put together some UML class diagrams for JATO 1.2. You may findthem
    useful. Please let me know if you spot any errors.
    Regards,
    Dennis Parrott.
    Dennis Parrott
    Senior Consultant
    iPlanet Professional Services
    Sun Microsystems Limited
    Guillemont Park
    Camberley Mobile: +44 (0)7765 221938
    GU17 9QG Email : dparrott@i...
    iPlanet
    e-commerce solutions
    www.iplanet.com
    [Non-text portions of this message have been removed]
    For more information about JATO, please visit:
    http://developer.iplanet.com/tech/appserver/framework/index.jsp
    Choose from 1000s of job listings!
    For more information about JATO, please visit:
    http://developer.iplanet.com/tech/appserver/framework/index.jsp

  • Jgroups commons logging class cast exception

    I have an EAR which uses Hibernate for persistence. Hibernate is configured to use JBoss Tree Cache. JBoss Tree Cache uses JGroups, which in turn uses commons logging.
    I have all required JARs in my EAR.
    When my own code uses commons logging, no problem. Output appears in oracle logs.
    But when JGroups tries to do some commons logging, a ClassCastException occurs on the LogFactoryImpl.
    I notice that oc4j uses jgroups internally, and therefore must also include commons logging somwehere (as jgroups uses it), and so I am assuming that this is a classloading problem. None of us have any idea what to do now (and we are used to classloading problems in JBoss).
    Can someone help?
    Stacktrace is:
    java.lang.ExceptionInInitializerError
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:164)
         at org.jboss.cache.TreeCache.class$(TreeCache.java:84)
         at org.jboss.cache.TreeCache.<clinit>(TreeCache.java:307)
    Caused by: org.apache.commons.logging.LogConfigurationException: java.lang.ClassCastException: org.apache.commons.logging.impl.LogFactoryImpl
         at org.apache.commons.logging.LogFactory.newFactory(LogFactory.java:507)
         at org.apache.commons.logging.LogFactory.getFactory(LogFactory.java:350)
         at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:381)
         at org.jgroups.blocks.MethodCall.<clinit>(MethodCall.java:46)

    Have you read the following doco, it may help:
    http://download-west.oracle.com/docs/cd/B25221_04/web.1013/b14433/classload.htm#sthref58
    Chris

  • Logger.exiting() method doesn't log class/method names

    I'm trying to setup logging in a ResourceAdapter running in
    Appserver 8. For some reason, when the Logger.exiting() method
    is called, the class and method names are not logged.
    Any ideas why this is happening ?
    Thanks, Alan
         private static final String _CLASSNAME = "MyResourceAdapter";
         private static final String _PACKAGE = "com.wombat.myRA";
         protected static Logger mLogger = null;
         private void Initialise () {
              mLogger = Logger.getLogger(_PACKAGE);
              try {
                   mLogger.setLevel(Level.FINEST);
              } catch(Exception e ) {
                   e.printStackTrace();
              mLogger.exiting(_CLASSNAME,"Initialise","OK");
              mLogger.exiting(_CLASSNAME,"Initialise");
         }The log output looks like this :
    [#|2004-11-11T13:59:10.351+0000|FINER|sun-appserver-pe8.1|com.wombat.myRA|_ThreadID=10;|RETURN {0}|#]
    [#|2004-11-11T13:59:10.351+0000|FINER|sun-appserver-pe8.1|com.wombat.myRA|_ThreadID=10;|RETURN|#]

    Following up after further investigation.
    It's not just .exiting() that is failing to log the class/method names.
    All methods on Logger fail to log the supplied class/method names.
    Even manually creating a LogRecord and explicitly calling setSourceClassName()
    and setSourceMethodName() fails to log the names.
    Presumably this is because the supplied names are being ignored.
    Anyone have any idea why this would happen?/
    Thanks, Alan
    PS. All this refers to java.util.logging.Logger

  • ActionScript 3 logging and log Class

    Hello All, I am a bit of novice in ActionScript 3. I am attempting to create an application in Flash were clients can exchange and send messages to each other. I have heard logAppend  logTarget, logWindow etc can achieve this in Flex Builder. Can this code work in Flash? If the answer is yes, can you provide me some examples of the code please or give me a link so i can read and learn more about the code?
    If the answer is no then, what do i do?
    Thank You

    i don't think so.  i don't see any references, for example, to logAppend anywhere on adobe.com.
    use the netgroup class to create a peer-to-peer chat app.

  • Conversion of 1.2 JATO project (non-Forte IDE) to S1AF (JATO) 2.0

    JATO Team,
    First of all, thank you very much for the Studio integration. It
    looks very promising in terms of development time consumption,
    deployment to S1AS7, etc., etc. It is impossible to observe all
    advantages for so short period of time.
    The SOAF (JATO) 2.0 is installed on the top of the Sun ONE Studio 4,
    update 1 (EE) with JDK 1.4 along with the Sun One Application Server
    7 (W2000). Everything looks okay, at least all basic tasks listed in
    the "Getting Started" manual (project/view/model creation, basic db
    connection, running of a test application with the usage of the
    Studio's default Tomcat container, etc.) work proper.
    During the installation of S1AF module on the top of the Sun ONE
    Studio 4, update 1 (EE) I've got an invitation to convert the
    existing project to the new environment. As I realized the only JATO
    project integrated/created with Forte IDE is applicable for this auto-
    conversion (please correct me, if I am wrong. It could solve a lot of
    my problems).
    Since we are using JBuilder5 IDE and our JATO 1.2 project is
    integrated with this IDE I manually re-created project in the Studio
    with its file structure, adjusted the project web.xml file, etc. This
    new project looks like a proper one (Studio recognize all methods,
    fields, bean patterns, e.g.) except at least one "small" thing. All
    java files (project viewBeans, Models, custom viewBeanHelpers a.k.a.
    pure java) came up with the same wizard image:java class. Stutio with
    the S1AF module reserves the special images (and appropriate studio
    properties, of course!) for View and Model. Namely this allows to see
    the following structure for a ViewBean, for example, in the Studio:
    Modules
    ProjectName.ModuleName
    FooViewBean
    JavaSource
    JSPs
    Non-Visual Components
    View Components
    On the other hand, I could add either new View or Model in my
    manually converted project and add any View Component or bind the
    Model fields, for example. Also, the ProjectModuleServlet has been
    converted proper. I tried to convert each View/Model class inside the
    Studio to its proper wizard image and failed. Addition of a View
    Components (with an appropriate code fragments) via the Studio or
    auto-binding of model fields is an essential part of 2.0 and should
    drastically speed up the development process as it is designed.
    Questions:
    1. What I missed in my manual conversion of 1.2 JATO project to the
    SOAF (JATO) 2.0 realm? What should I correct in my JATO 1.2
    compatible classes (Views and Models) to be recognizable by Studio
    wizard (JATO 2.0)?
    To be more specific. Some deltas between JATO 1.2 and JATO 2.0 are as
    follows (related to a ViewBean):
    ====++++++++++++++======
    JATO 1.2 viewBean extension upon creation:
    public class FooViewBeanViewBean extends ViewBeanBase
    implements ViewBean
    ========================
    JATO 2.0 (S1AF) version: viewBean extension upon creation:
    public class FooViewBean extends BasicBeanBase
    ====++++++++++++++======
    JATO 1.2 viewBean createChild(...) method for one static looks
    like:
    protected View createChild(String name)
    if (name.equals(CHILD_STATICTEXT1))
    StaticTextField child = new StaticTextField
    (this,
    getDefaultModel(),
    CHILD_STATICTEXT1,
    CHILD_STATICTEXT1,
    CHILD_STATICTEXT1_RESET_VALUE,
    null);
    return child;
    ========================
    JATO 2.0 (S1AF) version: viewBean createChild(...) is renamed (as
    a least) to createChildReserved(...):
    protected View createChildReserved(String name) {
    if (name.equals(CHILD_STATICTEXT1)) {
    com.iplanet.jato.view.BasicDisplayField child =
    new com.iplanet.jato.view.BasicDisplayField(this,
    STATICTEXT1);
    return child;
    ====++++++++++++++======
    JATO 1.2 viewBean registerChildren() method for the basic field
    types looks like:
    private void registerChildren() {
    registerChild(CHILD_STATICTEXT1, StaticTextField.class);
    registerChild(CHILD_TEXTFIELD1, TextField.class);
    registerChild(CHILD_BUTTON1, Button.class);
    ========================
    JATO 2.0 (S1AF) version: viewBean registerChildren() method:
    private void registerChildren() {
    registerChild(CHILD_STATICTEXT1,
    com.iplanet.jato.view.BasicDisplayField.class);
    registerChild(CHILD_TEXTFIELD1,
    com.iplanet.jato.view.BasicDisplayField.class);
    registerChild(CHILD_BUTTON1,
    com.iplanet.jato.view.BasicCommandField.class);
    Is it correct to say that all existing custom Views/Models
    (compatible with JATO 1.2) should be converted to their JATO 2.0
    variants to be visible by the Studio?
    On the other hand, fast overview of 2.0 API shows that the JATO 1.2
    is a sub-set of the 2.0 (BasicViewBean extends ViewBeanBase, for
    example). What exactly (only deprecated methods?) should be adjusted
    in the project code (1.2), if necessary, to be visible by Studio as a
    View or Model component?
    2. Where it is possible to find the list of deprecated methods (from
    JATO 1.2 to JATO 2.0 versions). It is difficult sometimes to compare
    two versions of API docs (1.2 and 2.0) or compare logs between
    versions. Also, JATO 2.0 is significantly larger than 1.2 version. If
    the later obviously inherits the ND conversion stage (via the
    previous versions), the former obviously has additions incoming from
    the integration with the Studio (a.k.a. Forte 4.0).
    3. What is the current/future Sun/JATO Team policy with regards to
    JATO source code access (version 2.0, at least)? The reason of this
    question is as follows: in order to display dates formatted on the
    screens we adjusted a couple of JATO 1.2 core classes, for example.
    The only minimal, absolutely necessary changes in JATO 1.2 was made,
    but anyway...
    Sorry for so long multiple question. As Todd wrote in his
    announcement mail: "We think you will be very pleased with the new
    product...". This is exciting moment, I believe, for JATO Team as
    well as for any team involved into the conversion of the full size
    application/product from ND to J2EE realm with the JATO as
    an application framework (1.0, 1.1.x, 1.2.X, and 2.0 finally). The
    last step is left in this spiral process to enjoy the ND_Studio
    attractive features in the open source environment.
    Thank you very much in advance.
    Vladimir Ivanov

    I'll get some file templates ASAP and provide them to the group.
    As for source code, I'm not sure what the policy is. JATO 1.2 is very
    close to what JATO 2.0 is, so that should suffice for now.
    The community will be informed when we know more about source availibility.
    craig
    vivanov4114 wrote:
    Craig,
    Thank you for the answer. To be honest with you I tried to do exactly
    the same: I created the small test project and made an attempt to
    adjust the existing *.xml files to the new ones. I got some results,
    otherwise I couldn't even see my original 1.2 project in the Studio.
    Since I am a newcomer in the Studio, I definitely missed something in
    my adjustments. I'll try to observe my changes with the fresh head.
    On the other hand, I am afraid that my samples are very pure. If you
    could post or send me examples of jatoapp.xml and web.xml files (say
    for any of you test project) or excerptions from them with the
    appropriate patterns (ViewBean and Model peers, at least), I would be
    very appreciated. My mail is: vivanov@b...
    In the worst-case scenario I see the workaround: to re-create the
    project for one of our releases with the Forte 4.1 IDE and auto-
    convert it into the JATO 2.0/Studio world using the Studio
    facilities. We must get the current project fully
    integrated/converted with/to the Studio (at certain point) because,
    first, we expect massive coding with the GUI components involved soon
    and, secondly, we have around thousand classes related to JATO only
    (and a lot of extras).
    Coming back to the question #3 from this post. Now we have full
    access to the version 1.2, not only to the JATO 1.2 jar file(I
    explained some reasons below). Would we expect the same Sun/JATO Team
    policy with JATO 2.0?
    Thank you again,
    Vlad
    --- In SunONE-JATO@y..., "cvconover" <craig.conover@s...> wrote:
    It doesn't appear that anyone has responded to this so I am goingto
    give you the short answer:
    The reason you don't see your ViewBeans and Models showing up with
    there "wizard created" icons is because of just that. They weren't
    created via the wizards. The wizards create xml formatted filesthat
    contain metadata of how/what to generate for the ViewBeans and
    Models.
    ViewBeans will have a .viewbean fiel, Models will have a .sqlmodel
    file (for SQL Models), etc. The content of these files describesthe
    code that needs to be generated in the corresponding Java classfile.
    So LoginViewBean.java will have a peer LoginViewBean.viewbean file.
    The code that is generated is place in protected code blocks thatcan
    not be modified in the Studio and should not be modified outsidethe
    Studio because the code will likely be regenerated and custom mods
    inside the protected blocks will be lost.
    Now you can make a JATO 1.2 app appear in the Studio just like aJATO
    2.0 app by adding a jatoapp.xml file with the proper content and
    adjusting your web.xml properly, but it's much more work to getyour
    v1.2 ViewBeans and Models to show up like wizard created versions.
    Furthermore, even more work to get the display fields to show up
    visually.
    The good news is that v1.2 ViewBeans will work with newly wizard
    created ViewBeans. And if you do go through the trouble of making
    your ViewBeans Studio visible like your wizard created ViewBeans,
    adding new display fields visually will work along side yourmanually
    created fields.
    Try creating a new JATO app using the Studio wizards and then go to
    the Filesystems tab and look for the jatoapp.xml file and theweb.xml
    file.
    I am looking for an email that I have that explains how to do a
    partial, manual upgrade.
    Also, you will get rid of your JATO 1.2 jar and replace with theJATO
    2.0 jar in your lib dir.
    Hope this will suffice for now.
    craig
    --- In SunONE-JATO@y..., "vivanov4114" <vivanov@b...> wrote:
    JATO Team,
    First of all, thank you very much for the Studio integration. It
    looks very promising in terms of development time consumption,
    deployment to S1AS7, etc., etc. It is impossible to observe all
    advantages for so short period of time.
    The SOAF (JATO) 2.0 is installed on the top of the Sun ONE Studio4,
    update 1 (EE) with JDK 1.4 along with the Sun One ApplicationServer
    7 (W2000). Everything looks okay, at least all basic tasks listedin
    the "Getting Started" manual (project/view/model creation, basic
    db
    connection, running of a test application with the usage of the
    Studio's default Tomcat container, etc.) work proper.
    During the installation of S1AF module on the top of the Sun ONE
    Studio 4, update 1 (EE) I've got an invitation to convert the
    existing project to the new environment. As I realized the onlyJATO
    project integrated/created with Forte IDE is applicable for thisauto-
    conversion (please correct me, if I am wrong. It could solve a
    lot
    of
    my problems).
    Since we are using JBuilder5 IDE and our JATO 1.2 project is
    integrated with this IDE I manually re-created project in theStudio
    with its file structure, adjusted the project web.xml file, etc.This
    new project looks like a proper one (Studio recognize all
    methods,
    fields, bean patterns, e.g.) except at least one "small" thing.All
    java files (project viewBeans, Models, custom viewBeanHelpersa.k.a.
    pure java) came up with the same wizard image:java class. Stutiowith
    the S1AF module reserves the special images (and appropriate
    studio
    properties, of course!) for View and Model. Namely this allows tosee
    the following structure for a ViewBean, for example, in the
    Studio:
    Modules
    ProjectName.ModuleName
    FooViewBean
    JavaSource
    JSPs
    Non-Visual Components
    View Components
    On the other hand, I could add either new View or Model in my
    manually converted project and add any View Component or bind the
    Model fields, for example. Also, the ProjectModuleServlet hasbeen
    converted proper. I tried to convert each View/Model class insidethe
    Studio to its proper wizard image and failed. Addition of a View
    Components (with an appropriate code fragments) via the Studio or
    auto-binding of model fields is an essential part of 2.0 and
    should
    drastically speed up the development process as it is designed.
    Questions:
    1. What I missed in my manual conversion of 1.2 JATO project tothe
    SOAF (JATO) 2.0 realm? What should I correct in my JATO 1.2
    compatible classes (Views and Models) to be recognizable byStudio
    wizard (JATO 2.0)?
    To be more specific. Some deltas between JATO 1.2 and JATO 2.0are
    as
    follows (related to a ViewBean):
    ====++++++++++++++======
    JATO 1.2 viewBean extension upon creation:
    public class FooViewBeanViewBean extends ViewBeanBase
    implements ViewBean
    ========================
    JATO 2.0 (S1AF) version: viewBean extension upon creation:
    public class FooViewBean extends BasicBeanBase
    ====++++++++++++++======
    JATO 1.2 viewBean createChild(...) method for one static looks
    like:
    protected View createChild(String name)
    if (name.equals(CHILD_STATICTEXT1))
    StaticTextField child = new StaticTextField
    (this,
    getDefaultModel(),
    CHILD_STATICTEXT1,
    CHILD_STATICTEXT1,
    CHILD_STATICTEXT1_RESET_VALUE,
    null);
    return child;
    ========================
    JATO 2.0 (S1AF) version: viewBean createChild(...) is renamed(as
    a least) to createChildReserved(...):
    protected View createChildReserved(String name) {
    if (name.equals(CHILD_STATICTEXT1)) {
    com.iplanet.jato.view.BasicDisplayField child =
    new com.iplanet.jato.view.BasicDisplayField(this,
    STATICTEXT1);
    return child;
    ====++++++++++++++======
    JATO 1.2 viewBean registerChildren() method for the basic field
    types looks like:
    private void registerChildren() {
    registerChild(CHILD_STATICTEXT1,
    StaticTextField.class);
    registerChild(CHILD_TEXTFIELD1, TextField.class);
    registerChild(CHILD_BUTTON1, Button.class);
    ========================
    JATO 2.0 (S1AF) version: viewBean registerChildren() method:
    private void registerChildren() {
    registerChild(CHILD_STATICTEXT1,
    com.iplanet.jato.view.BasicDisplayField.class);
    registerChild(CHILD_TEXTFIELD1,
    com.iplanet.jato.view.BasicDisplayField.class);
    registerChild(CHILD_BUTTON1,
    com.iplanet.jato.view.BasicCommandField.class);
    Is it correct to say that all existing custom Views/Models
    (compatible with JATO 1.2) should be converted to their JATO 2.0
    variants to be visible by the Studio?
    On the other hand, fast overview of 2.0 API shows that the JATO1.2
    is a sub-set of the 2.0 (BasicViewBean extends ViewBeanBase, for
    example). What exactly (only deprecated methods?) should beadjusted
    in the project code (1.2), if necessary, to be visible by Studio
    as
    a
    View or Model component?
    2. Where it is possible to find the list of deprecated methods(from
    JATO 1.2 to JATO 2.0 versions). It is difficult sometimes tocompare
    two versions of API docs (1.2 and 2.0) or compare logs between
    versions. Also, JATO 2.0 is significantly larger than 1.2
    version.
    If
    the later obviously inherits the ND conversion stage (via the
    previous versions), the former obviously has additions incomingfrom
    the integration with the Studio (a.k.a. Forte 4.0).
    3. What is the current/future Sun/JATO Team policy with regards
    to
    JATO source code access (version 2.0, at least)? The reason ofthis
    question is as follows: in order to display dates formatted onthe
    screens we adjusted a couple of JATO 1.2 core classes, forexample.
    The only minimal, absolutely necessary changes in JATO 1.2 wasmade,
    but anyway...
    Sorry for so long multiple question. As Todd wrote in his
    announcement mail: "We think you will be very pleased with the
    new
    product...". This is exciting moment, I believe, for JATO Team as
    well as for any team involved into the conversion of the fullsize
    application/product from ND to J2EE realm with the JATO as
    an application framework (1.0, 1.1.x, 1.2.X, and 2.0 finally).The
    last step is left in this spiral process to enjoy the ND_Studio
    attractive features in the open source environment.
    Thank you very much in advance.
    Vladimir IvanovTo download the latest version of JATO, please visit:
    http://www.sun.com/software/download/developer/5102.html
    For more information about JATO, please visit:
    http://developer.iplanet.com/tech/appserver/framework/index.jsp
    [Non-text portions of this message have been removed]

  • EJB question: How to use abstract class in writing a session bean?

    I had written an abstract class which implements the session bean as follow:
    public abstract class LoggingSessionBean implements SessionBean {
    protected SessionContext ctx;
    protected abstract Object editRecord(Object obj) throws Exception;
    public LoggingSessionBean()
    super();
    private final String getBeforeUpdateImage(Object obj) throws Exception {
    // implement the details of extracting the backup image ...
    public void setSessionContext(SessionContext ctx)
    this.ctx = ctx;
    private final void writeThisImageToDatabase(String aStr) {
    // connect to database to write the record ...
    public final Object update(final Object obj) {
    try {
    final String aStr = getBeforeUpdateImage(obj);
    writeThisImageToDatabase(aStr);
    editRecord(obj);
    } catch (Exception e) {
    ctx.setRollbackOnly();
    This abstract class is to write the backup image to the database so that other session beans extending it only need to implement the details in editRecord(Object Obj) and they do not need to take care of the operation of making the backup image.
    However, some several questions for me are:
    1. If I write a class ScheduleSessionBean extending the above abstract class and the according 2 interfaces ScheduleSession and ScheduleSessionHome for this session bean (void update(Object obj); defined in ScheduleSession), do I still need to write the interfaces for LoggingSession and LoggingSessionHome?
    2. If I wrote the interface LoggingSession extending EJBObject where it defined the abstract methods "void update(Object obj);" and "void setSessionContext(SessionContext ctx);", that this meant I needed to write the ScheduleSession to implement the Logging Session?
    3. I used OC4J 9.0.4. How can I define the ejb-jar.xml in this case?

    Hi Maggie,
    1. do I still need to write
    the interfaces for LoggingSession and
    LoggingSessionHome?"LoggingSessionBean" can't be a session bean, because it's an abstract class. Therefore there's no point in thinking about the 'home' and 'remote' interfaces.
    2. this
    meant I needed to write the ScheduleSession to
    implement the Logging Session?Again, not really a question worth considering, since "LoggingSessionBean" can't be an EJB.
    3. I used OC4J 9.0.4. How can I define the
    ejb-jar.xml in this case?Same as you define it for any version of OC4J and for any EJB container, for that matter, since the "ejb-jar.xml" file is defined by the EJB specification.
    Let me suggest that you create a "Logging" class as a regular java class, and give your "ScheduleSessionBean" a member that is an instance of the "Logging" class.
    Alternatively, the "ScheduleSessionBean" can extend the "Logging" class and implement the "SessionBean" interface.
    Good Luck,
    Avi.

  • Problem about com.sap.tc.logging.LogController.removeLogs

    Hi guy
    I create a LogIt class. code like this
    {private static Category cate = Category.getCategory(Category.APPLICATIONS,"/shneider/km");
         private static void iniLog(){
              cate.removeLogs();
    when runtime I find error in sap nwa log
    Help me
    thanks
    #/System/Server#sap.com/tcwddispwda#com.sapmarkets.bam.jmxadapter.sapjlog.AbstractFileLogHandler#test#14082##n/a##a814584afdb211dfcddb000000d54062#SAPEngine_Application_Thread[impl:3]_27##0#0#Error#1#com.sapmarkets.bam.jmxadapter.sapjlog.AbstractFileLogHandler#Plain###com.sapmarkets.bam.util.BAMRuntimeException: Permission denied by JMX.#
    #/System/Server#sap.com/tcwddispwda#com.sapmarkets.bam.jmxadapter.sapjlog.AbstractFileLogHandler#test#14082##n/a##a814584afdb211dfcddb000000d54062#SAPEngine_Application_Thread[impl:3]_27##0#0#Error#1#com.sapmarkets.bam.jmxadapter.sapjlog.AbstractFileLogHandler#Plain###com.sap.engine.services.jmx.exception.JmxSecurityException: Caller test not authorized, only role administrators is allowed to access JMX#
    #/System/Server#sap.com/tcwddispwda#com.sapmarkets.bam.jmxadapter.sapjlog.AbstractFileLogHandler#test#14082##n/a##a814584afdb211dfcddb000000d54062#SAPEngine_Application_Thread[impl:3]_27##0#0#Error#1#com.sapmarkets.bam.jmxadapter.sapjlog.AbstractFileLogHandler#Plain###java.security.AccessControlException: access denied (javax.management.MBeanPermission -\#-[:SAP_J2EECluster="",SAP_J2EEClusterNode="",j2eeType=LVLogType,name=./log/schneider/debug/km.%g.log] unregisterMBean)#
    #/System/Server#sap.com/tcwddispwda#com.sapmarkets.bam.jmxadapter.sapjlog.AbstractFileLogHandler#test#14082##n/a##a814584afdb211dfcddb000000d54062#SAPEngine_Application_Thread[impl:3]_27##0#0#Error#1#com.sapmarkets.bam.jmxadapter.sapjlog.AbstractFileLogHandler#Plain###Originated from: java.security.AccessControlException: access denied (javax.management.MBeanPermission -\#-[:SAP_J2EECluster="",SAP_J2EEClusterNode="",j2eeType=LVLogType,name=./log/schneider/debug/km.%g.log] unregisterMBean)
         at java.security.AccessControlContext.checkPermission(AccessControlContext.java:269)
         at java.security.AccessController.checkPermission(AccessController.java:401)
         at com.sap.engine.services.jmx.EngineAuthorization.checkMBeanPermission(EngineAuthorization.java:66)
         at com.sap.engine.services.jmx.auth.UmeAuthorization.checkMBeanPermission(UmeAuthorization.java:77)
         at com.sap.engine.services.jmx.JmxServerFrame.checkMBeanPermission(JmxServerFrame.java:98)
         at com.sap.engine.services.jmx.MBeanServerSecurityWrapper.unregisterMBean(MBeanServerSecurityWrapper.java:395)
         at com.sap.engine.services.jmx.ClusterInterceptor.unregisterMBean(ClusterInterceptor.java:1327)
         at com.sap.pj.jmx.server.interceptor.MBeanServerInterceptorChain.unregisterMBean(MBeanServerInterceptorChain.java:258)
         at com.sapmarkets.bam.jmxadapter.sapjlog.AbstractFileLogHandler.unRegisterLogMBean(AbstractFileLogHandler.java:538)
         at com.sapmarkets.bam.jmxadapter.sapjlog.AbstractFileLogHandler.handleEvent(AbstractFileLogHandler.java:563)
         at com.sap.tc.logging.LoggingManager.notifyRemoveLog(LoggingManager.java:379)
         at com.sap.tc.logging.LogController.removeLogsNormalInt(LogController.java:3394)
         at com.sap.tc.logging.LogController.removeLogs(LogController.java:1462)
         at com.deep.util.LogIt.iniLog(LogIt.java:142)
         at com.deep.util.LogIt.Log(LogIt.java:45)
         at com.deep.authoriy.impl.KmAuthServImpl.getBoScope(KmAuthServImpl.java:91)
         at com.deep.service.impl.KmCategoriesSerivceImpl.hasGrandson(KmCategoriesSerivceImpl.java:175)
         at com.deep.km.cate.comp.Comp_KmCategories.getCategories(Comp_KmCategories.java:703)
         at com.deep.km.cate.comp.Comp_KmCategories.initKmCategoriesTree(Comp_KmCategories.java:354)
         at com.deep.km.cate.comp.Comp_KmCategories.initView(Comp_KmCategories.java:541)
         at com.deep.km.cate.comp.Comp_KmCategories.wdDoInit(Comp_KmCategories.java:137)
         at com.deep.km.cate.comp.wdp.InternalComp_KmCategories.wdDoInit(InternalComp_KmCategories.java:367)
         at com.sap.tc.webdynpro.progmodel.generation.DelegatingComponent.doInit(DelegatingComponent.java:108)
         at com.sap.tc.webdynpro.progmodel.controller.Controller.initController(Controller.java:215)
         at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:200)
    Edited by: yan liang on Dec 2, 2010 4:02 AM

    java.lang.NoClassDefFoundError: <b>com/sap/tc/logging/Configurator</b>
    Either a missing jar or the classpath is not defined right.

  • Setting logging level

    Hello folks;
    Is there a way to set the logging threshold for log messages sent to
    the weblogic log? I see where to adjust logging threshold for the
    standard out, but this level doesn't seem to affect the threshold for
    messages getting to the physical logfile. Unlike the log4j classes
    that seem to back up weblogic's logging ( I checked this out by
    looking in the weblogic.jar file); there are no methods for setting
    the logging threshold on weblogic's log classes.
    Cheers-

    I was mistaken about the log4j stuff being used under the covers.
    However, changing the logging threshold does not seem to affect
    messages sent to the log for my server. I just tested this again by
    setting the log level to "CRITICAL" in the console. Sure enough the
    messages sent to the standard out console are affected, but the
    messages sent to the physical log are not affected. I still get Info,
    Notice, etc messages there--- but nearly no messages to the standard
    out console.
    This was done on version 7.0 of weblogic.
    Cheers--
    "Jane Sampson" <[email protected]> wrote in message news:<3e5a84b4$[email protected]>...
    Hi Steve,
    If you set the logging level in the Logging tab on Server Configuration, it
    DOES affect the level of messages that are logged to both stdout and the
    physical log. Are you sure you are looking at the correct log file?
    Also, none of the weblogic classes use log4j. What version did you find
    log4j classes included in the weblogic.jar??
    Jane
    BEA Support

  • Using ExtendedLogFormat, server log refers to Exception that does not exist

    I created a custom logging class, using ExtendedLogFormat, according to the doc here:
    [http://edocs.bea.com/wls/docs100/config_wls/web_server.html#elf]
    However, when I do this, and modify the startup classpath to point to my jar containing the class, and modify the log format to include this class, I see in the logs:
    bq. *     Attempting to initialize ExtendedLogFormat application specific header: x-com.on24.weblogic.logging.POSTDataLogField. However, failed due to exception.*
    (POSTDataLogField is the name of my log field class).
    This is very frustrating, because nowhere in ANY log (and I've set the log level as verbose as possible in all places) is any Exception shown.
    Does anyone know how I can find out what this mystery exception is, in a case like this? I've looked at all the logging options, and didn't find anything I could change to be any more verbose than I already am.
    - Tim

    Hi. I'm using version 2.1.11 of the NDK for CSharp. I'm getting this
    same error message:
    Code:
    Connection.freeWriteSemaphore(-2): semaphore not owned by any thread
    at Novell.Directory.Ldap.Connection.freeWriteSemaphor e(Int32 msgId)
    at Novell.Directory.Ldap.Connection.connect(String host, Int32 port, Int32 semaphoreId)
    at Novell.Directory.Ldap.LdapConnection.Connect(Strin g host, Int32 port)
    at TestLDAP.Program.Main(String[] args) in D:\Documents and Settings\tjbuege\my documents\visual studio 2010\Projects\TestLDAP\TestLDAP\Program.cs:line 20
    This occurs when I try to bind to a server that does not exist. Here
    is my sample source code that generates that error:
    Code:
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using Novell.Directory.Ldap;
    namespace TestLDAP
    class Program
    static void Main(string[] args)
    LdapConnection conn = null;
    string host = "server.does.not.exist.com";
    int port = 389;
    try
    conn = new LdapConnection();
    conn.Connect(host, port);
    catch (Exception ex)
    Console.WriteLine(ex.Message);
    Console.WriteLine(ex.StackTrace);
    if (conn != null)
    conn.Disconnect();
    Is there a fix for this? It makes this library useless for me.
    Thanks,
    Tim
    tjbuege
    tjbuege's Profile: http://forums.novell.com/member.php?userid=108957
    View this thread: http://forums.novell.com/showthread.php?t=365082

  • How do I know a user has been logged out from another screen

    If one user is already logged in to the web application and another user with the same user name and password trying to log in to the same web application, i need to logout the first screen's user session. In other word, I want to disable first screen access right since it has been logged out.
    I have a user log class to record users login activities. A new user log object will be created for every login.
    How should I do that?

    Try to write an implementation of HttpSessionListener and HttpSessionAttributeListener something like the one down below and configure it accordingly.Believe tht should very well cater your requirment.
    public SessionAttributeListener implements HttpSessionAttributeListener,HttpSessionListner{
       List<HttpSession> sessionsList;
        public SessionAttributeListener(){
             this.sessionsList = new ArrayList<HttpSession>();   
        public void sessionCreated(HttpSessionEvent se){
        public void sessionDestroyed(HttpSessionEvent se) {
                this.sessionList.remove(se.getSession());
        public void attributeAdded(HttpSessionBindingEvent se){
                    if(se.getName().equals("userInfo"))
                         this.appAction(se);
        public void attributeRemoved(HttpSessionBindingEvent se){
                  if(se.getName().equals("userInfo"))
                            this.sessionsList.remove(se.getSession());  
        public void attributeReplaced(HttpSessionBindingEvent se) {
        private void appAction(HttpSessionBindingEvent se){
                    UserBean ub = (UserBean)se.getValue();
                     for(HttpSession session:this.sessionsList) {
                             UserBean ub1 = (UserBean)session.getAttribute("userInfo"); 
                             if(ub1.getUserName().equals(ub.getUserName())){
                                    try{
                                       session.removeAttribute("userInfo");
                                       session.invalidate();
                                   }catch(Exception exp){}
                    this.sessionsList.add(se.getSession());
    }Hope this might give you a brief idea of how to go about. :)
    REGARDS,
    RaHuL

  • Using Java Logging with Tomcat

    Hi in a previous non Tomcat project I wrote some classes that used the java.util.logging library that comes with java 1.4 quite successfully. I am now trying to use the same classes with Tomcat 5.0 but it doesnt like it. With the logging classes you can provide a configuration class which you define with a property "java.util.logging.config.class", I put the class in my WEB_INF\classes with all the other classes.
    When I run with Tomcat i have a servlet that does the following to try and initilse the logging
    com.appserver.util.logging.LogProperties.setLevelFromParametersFromPrefs();
    System.getProperties().setProperty("java.util.logging.config.class", "com.appserver.util.logging.LogProperties");
    LogManager.getLogManager().readConfiguration();
    it complains it cant find the class, when running readConfiguration(), (The 1st two lines run ok). I think the problem is to do with Tomcat classloader, with a simple Java application the classes would be expected to be on the system classpath, but on Tomcat the system classpath only contains bootstrap.jar.
    I realise I could probably get things working using Apaches log4j instead but it seems a bit silly to use that when there is a perfectly adequate logger built into the language now.
    Anyone done this ?

    OK
    Ive changed my code from
    com.appserver.util.logging.LogProperties.setLevelFromParametersFromPrefs();
    System.getProperties().setProperty("java.util.logging.config.class", "com.appserver.util.logging.LogProperties");
    LogManager.getLogManager().readConfiguration();to
    com.appserver.util.logging.LogProperties.setLevelFromParametersFromPrefs();
    LogManager.getLogManager().readConfiguration(com.appserver.util.logging.LogProperties.getPropertiesAsStream());Now I dont get any errors and only messages for the LEVEL is set to the value I specify in my LogProperties class are displayed. However I also specify a Formatter to use for console output but Tomcat just seems to ignore it and uses its own default formatter. Any ideas...please !

  • Using java.util.logging Properly

    Hello,
    I have implemented java.util.logging in my application by creating a kind of "wrapper" class that I call for handling logging. It doesn't extend the logging classes, it just provides an object with helper methods that I can call when I want it.
    public class LogCleanerLogger {
        private static final String cleanerLogfile = "logcleanerlog%g.txt";
        private static final String loggerName = "LogCleaner";
        private Logger cleanerLogger = null;
        public LogCleanerLogger() throws IOException{
            this.cleanerLogger = Logger.getLogger(getLoggerName());
            cleanerLogger.setUseParentHandlers(false);
            FileHandler logFile = new FileHandler(getCleanerLogfile(),10000,1, true);
            logFile.setFormatter(new SimpleFormatter());
            cleanerLogger.addHandler(logFile);
        public void writeLogInfoMessage(String message){
            cleanerLogger.info(message);
        public void writeLogWarningMessage(String message){
            cleanerLogger.warning(message);
        public void writeLogErrorMessage(String message){
            cleanerLogger.severe(message);
    // getters and setters
    } // end class    This all works quite happily and I can log any information I want. Except for one thing -- my log directory ends up with the log file (logcleanerlog0.txt) and a list of what appear to be temporary logs, e.g. logcleanerlog0.txt.1, logcleanerlog0.txt.2, and so on. Each increment of the number corresponds to a log file that has progressively less information in it that the previous one. At the top level, the unnumbered log, logcleanerlog0.txt, has all the logged information in it.
    I cannot make out, from reading the API and other documentation, how I can get rid of these other files, which appear to me to be temporary files used in the construction of the top level file.
    Can someone help me by explaining the mechanism for generating these files and either (a) how I can get rid of them altogether or (b) how I can arrange for them to be generated in a temp dir, while keeping the main log in the present directory (application root).
    Or perhaps there is a "better way" (that is equally as easy, of course ;-).
    Thanks.
    mp

    are you sure you cannot use the classes from a newer
    version. You can put those classes in your own
    directory. If there ar some other classes that need to
    be from the newer version, you can include them, also
    in your project. It is important that your project
    directory to be placed in the classpath variable
    before the jdk jars.
    (this solution might not work)I doubt that is worth trying.
    First, although it probably does not apply in this case, you are not allowed to distribute part of a JVM. So you could never use this solution in a commercial application.
    Secondly the Java API does change. And every execution path that might use the changed code would have to be tested. That is going to take a lot of work. Keep in mind that the logging api uses java.lang.String and java.lang.String definitely changed in 1.4 and almost every class in the Java API uses it.

Maybe you are looking for

  • PI 7.31-ABAP Proxy Alert

    Hi All, Configured the steps mentioned in the below blog to trigger alert for ABAP Proxies. SAP PI 7.31 : ABAP proxy monitoring and Alerting using CBMA Tested by stopping the Sender SOAP channel and processed one message from ECC, it ends in error in

  • Streaming video ipad to tv

    I would like to watch Netflix streaming to my TV from my iPad.  What are my choices to do this?  I have an old Mini that isn't Intel, so it can't display the Netflix movies all by itself, but can it, with an Airport express, get the movie to play? 

  • Running adobe acrobat xi pro for 1st time stuck on sign-in

    I have successfully installed Adobe Acrobat XI Pro on windows 7 and created an Adobe User ID. When I try to run the program, when asked to enter log-in details, I enter these and then the program appears to load but gets stuck on the sign-in page.

  • Best drive to use with k8n Platinum?

    Need to know the fastest drive to use with this board. I'm sort of confused about the different types of interfaces i.e. scsi, IDE, and SATA.

  • Print jobs keep being canceled

    I don't understand why my print job keeps being canceled. Could someone explain to me what I'm doing wrong? I tried making it a separate thread, but that doesn't work either. /*used to print out reports*/ class printer implements Runnable{      Strin