How to define my startup class in an .ear package?

I am using WL6.0SP2 on solaris.
I plan to package my application as an .ear file and to put all necesarry class
files in there (it will has one .war file for the web tier and one .jar file for
the EJBs).
I want, when Weblogic loads my .ear file (i.e. my application), to execute my
special startup class, which initializes some caches, etc.
I do not want to define a startup/shutdown class in the console, because it is
only specific to my application and this startup class is not present in the weblogic
classpath during weblogic startup.
The correct place should be in application.xml, but I don't see such thing in
the DTD.
Thank you,
Ivaylo Zlatev

There is no way to do this on the EAR level - you can use load-on-startup
servlet(s) in your web component, or initial-beans-in-free-pool=1 EJB.
Ivaylo Zlatev <[email protected]> wrote:
I am using WL6.0SP2 on solaris.
I plan to package my application as an .ear file and to put all necesarry class
files in there (it will has one .war file for the web tier and one .jar file for
the EJBs).
I want, when Weblogic loads my .ear file (i.e. my application), to execute my
special startup class, which initializes some caches, etc.
I do not want to define a startup/shutdown class in the console, because it is
only specific to my application and this startup class is not present in the weblogic
classpath during weblogic startup.
The correct place should be in application.xml, but I don't see such thing in
the DTD.
Thank you,
Ivaylo Zlatev--
Dimitri

Similar Messages

  • How can we call a class file of one package for class file of another

    How can we call a class file of one package from class file of another package and both packages exist in a same folder

    How can we call a class file of one package from
    class file of another package and both packages exist
    in a same folder
    Luckily they don't so it's really not a problem after all.

  • How to define a custom class in BDS?

    Hi,gurus,
    we want to implement BDS to stored our HR project document related with personnel.
    we want to have a cusom BDS class, and
    we want to stored the document related to another server.
    but the customizing for the BDS in SPRO is quite simple, i have no idea on how to fullfill our requirment.
    any clue on this?
    best regards.
    Jun

    Hello,
    Here are some vital steps that you can follow to be able to attach Documents using BDS.
    1. Check and create an entry if required in SBDSV1 for the Business Object. Specify the Logical, Physical and Relational Document Classes here.
    2. Remember that you need not create new Classes and can re-use the existing ones as long as you have the possibility to let the attachments created in SAP DB itself. But, if you feel the need that the documents must be created in an external content server, then you have to create a content repository (OAC0) and wrap it in a content category (OACT) and then assign it in the Physical document class (table SDOKPHCL)
    3. The attachments can be made to the instance of Business Object in OAOR.
    4. Make use of the available methods in the global class CL_BDS_DOCUMENT_SET to suit your needs.
    Hope this info gives you the required insight.
    With Regards
    Vijay Gajavalli

  • HOW to define a style class apply to the specified component?

    Java(TM)     1.6.0_24
    Oracle IDE     11.1.2.1.38.60.81
    In my skin file, I defined the style that I want use it apply to the af:inputText read-only content.But it's not work.
    Can anyone give me some advice for this case?
    /* Style class definition in skin file. */
    .MyReadOnly af|inputText:read-only::content {
    display: block;
    margin: 1px;
    padding-left: 3px;
    padding-right: 2px;
    padding-bottom: 1px;
    padding-top: 1px;
    border: red 1px solid;
    font-size: 13px;
    font-weight: normal;
    height: 13px;
    /* Snippet of jspx */
    <af:inputText label="Label 2" id="it2" columns="1" contentStyle="width:35px;" readOnly="true" styleClass="MyReadOnly"/>
    Edited by: MKevin_OTN on Nov 13, 2012 11:21 PM

    That line is an ADF CSS selector.
    <font color="red">af|inputText</font>: with this selector you are accessing to any <af:inputText> component (this is not the final html <input/>, is a div/table/tr that contains the final <input/>)
    <font color="red">af|inputText:read-only</font>: access only to <af:inputText> components that have readOnly="true".
    <font color="red">af|inputText:read-only.MyReadOnly</font>: access only to <af:inputText> components that have readOnly="true" and styleClass="MyReadOnly".
    <font color="red">af|inputText:read-only.MyReadOnly::content</font>: access to the content (the final <input/>) of <af:inputText> components that have readOnly="true" and styleClass="MyReadOnly".
    AP

  • How to define new classpath of libraries while making jar files with ant

    I am useing eclipse and ant and trying to make a jar file. I have used some external jar files. I have managed to add external jar files to my jar. But Still I have a problem. In my project all libraries in lib folder. But when I put them into jar file. They are in the root folder.Classpath has changed and It couldn't find the class path.
    Is there any body knows how to define a new class path for external libraries with ANT. or How can I put my libraries into a lib folder in jar ?? I think both of them would solve my problem.
    thanks in advance.
    My code is like that, I think it requires a little modification
    <target name="jar">
            <mkdir dir="build/jar"/>         
            <jar destfile="build/jar/Deneme.jar" basedir="build/classes" >             
                <manifest>
                    <attribute name="Main-Class" value="${main-class}"/>                    
                </manifest>             
                 <fileset  dir="${lib.dir}" includes="**/*.jar"/>           
            </jar>
        </target>

    I can see why your other "question" was likely deleted. You need to drop the editorial comments and just ask a question. I believe what you want to know is how to configure something using php on your Apache server so that it can be read. If that's your question, here's a couple of places that discuss the topic:
    http://www.webmasterworld.com/linux/3345459.htm
    http://forums.macrumors.com/showthread.php?t=427742
    http://en.allexperts.com/q/PHP5-3508/configuring-installing-permissions.htm
    For a general introduction to 'nix permissions, take a look at this:
    http://www.osxfaq.com/Tutorials/LearningCenter/UnixTutorials/ManagingPermissions /index.ws
    And here's a whole book on the subject of Leopard permissions:
    http://my.safaribooksonline.com/9780321579331
    Try doing a Google search on "leopard permissions php apache" and see if you find what you are looking for.
    Francine
    Francine
    Schwieder

  • Weblogic startup class and EAR file

    Hi,
    I am using WL 8.1.5.
    I have a weblogic starup class MyStartup that implements T3StartupDef. (it does not specify package).
    I jar-ed it. And I placed MyStartup.jar file into the MyEA.ear file. And I placed that into applications dir.
    With WL Console I defined the startup class and for the ClassName specified MyStartup.
    Yet I get the java.lang.ClassNotFoundException.
    I also have a Manifest.mf file with
    Class-Path: MyStartup.jar
    Please help me solve this problem, I literally don't know what to do next.
    MB

    Hi,
    thanks.
    This seems like a completely opposite method of the depplying startup class with weblogic console.
    Does my class still need to implement T3StartupDef?
    I get this exception. And my classnotfound is still there.
    Exception:weblogic.management.ApplicationException: startup.MyStartup
         at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.createContainer(SlaveDeployer.java:2484)
         at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(SlaveDeployer.java:2396)
         at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:883)
         at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeployer.java:591)
         at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:500)
         at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:25)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)
    Regards,
    MB

  • Startup classes in WL6.0

    Hi everybody,
    Is the use of T3StartupDef interface deprecated in
    weblogic 6.0 for writing startup classes? If yes how do I write startup classes?
    Thanx,
    Sunil

    One feature of WebLogic startup classes is that you do not have to implement
    T3StartupDef - if you class has static void main(String[] args) it will be
    invoked.
    Also, note that startup classes have to be in the system classpath, which
    creates problems when they need to use application classes.
    Sunil Naik <[email protected]> wrote:
    Hi William,
    Thanx for the explanation.I assume that use of T3StartupDef is not
    deprecated and I'll go ahead with it.
    thanx,
    Sunil
    "William Stewart" <[email protected]> wrote:
    Startup classes using the T3StartupDef interface do work in WebLogic
    6.0 - I am
    just now porting a project from WL 4.5 to WL 6.0 and got it to work okay,
    but
    with these caveats:
    (1) BEA's Javadoc documentation on the T3StartupDef interface is outdated
    - it
    mentions 'weblogic.properties', which no longer exists in WL 6.0 (replaced
    by
    config.xml and the Web-based Admin console).
    (2) BEA's documentation for configuring startup classes in the Admin
    console is
    poor - for the 'Arguments' attribute, it doesn't specify how to format
    arguments
    for the startup class - you separate them with a comma like this:
    ARG1=value1,ARG2=value2
    (3) There is no documentation on how to write a Startup class in the
    programming
    section of BEA's documentation. It's very simple though; here is what
    you do:
    (a) Write a class that implements T3StartupDef.
    (b) Give it a default, do-nothing constructor.
    (c) Provide the interface's #setServices(T3ServicesDef) method - just
    save the
    parm in a field or something.
    (d) Provide the interface's #startup(String, Hashtable) method - the
    Hashtable
    contains your arguments (set in the Admin console) and this is where
    you put your
    desired startup code.
    "Sunil Naik" <[email protected]> wrote:
    Hi everybody,
    Is the use of T3StartupDef interface deprecated in
    weblogic 6.0 for writing startup classes? If yes how do I write startup
    classes?
    Thanx,
    Sunil
    Dimitri

  • Register startup classes in 6.0 without using the console

    how do you register startup classes in 6.0 without using the console application?
    thanks

    Config.xml DTD
    http://e-docs.bea.com/wls/docs60///////adminguide/config_xml.html
    "Mark Griffith" <[email protected]> wrote in message
    news:[email protected]..
    | You can edit the config.xml when the server is not running.
    |
    | You will need to know the DTD, which I can't seem to find online right
    this
    | second.
    |
    | Either way you are better off using the console.
    |
    |
    http://e-docs.bea.com/wls/docs60/ConsoleHelp/server.html#deploy_startup_shut
    | down_classes_on_server
    |
    | mbg
    |
    | "Bjorn Wennerstrom" <[email protected]> wrote in message
    | news:3a68e39e$[email protected]..
    | >
    | > how do you register startup classes in 6.0 without using the console
    | application?
    | >
    | > thanks
    |
    |

  • How to access ejb jar in ear package from other war web package?

    How to access ejb in jar packed in ear package from other war web package?

    Typically you would just look the EJB Home up in JNDI. If you're
    looking for example code, the medrec example in WLS 8.1 or petstore has
    plenty of webapps calling EJBs.
    -- Rob
    CottonXu wrote:
    How to access ejb in jar packed in ear package from other war web package?

  • Class not found exception for the startup class defined.

    iam using weblogic server 10 and bea jrockit 1.5.0.12.
    i have created a startup class in the admin console for a web project and i have deployed the war file using the console in a user defined domains, user project directory.
    when i start the server, iam getting class not found exception for the startup class.
    But, the startup class is available in the web archive (war). how should we add the classes and jars in the war to the classpath in setDomainEnv.sh or is there any other setting available in the console to enable this.

    Hello Julius,
    yes sure, we can move this post to the NW admin forum. I have already posted similar thread on sun forums. I was hoping that someone from SAP SDN already tackled this problem and if not someone specialized in J2EE Engine could troubleshoot me from the class problem I'm getting. I don't know if it's specific from the agent or if this ClassNotFound is a general SAP J2EE Engine error relating to a library not correclty defined.
    Kind regards,
    Tanguy Mezzano

  • How to define ABC class field in the Customer Master Sales tab

    HI All,
    can any one let me know how to define the new  ABC class in the Customer Master Sales tab like below.
    u2013 A (> 6,000,000 )
    u2013 B (> 1,000,000u20136,000,000 )
    u2013 C (> 100,000u20132,000,000 )
    u2013 D (< 100,000 )
    can any one let me know how to define and path in IMG.
    Thanks in advance.
    kumar reddy.

    In my opinion, you don't have any such std table/view to update ABC Classification field. You might need to update relevant infostructure based on your requirement, such as sales, invoiced, etc..
    Try with following, based on your requirement:
    MC(A
    SIS: Customer,Inc.Orders - Selection
    MC+A
    SIS: Customer Returns, Selection
    MC+E
    SIS: Customer, Sales - Selection
    MC+I
    SIS: Customer Credit Memos - Selec.
    Regards
    JP

  • How to define a Value for an Attribute of an Class

    Hi,
    How to define a Value for an Attribute of a Class ...
    ( I need to change the value of an Attribute of a class in standard program ....
    Ex...
       cl_hrce_masterswitches=>infotype_framework_is_active
    Here infotype_framework_is_active is the attribute .. its value in standard program is 'X'... Now i need to change it as '  '.
    How to define it and set value as ' '.

    Hello Surendar
    The static attribute INFOTYPE_FRAMEWORK_IS_ACTIVE is read-only and there is not SETTER method to manipulate its value.
    However, the attribute is filled in the CLASS_CONSTRUCTOR:
    METHOD class_constructor.
        IF ce_is_active                 = true OR
           global_payroll_is_active     = true OR
           mngmt_global_empls_is_active = true.
          infotype_framework_is_active = true.
          perid_infotype_is_active     = true.
        ELSE.
          infotype_framework_is_active = false.
          perid_infotype_is_active     = false.
        ENDIF.
    ENDMETHOD.
    Thus, you need to analyze how attribute CE_IS_ACTIVE, GLOBAL_PAYROLL_IS_ACTIVE and MNGMT_GLOBAL_EMPLS_IS_ACTIVE are filled in the CLASS_CONSTRUCTOR.
    For sure you will find customizing settings that are responsible for this.
    Regards
      Uwe

  • Very Urgent: how to define field symbols in class using se24 Points assured

    hi all
    I am new to abap oo programming. I am using se24 to build a class
    where some methods have code which involves working with field sybmols but i am not able to figure out way for how to define field symbols in the attributes section.
    I tried defining like : fld_sym type ref to  dbtab-fld
    but in the method implementation if i try to use it like assign fld to <fld_sym> there it says fld_sym is not defined as a field symbol.
    So can anyone please guide me how to define field symbols in se24.
    Also what should be the general steps while creating a class using se24.
    Points assured
    thanks

    Hi
    Global classes are like Global fun modules in which the Methods and code is already written and is mainly used for Reusability purpose.
    Goto SE24 tcode and see the std global classes like
    CL_ABAP_CHAR_UTILITIES
    see the links
    chk out the links below:
    General Tutorial for OOPS
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e8a1d690-0201-0010-b7ad-d9719a415907
    Have a look at these links for OO ABAP.
    http://www.sapgenie.com/abap/OO/
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm
    http://www.esnips.com/doc/375fff1b-5a62-444d-8ec1-55508c308b17/prefinalppt.ppt
    http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    http://www.esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
    http://www.allsaplinks.com/
    http://www.sapgenie.com/abap/controls/index.htm
    http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    http://www.esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
    http://help.sap.com/saphelp_erp2005/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    SDN Series:
    https://www.sdn.sap.com/irj/sdn/developerareas/abap?rid=/webcontent/uuid/35eaef9c-0b01-0010-dd8b-e3b0f9ed7ccb [original link is broken]
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCABA/BCABA.pdf
    Basic concepts of OOPS
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b6cae890-0201-0010-ef8b-f970a9c41d47
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/1591ec90-0201-0010-3ba8-cdcd500b17cf
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/alv%20grid/abap%20code%20sample%20to%20display%20data%20in%20alv%20grid%20using%20object%20oriented%20programming.doc
    http://www.henrikfrank.dk/abapuk.html
    http://www.erpgenie.com/abap/OO/
    Reward oints if useful,
    Aleem.

  • How to call methods defined in another class ? is it possible?

    Hi all,
    I am new to using JNI, was wondering if this is possible and how I might be able to do this. I'm trying to call some set/get functions defined in a class that is not part of the class where I have my native code defined and called...
    Let me explain a bit, I have a class JobElement (singular Job) that stores all the data associated with a Job, such as job name, job id, etc.
    Another class JobsElement (plural Jobs) contains all the Jobs that are currently running.
    The code is set up something like this...
    class JobElement {
         String jobID;
         String jobName;
         public void setJobId(String newJobID) { jobID = newJobID; }
         public void setJobName(String newJobName) { jobName = newJobName; }
    class JobsElement {
         Date timeDateStamp;
         JobElement job;
    class AppRoot {
         JobsElement allJobs = null;
         JobElement _currentJob = null;
         public native getAllJobs();
    }In my native method, getAllJobs(), I essentially want to call the set functions that are defined for JobElement when filling in the information of the Job. (then finally add the JobElement to the JobsElement list)
    In summary, I basically want to know if it's possible to call the equivilent of this java code from the native code??
         _currentJob.setJobName(newJob)
    In the native code I tried to find the setJobID method but got a NoSuchMethodError. (which is what I expected)
    Thanks in advance.

    Hi,
    In your getAllJobs(), the JNI Equiv would be JNIEnv_ClassName_getAllJobs(JNIEnv** anEnv, jobject jAppRootobj)
    Since you are calling the AppRoot object's method, the jobj in the native method call will be jAppRootobj-AppRoot's instance.
    What you can do is
    Get the field id of _currentJob.
    Get the <jobject-value of currentJob> of JobElement i.e. currentJob.
    Then get the method ids of setJobID and setJobName.
    Call these non-static methods on <jobject-value of _currentJob> to set the values.
    I hope I made a try to help you. Please correct me if I am wrong.

  • How to implement Startup class for OC4J

    I'm in the process of converting my current J2EE application from weblogic 5.1 to OC4J.
    I have startup class that would set application specific properties by reading property file. In addition, this class would also check for certain resource availability (like database) during weblogic startup. I could not find similar option in OC4J.
    Any help to convert this startup class for OC4J would be highly appreciated.
    Thanks
    Sankaran.

    Hi Sankaran,
    Your eMail address suggests you work for Oracle. Do you? Can't someone
    at Oracle help you?
    I imagine that Oracle would have some kind of agreement with Ironflare
    as well. Can't someone at Ironflare help you?
    But remember, with application servers (as with RDBMSs), no two are the
    same. Each one offers the same functionality, but using different methods
    to achieve that functionality. I don't know how to do it, but I'm sure
    you can check database availability when starting up OC4J -- just not
    the same way you do it in Weblogic.
    Good Luck,
    Avi.

Maybe you are looking for

  • Can Numbers put the dates (in a column) in order if I enter out of order

    I am a procrastinator and I have lots of receipts to enter.  If I enter with the dates out of order is there a way numbers can put in order for me. Thank you

  • Mac video transfer problems..

    I've scrolled the forums but most people that are having my problem appear to be Windows users and also having little success by the looks of it. Therefore I wondered if maybe my problem was answered a little easier by Mac users. I have endless music

  • Create Web Service within the Portal

    Hi, all. I want to use SAP Portal for generating Portal web services on a base of some external procedures. But to use NWDS in such way as to implement this procedure in EJB and create a web service for it seems not the best solution for me. Are ther

  • Programminig111

    hi experts, how can we give functionality to parameter using at selection-screen on value-request. what is the diff bte.. on value request and on help request. explaine briefly. thanks in advance.

  • Bridge-Groups FWSM

    Hello All, I have a question about Bridge Groups if someone can help me. So, I have two bridge groups on one FWSM obviously using two different IP Scopes. However I can only have one default route so for instance. BVI 1 - 192.168.1.4 (outside1) BVI 2