Singleton implementation for Subject
Can the singleton pattern be applied for
javax.security.auth.Subject ?
I am using the below code
Subject authSubject = null;
authSubject = Security.login(UserName, password);
My question is if it is okay to create the Subject as a singleton and use the same object in subsequent calls? The call Security.login will try to do a login operation. I want to not perform this operation over and over again. Is it advisable to create this object as a Singleton?
Hi,
I'm not sure about this. But, the BADI/ES "CRM_MKTPL" does not have the "Multiple Use" set. It depends on filter values and only one implementation per filter value is used.
Regards,
Arun Prakash
Similar Messages
-
Migratable targets for singleton implementations
Hi,
I require some help regarding the use of migratable targets with singleton implementations
We have a WebLogic 11g environment comprising several managed servers in a cluster. Migratable Targets are also been defined for JMS and JTA services.
The deployment includes two EARs which may only be deployed to a single server at any one time. The first EAR contains JARs, a WAR and a RAR. The second contains JARs and EJBs. We wish to implement a fail-over solution for these "singleton" EARs on the cluster so that everything would get migrated to another server in the cluster if the initial pinned server fails.
We had hoped to use the same mechanism as for JMS and JTA services whereby the EARs would simply assigned to a migratable target (with a defined user preferred server and constraint candidate servers). However from reading the documentation and trying out some deployments this scenario does not seem to be supported by WebLogic. For example, a migratable target may not be given as a target during EAR deployment.
The only option for the singleton services seems to be inheriting from the SingletonService and deploying this to preferred- and candiates servers but this would mean changing quite a few services and we are not sure how to manage the "singleton" RAR.
Does Weblogic 11g offer a way to deploy a complete EAR to a deployable target? If not, could you please suggest an alternative way of implementing a fail-over solution for our EARs.
Thanks in advance for your help.
Regards. Ian.I tried deleting and creating them anew but it then messes up the configuration of the migratable targets. What seems to work now is to delete them, create new ones with DIFFERENT names and then updateDomain(). In this case the old ones get really deleted. Really messy stuff.
-
Arc is not implemented for SQL Server 2005 physical model
I added the Arc in my relational model, which is supposed to provide that references are mutually exclusive (so only one refering column can be not null). However there is not any implementation for this in the SQL Server 2005 physical model. The SQL code generated simply ignores the Arc and allows any values for the columns covered by Arc. If we check Oracle physical model. then it generates some trigger, which controls how many columns have values assigned - this is actually an implementation of Arc. But there is nothing of this kind for SQL Server model...
By the way, implementing this Arc by trigger looks like to heavy approach. The very simple table level check constraint will do the same job. But this is a different subject though.
Edited by: Otbl on Nov 3, 2011 7:34 PMHi Dmitry,
it's fixed in Data Modeler 3.1 EA2.
Philip -
Question: Justification of singleton implementation
Hi there,
I have a question here about using singleton design for process that serves lots of threads in a web application behind a servlet justifies? What sort of impact to the server will be even the implementation of singleton is not targeted on synchronization of I/O within the server?
Thanksjwenting wrote:
georgemc wrote:
original wrote:
yawmark wrote:
but servlets are all singletons. No, they aren't. Having only one instance of a class -- as is often the case with servlets -- is not the same thing as a Singleton.
is there a reason for this?No, because it isn't true. Stop trolling, daFei.
~i take it that you have no answers.Other than the ones he's given, of course. Silly boy
Steve, best add "a singleton is a class for which you've only created one instance" to the listAnd do remember to pass it around by reference!Heh heh -
Dear All
I am getting the below error while activating the sap Fiori applications
Task Facade not implemented for provider. [/IWBEP/CX_MGW_TECH_EXCEPTION] (error).
I have applied all suggestions in my new fiori system from Masayuki Sekihara posted on his post.
but still I am getting same error message.
I got below error message.
1) If I selected a EC6FIORI system alias to ZTASKPROCESSING services then i got below error message.
Task Facade not implemented for provider.
Task Facade not implemented for provider. [/IWBEP/CX_MGW_TECH_EXCEPTION] (error).
2) some time I got different error message if I selected FIORI system alias to ZTASKPROCESSING.
I have shared below my system Support Package level and all configurations.
Component
Release
SP-Level
Support Package
Short description of comment
SAP_BASIS
740
4
SAPKB74004
SAP Basis Component
SAP_ABA
740
4
SAPKA74004
Cross-Application Component
SAP_GWFND
740
6
SAPK-74006INSAPGWFND
SAP Gateway Foundation
SAP_UI
740
7
SAPK-74007INSAPUI
User Interface Technology
PI_BASIS
740
4
SAPK-74004INPIBASIS
Basis Plug-In
ST-PI
2008_1_700
8
SAPKITLRD8
SAP Solution Tools Plug-In
SAP_BW
740
4
SAPKW74004
SAP Business Warehouse
IW_PGW
100
5
SAPK-10005INIWPGW
Process Gateway
MDG_FND
747
2
SAPK-74702INMDGFND
MDG Foundation
SAP_AP
700
30
SAPKNA7030
SAP Application Platform
SAP_BS_FND
747
2
SAPK-74702INSAPBSFND
SAP Business Suite Foundation
WEBCUIF
747
2
SAPK-74702INWEBCUIF
SAP Web UI Framework
MDG_APPL
617
2
SAPK-61702INMDGAPPL
MDG Applications
SAP_APPL
617
2
SAPKH61702
Logistics and Accounting
SAP_FIN
617
2
SAPK-61702INSAPFIN
SAP_FIN
SAP_HR
604
66
SAPKE60466
Human Resources
SAP_HRCAR
604
66
SAPK-60466INSAPHRCAR
Sub component SAP_HRCAR of SAP_HR
SAP_HRCAT
604
66
SAPK-60466INSAPHRCAT
Sub component SAP_HRCAT of SAP_HR
SAP_HRCAU
604
66
SAPK-60466INSAPHRCAU
Sub component SAP_HRCAU of SAP_HR
SAP_HRCBE
604
66
SAPK-60466INSAPHRCBE
Sub component SAP_HRCBE of SAP_HR
SAP_HRCBR
604
66
SAPK-60466INSAPHRCBR
Sub component SAP_HRCBR of SAP_HR
SAP_HRCCA
604
66
SAPK-60466INSAPHRCCA
Sub component SAP_HRCCA of SAP_HR
SAP_HRCCH
604
66
SAPK-60466INSAPHRCCH
Sub component SAP_HRCCH of SAP_HR
SAP_HRCCL
604
66
SAPK-60466INSAPHRCCL
Sub component SAP_HRCCL of SAP_HR
SAP_HRCCN
604
66
SAPK-60466INSAPHRCCN
Sub component SAP_HRCCN of SAP_HR
SAP_HRCDE
604
66
SAPK-60466INSAPHRCDE
Sub component SAP_HRCDE of SAP_HR
SAP_HRCDK
604
66
SAPK-60466INSAPHRCDK
Sub component SAP_HRCDK of SAP_HR
SAP_HRCES
604
66
SAPK-60466INSAPHRCES
Sub component SAP_HRCES of SAP_HR
SAP_HRCFI
604
66
SAPK-60466INSAPHRCFI
Sub component SAP_HRCFI of SAP_HR
SAP_HRCFR
604
66
SAPK-60466INSAPHRCFR
Sub component SAP_HRCFR of SAP_HR
SAP_HRCGB
604
66
SAPK-60466INSAPHRCGB
Sub component SAP_HRCGB of SAP_HR
SAP_HRCHK
604
66
SAPK-60466INSAPHRCHK
Sub component SAP_HRCHK of SAP_HR
SAP_HRCID
604
66
SAPK-60466INSAPHRCID
Sub component SAP_HRCID of SAP_HR
SAP_HRCIE
604
66
SAPK-60466INSAPHRCIE
Sub component SAP_HRCIE of SAP_HR
SAP_HRCIN
604
66
SAPK-60466INSAPHRCIN
Sub component SAP_HRCIN of SAP_HR
SAP_HRCIT
604
66
SAPK-60466INSAPHRCIT
Sub component SAP_HRCIT of SAP_HR
SAP_HRCJP
604
66
SAPK-60466INSAPHRCJP
Sub component SAP_HRCJP of SAP_HR
SAP_HRCKR
604
66
SAPK-60466INSAPHRCKR
Sub component SAP_HRCKR of SAP_HR
SAP_HRCKW
604
66
SAPK-60466INSAPHRCKW
Sub component SAP_HRCKW of SAP_HR
SAP_HRCMX
604
66
SAPK-60466INSAPHRCMX
Sub component SAP_HRCMX of SAP_HR
SAP_HRCMY
604
66
SAPK-60466INSAPHRCMY
Sub component SAP_HRCMY of SAP_HR
SAP_HRCNL
604
66
SAPK-60466INSAPHRCNL
Sub component SAP_HRCNL of SAP_HR
SAP_HRCNO
604
66
SAPK-60466INSAPHRCNO
Sub component SAP_HRCNO of SAP_HR
SAP_HRCNZ
604
66
SAPK-60466INSAPHRCNZ
Sub component SAP_HRCNZ of SAP_HR
SAP_HRCPH
604
66
SAPK-60466INSAPHRCPH
Sub component SAP_HRCPH of SAP_HR
SAP_HRCPT
604
66
SAPK-60466INSAPHRCPT
Sub component SAP_HRCPT of SAP_HR
SAP_HRCQA
604
66
SAPK-60466INSAPHRCQA
Sub component SAP_HRCQA of SAP_HR
SAP_HRCRU
604
66
SAPK-60466INSAPHRCRU
Sub component SAP_HRCRU of SAP_HR
SAP_HRCSE
604
66
SAPK-60466INSAPHRCSE
Sub component SAP_HRCSE of SAP_HR
SAP_HRCSG
604
66
SAPK-60466INSAPHRCSG
Sub component SAP_HRCSG of SAP_HR
SAP_HRCTH
604
66
SAPK-60466INSAPHRCTH
Sub component SAP_HRCTH of SAP_HR
SAP_HRCTW
604
66
SAPK-60466INSAPHRCTW
Sub component SAP_HRCTW of SAP_HR
SAP_HRCUN
604
66
SAPK-60466INSAPHRCUN
Sub component SAP_HRCUN of SAP_HR
SAP_HRCUS
604
66
SAPK-60466INSAPHRCUS
Sub component SAP_HRCUS of SAP_HR
SAP_HRCVE
604
66
SAPK-60466INSAPHRCVE
Sub component SAP_HRCVE of SAP_HR
SAP_HRCZA
604
66
SAPK-60466INSAPHRCZA
Sub component SAP_HRCZA of SAP_HR
SAP_HRGXX
604
66
SAPK-60466INSAPHRGXX
Sub component SAP_HRGXX of SAP_HR
SAP_HRRXX
604
66
SAPK-60466INSAPHRRXX
Sub component SAP_HRRXX of SAP_HR
EA-IPPE
400
24
SAPKGPID24
SAP iPPE
EA-APPL
617
2
SAPK-61702INEAAPPL
SAP Enterprise Extension PLM, SCM, Financials
EA-DFPS
600
24
SAPKGPDD24
SAP Enterprise Extension Defense Forces & Public Security
EA-FIN
617
2
SAPK-61702INEAFIN
EA-FIN
EA-FINSERV
600
25
SAPKGPFD25
SAP Enterprise Extension Financial Services
EA-GLTRADE
600
24
SAPKGPGD24
SAP Enterprise Extension Global Trade
EA-HR
607
17
SAPK-60717INEAHR
SAP Enterprise Extension HR
EA-HRCAR
607
17
SAPK-60717INEAHRCAR
Sub component EA-HRCAR of EA-HR
EA-HRCAT
607
17
SAPK-60717INEAHRCAT
Sub component EA-HRCAT of EA-HR
EA-HRCAU
607
17
SAPK-60717INEAHRCAU
Sub component EA-HRCAU of EA-HR
EA-HRCBE
607
17
SAPK-60717INEAHRCBE
Sub component EA-HRCBE of EA-HR
EA-HRCBR
607
17
SAPK-60717INEAHRCBR
Sub component EA-HRCBR of EA-HR
EA-HRCCA
607
17
SAPK-60717INEAHRCCA
Sub component EA-HRCCA of EA-HR
EA-HRCCH
607
17
SAPK-60717INEAHRCCH
Sub component EA-HRCCH of EA-HR
EA-HRCCL
607
17
SAPK-60717INEAHRCCL
Sub component EA-HRCCL of EA-HR
EA-HRCCN
607
17
SAPK-60717INEAHRCCN
Sub component EA-HRCCN of EA-HR
EA-HRCDE
607
17
SAPK-60717INEAHRCDE
Sub component EA-HRCDE of EA-HR
EA-HRCDK
607
17
SAPK-60717INEAHRCDK
Sub component EA-HRCDK of EA-HR
EA-HRCES
607
17
SAPK-60717INEAHRCES
Sub component EA-HRCES of EA-HR
EA-HRCFI
607
17
SAPK-60717INEAHRCFI
Sub component EA-HRCFI of EA-HR
EA-HRCFR
607
17
SAPK-60717INEAHRCFR
Sub component EA-HRCFR of EA-HR
EA-HRCGB
607
17
SAPK-60717INEAHRCGB
Sub component EA-HRCGB of EA-HR
EA-HRCHK
607
17
SAPK-60717INEAHRCHK
Sub component EA-HRCHK of EA-HR
EA-HRCID
607
17
SAPK-60717INEAHRCID
Sub component EA-HRCID of EA-HR
EA-HRCIE
607
17
SAPK-60717INEAHRCIE
Sub component EA-HRCIE of EA-HR
EA-HRCIN
607
17
SAPK-60717INEAHRCIN
Sub component EA-HRCIN of EA-HR
EA-HRCIT
607
17
SAPK-60717INEAHRCIT
Sub component EA-HRCIT of EA-HR
EA-HRCJP
607
17
SAPK-60717INEAHRCJP
Sub component EA-HRCJP of EA-HR
EA-HRCKR
607
17
SAPK-60717INEAHRCKR
Sub component EA-HRCKR of EA-HR
EA-HRCKW
607
17
SAPK-60717INEAHRCKW
Sub component EA-HRCKW of EA-HR
EA-HRCMX
607
17
SAPK-60717INEAHRCMX
Sub component EA-HRCMX of EA-HR
EA-HRCMY
607
17
SAPK-60717INEAHRCMY
Sub component EA-HRCMY of EA-HR
EA-HRCNL
607
17
SAPK-60717INEAHRCNL
Sub component EA-HRCNL of EA-HR
EA-HRCNO
607
17
SAPK-60717INEAHRCNO
Sub component EA-HRCNO of EA-HR
EA-HRCNZ
607
17
SAPK-60717INEAHRCNZ
Sub component EA-HRCNZ of EA-HR
EA-HRCPH
607
17
SAPK-60717INEAHRCPH
Sub component EA-HRCPH of EA-HR
EA-HRCPT
607
17
SAPK-60717INEAHRCPT
Sub component EA-HRCPT of EA-HR
EA-HRCQA
607
17
SAPK-60717INEAHRCQA
Sub component EA-HRCQA of EA-HR
EA-HRCRU
607
17
SAPK-60717INEAHRCRU
Sub component EA-HRCRU of EA-HR
EA-HRCSE
607
17
SAPK-60717INEAHRCSE
Sub component EA-HRCSE of EA-HR
EA-HRCSG
607
17
SAPK-60717INEAHRCSG
Sub component EA-HRCSG of EA-HR
EA-HRCTH
607
17
SAPK-60717INEAHRCTH
Sub component EA-HRCTH of EA-HR
EA-HRCTW
607
17
SAPK-60717INEAHRCTW
Sub component EA-HRCTW of EA-HR
EA-HRCUN
607
17
SAPK-60717INEAHRCUN
Sub component EA-HRCUN of EA-HR
EA-HRCUS
607
17
SAPK-60717INEAHRCUS
Sub component EA-HRCUS of EA-HR
EA-HRCVE
607
17
SAPK-60717INEAHRCVE
Sub component EA-HRCVE of EA-HR
EA-HRCZA
607
17
SAPK-60717INEAHRCZA
Sub component EA-HRCZA of EA-HR
EA-HRGXX
607
17
SAPK-60717INEAHRGXX
Sub component EA-HRGXX of EA-HR
EA-HRRXX
607
17
SAPK-60717INEAHRRXX
Sub component EA-HRRXX of EA-HR
EA-PS
600
24
SAPKGPPD24
SAP Enterprise Extension Public Services
EA-RETAIL
600
24
SAPKGPRD24
SAP Enterprise Extension Retail
FINBASIS
600
24
SAPK-60024INFINBASIS
Fin. Basis
ECC-DIMP
600
23
SAPK-60023INECCDIMP
DIMP
ERECRUIT
600
24
SAPK-60024INERECRUIT
E-Recruiting
FI-CA
600
23
SAPK-60023INFICA
FI-CA
FI-CAX
600
23
SAPK-60023INFICAX
FI-CA Extended
HR-CEE
110_604
52
SAPK-60452INHRCEE
HR country version for CEE countries
HR-CEECBG
110_604
52
SAPK-60452INHRCEECBG
Sub component HR-CEECBG of HR-CEE
HR-CEECCO
110_604
52
SAPK-60452INHRCEECCO
Sub component HR-CEECCO of HR-CEE
HR-CEECCZ
110_604
52
SAPK-60452INHRCEECCZ
Sub component HR-CEECCZ of HR-CEE
HR-CEECGR
110_604
52
SAPK-60452INHRCEECGR
Sub component HR-CEECGR of HR-CEE
HR-CEECHR
110_604
52
SAPK-60452INHRCEECHR
Sub component HR-CEECHR of HR-CEE
HR-CEECHU
110_604
52
SAPK-60452INHRCEECHU
Sub component HR-CEECHU of HR-CEE
HR-CEECPL
110_604
52
SAPK-60452INHRCEECPL
Sub component HR-CEECPL of HR-CEE
HR-CEECRO
110_604
52
SAPK-60452INHRCEECRO
Sub component HR-CEECRO of HR-CEE
HR-CEECSI
110_604
52
SAPK-60452INHRCEECSI
Sub component HR-CEECSI of HR-CEE
HR-CEECSK
110_604
52
SAPK-60452INHRCEECSK
Sub component HR-CEECSK of HR-CEE
HR-CEECTR
110_604
52
SAPK-60452INHRCEECTR
Sub component HR-CEECTR of HR-CEE
HR-CEECUA
110_604
52
SAPK-60452INHRCEECUA
Sub component HR-CEECUA of HR-CEE
HR-CEEGXX
110_604
0
Sub component HR-CEEGXX of HR-CEE
HR-CEERXX
110_604
0
Sub component HR-CEERXX of HR-CEE
INSURANCE
600
23
SAPK-60023ININSURANC
SAP Insurance
IS-CWM
600
23
SAPK-60023INISCWM
Industry Solution Catch Weight Management
IS-H
600
34
SAPK-60034INISH
SAP Healthcare
IS-M
600
23
SAPK-60023INISM
SAP MEDIA
IS-OIL
600
23
SAPK-60023INISOIL
IS-OIL
IS-PS-CA
600
23
SAPK-60023INISPSCA
IS-PUBLIC SECTOR CONTRACT ACCOUNTING
IS-UT
600
23
SAPK-60023INISUT
SAP Utilities/Telecommunication
LSOFE
600
24
SAPK-60024INLSOFE
SAP Learning Solution Front-End
SEM-BW
600
24
SAPKGS6024
SEM-BW: Strategic Enterprise Management
GBAPP002
600
4
SAPK-60004INGBAPP002
GBAPP002
GBHCM002
600
11
SAPK-60011INGBHCM002
HCM Employee Requests (Leave)
GBHCM003
600
9
SAPK-60009INGBHCM003
HCM Manager Approvals (Time, Training, L
SRA002
600
3
SAPK-60003INSRA002
Time Recording OData Integration Compone
SRA010
600
3
SAPK-60003INSRA010
Staffing List OData Integration Componen
SRA017
600
3
SAPK-60003INSRA017
Create Purchase Order OData Integration
SRA018
600
3
SAPK-60003INSRA018
Purchase Order Status Tracking OData Int
UIAPP001
100
4
SAPK-10004INUIAPP001
UIAPP001 100: Add-On Installation
UIAPP002
100
3
SAPK-10003INUIAPP002
UIAPP002 100: Add-On Installation
UIGIB001
100
4
SAPK-10004INUIGIB001
UIGIB001 100: Add-On Installation
UIHCM002
100
4
SAPK-10004INUIHCM002
UIHCM002 100: Add-On Installation
UIHCM003
100
4
SAPK-10004INUIHCM003
UIHCM003 100: Add-On Installation
UISRA002
100
3
SAPK-10003INUISRA002
HTML5 Time Recording
UISRA010
100
3
SAPK-10003INUISRA010
HTML5 Staffing List
UISRA017
100
3
SAPK-10003INUISRA017
HTML5 Create Order
UISRA018
100
3
SAPK-10003INUISRA018
HTML5 Order Status Tracking
please help me to resolve that issue
Regards
Pankaj KambleHi Team,
i have created new post.
SAP Fiori getting error message Check the URL parameters and the scenario definition. To check the scenario definition.
Scenario definition configuration screen short.
2) Also getting bellow error message
Property TaskDefinitionID not found in type WorkflowTask
Did not find error details
{"error":{"code":"005056A509B11EE1B9A8FEA8DE87F78E","message":{"lang":"en","value":"Property TaskDefinitionID not found in type WorkflowTask"},"innererror":{"transactionid":"E6A9CEE388D3F1EC940400155DC8D41B","timestamp":"20140428075136.7780000","Error_Resolution":{"SAP_Transaction":"Run transaction /IWFND/ERROR_LOG on SAP NW Gateway hub system and search for entries with the timestamp above for more details","SAP_Note":"See SAP Note 1797736 for error analysis (https://service.sap.com/sap/support/notes/1797736)"}}}}
Regards
Pankaj Kamble -
Problem in creating new implementation for filter dependent badi
Hi Experts,
I want to use badi NOTIF_EVENT_POST.It is a filter dependent badi. It is asking filter type while implementing thro se19. Could anyone pls tel me how to create new implementation for the filter dependent badi. Existing filter type is QMART. is there any problem if i change the filter type?
Thanks in Advance!Hi ,
NOTIF_EVENT_POST is filter dependent and filter values are based on QMART value in table TQ80. You need to specify the filter value ie : QMART value before implimentation , before that check all active implimentations for the same , if u have to impliment on same filter value , you need to deactivate the one which is implimented on same filter value .
You are not supposed to change the filter type.
Regards,
Vamsi
Edited by: CH. VAMSHI on Sep 29, 2009 11:58 AM -
Configuring Kodo default implementation for field of Collection type
If I am not mistaken default implementation for field of Collection type in
Kodo is
LinkedList based proxy. It would be great if it were possible to configure
Kodo to use a proxy of my choosing
I did some tests and it seems to me that ArrayList is much more efficient
than Linked list (see below)
Is there any specific reason I am not aware of that makes LinkedList better
than array list
In my applications all collections a relatively small (or at least most of
my collections are definitely small)
and since I use Collection interface there is no inserts into middle of my
collections - only appends (which ArrayList handles very well)
So my question is can I make Kodo to use ArrayListProxy for fields of
Collection type
(except of course using ArrayList field instead of Collection which I do not
want to do)
below is some statistics on collection performance (populating and iterating
collections)
the same test against 3 collections implementations (JDK 1.4.1)
Not only ArrayList by far the fastest and memory friendly it also garbage
collected much sooner and better -
I show here max memory consumption and last to would not be garbage
collected till all memory is in use (old generation GC)
and ArrayList seems to be collected by young gen GC because it was collected
very quickly between test cycles why other only when all memory was used
So please make ArrayList your default collection implementation :-)
Small collection size (40)
time(ms) memory(kb)
ArrayList 5,218 62,154
LinkedList 14,125 240,066
HashSet 27,000 311,825
the same but using using random inserts - append(index, object) rather than
append(object):
ArrayList 8937, 53591
LinkedList 15047, 240066
Larger collection size (200)
ArrayList 4860, 47709
LinkedList 18468, 290704
HashSet 34391, 422282
the same but using using random inserts - append(index, object) rather than
append(object):
ArrayList 11844, 47709
LinkedList 25766, 290704You should be able to accomplish this fairly easily by extending
SimpleProxyManager:
http://solarmetric.com/Software/Documentation/2.4.3/docs/javadoc/com/solarmetric/kodo/util/SimpleProxyManager.html
and overriding the appropriate methods (getCollectionCopy and
getCollectionProxy).
On Mon, 12 May 2003 12:26:21 -0400, Alex Roytman wrote:
If I am not mistaken default implementation for field of Collection type in
Kodo is
LinkedList based proxy. It would be great if it were possible to configure
Kodo to use a proxy of my choosing
I did some tests and it seems to me that ArrayList is much more efficient
than Linked list (see below)
Is there any specific reason I am not aware of that makes LinkedList better
than array list
In my applications all collections a relatively small (or at least most of
my collections are definitely small)
and since I use Collection interface there is no inserts into middle of my
collections - only appends (which ArrayList handles very well)
So my question is can I make Kodo to use ArrayListProxy for fields of
Collection type
(except of course using ArrayList field instead of Collection which I do not
want to do)
below is some statistics on collection performance (populating and iterating
collections)
the same test against 3 collections implementations (JDK 1.4.1)
Not only ArrayList by far the fastest and memory friendly it also garbage
collected much sooner and better -
I show here max memory consumption and last to would not be garbage
collected till all memory is in use (old generation GC)
and ArrayList seems to be collected by young gen GC because it was collected
very quickly between test cycles why other only when all memory was used
So please make ArrayList your default collection implementation :-)
Small collection size (40)
time(ms) memory(kb)
ArrayList 5,218 62,154
LinkedList 14,125 240,066
HashSet 27,000 311,825
the same but using using random inserts - append(index, object) rather than
append(object):
ArrayList 8937, 53591
LinkedList 15047, 240066
Larger collection size (200)
ArrayList 4860, 47709
LinkedList 18468, 290704
HashSet 34391, 422282
the same but using using random inserts - append(index, object) rather than
append(object):
ArrayList 11844, 47709
LinkedList 25766, 290704 -
Exception "not implemented for class oracle.jdbc.driver.T4CNumberAccessor"
Hello I'm having some troubles dealing with 'java.sql.Date' I'm working with express edition database and I have three classes(different packages)
1.Mapper
2.Objects Class
3.ConsoleTest
I need to get an arraylist of objects, some of which contain dates, but when try to do it I get this exception
"java.sql.SQLException: Invalid column type: getDate not implemented for class oracle.jdbc.driver.T4CNumberAccessor"
Do you have any idea how I can implement the getDate method for this T4CNumberAccessor
Here are the methods that I'm using
1.Mapper
public ArrayList<Object> getAllTaskAuctions(Connection con)
ArrayList<Object> l1 = new ArrayList<Object>();
String SQLString1 = "select * from taskauction natural join tasks";
PreparedStatement statement=null;
try
//=== get taskauctions natural join tasks
statement = con.prepareStatement(SQLString1);
ResultSet rs = statement.executeQuery();
while(rs.next())
l1.add(new TaskAuction(rs.getInt(1), rs.getInt(2), rs.getInt(3),
rs.getDate(4), rs.getDate(5), rs.getInt(6)));
l1.add(new Task(rs.getInt(1), rs.getInt(2), rs.getString(3),
rs.getString(4), rs.getString(5), rs.getString(6), rs.getInt(7)));
catch (Exception exc)
System.out.println("Fail in TaskAuctionMapper - getAllTaskAuctions");
System.out.println(exc);
return l1;
2.ConsoleTest class
Connection con;
public Connection getConnection(){
try{
Class.forName("oracle.jdbc.driver.OracleDriver");
con = DriverManager.getConnection(
"jdbc:oracle:thin:@localhost:1521:XE", "Project", "123" );
//username/password@[/]host[:port][service_name]
catch (Exception e)
{ System.out.println("fail in getConnection()");
System.out.println(e); }
return con;
public static void main(String[] args) {
ConsoleTest ct = new ConsoleTest();
TaskAuctionMapper tam1 = new TaskAuctionMapper();
ArrayList<Object> alt1 = tam1.getAllTaskAuctions(ct.getConnection());
Iterator<Object> itr1 = alt1.iterator();
while (itr1.hasNext())
TaskAuction taskauct = (TaskAuction) itr1.next();
//Problem, exception traced to TaskAuctionMapper
System.out.println(
"Task ID: " + taskauct.getTaskid()+ ", "+
"StartDate: "+ taskauct.getStartdate()+", "+
"User ID: " + taskauct.getUserid());
}Found the answer, I shouldn't use integers as parameters of column index in the result set, but instead use String to mark the fields :)
-
Unable to create the implementation for BBP_PD_DOWNLOAD badi
Hi ,
Iam trying to create a new implementation for this BADI BBP_PD_DOWNLOAD as zbbp_pd_download but when iam trying to activate it .iam getting a message that already active implementation is there and i cannot create a new implementation unless i deactivate the other one.since it is a standard one i cannot deactivate it .
Has any one used this earlier . any inputs on this wil be of great help .
Thanks in advanceHi
<u>You can create any number of Customer Implementations, provided only one is active at a time.</u>
<b><u>Here are the steps -></u></b>
Either Using SE18 / SE19 Transaction, or
After you call the IMG activity, the system displays a dialog box where you enter a name for the implementation.
If implementations of this Business Add-In have already been created, the system displays them in a dialog box. You then choose one of them by choosing Create, and continue as follows:
1. In the dialog box, enter a name for the implementation of the Add-In and choose Create. (Say ZBADI)
The system displays the initial screen for creating Business Add-In implementations.
2. On this screen, enter a short description for you implementation in the Implementation Short Text field.
3. If you choose the Interface tab, you will notice that the system has filled in the Name of the Implementing Class field automatically, by assigning a class name based on the name of your implementation.
4. Save your entries and assign the Add-In to a package.
5. To edit a method, double-click its name.
6. Enter your implementation code between the method <Interface Name>~<Name of Method>. and endmethod. statements.
7. Save and activate your code. Navigate back to the Change Implementation screen.
Note: You can also create an implementation for an Add-In and not activate it until later. If you want to do this, do not carry out the following step:
8. Choose Activate.
When the application program is executed, the system carries out the code in the method you wrote.
Regards
- Atul -
Minimum implementation for SMTP-ESMTP clients
Hi,
if I want to develop a Mail client I can use SMTP/ESMTP. I read already some of the RFC-Specs, but I cannot find an advice for the minimum implementation for a client - just for servers.
Is the minimum number of commands the same as for the servers (7 commands for SMTP and 9 commands for ESMTP) ?
Thanks for any help.
BRSimple config...
rserver host EXCHANGE001
ip address 10.2.3.101
probe PING_EXCHANGE
inservice
rserver host EXCHANGE002
ip address 10.2.3.102
probe PING_EXCHANGE
rserver host EXCHANGE003
ip address 10.2.3.103
probe PING_EXCHANGE
rserver host EXCHANGE004
ip address 10.2.3.104
probe PING_EXCHANGE
serverfarm host EXCHANGE
description EXCHANGE SERVERS
predictor hash address
probe PR-EXCHANGE-HTTPS
rserver EXCHANGE001
inservice
rserver EXCHANGE002
rserver EXCHANGE003
rserver EXCHANGE004
class-map match-all EXCHANGE-VIP
10 match virtual-address 10.2.3.100 tcp any
sticky ip-netmask 255.255.255.255 address both EXCHANGE-STICKY
timeout 20
replicate sticky
serverfarm EXCHANGE
policy-map type loadbalance first-match EXCHANGE-VIP
class class-default
sticky-serverfarm EXCHANGE-STICKY
policy-map multi-match EXCHANGE_POL
class EXCHANGE-VIP
loadbalance vip inservice
loadbalance policy EXCHANGE-VIP
loadbalance vip icmp-reply
NB: Only rsever EXCHANGE001 is active in the serverfarm. -
Where is the getString() implementation for RS and Object class question
Dear all,
I had these two questions ringing since a long time.
1)ResultSet is an interface.
In my jdbc code I have generally written rs.getString() and rs.getInt etc.. without giving a second thought as to where exactly is this getter implemented !
I have RTF API .. without too much help.
Could some one kindly explain Where is the implementation of the getString method ?
2) Could you please tell why the Wait() Notify() and NotifyAll methods have been implemented in the Object class ? What was the need to define em in the Object class ?
Thanks in advance for your time spent on this.
RgdsSarvananda wrote:
In the MySQL driver for example it's implemented in com.mysql.jdbc.ResultSet Right. Now it makes sense to me. Every single db that gives me a driver will have their specific implementation for the interface methods of ResultSet.
>
why do you need that?
..Thats a design decision
One of my friends asked me this and I was caught unawares. Any ideas on what factors could have made this design decision ?
Rgds
>
In the MySQL driver for example it's implemented in com.mysql.jdbc.ResultSet Right. Now it makes sense to me. Every single db that gives me a driver will have their specific implementation for the interface methods of ResultSet.
>
why do you need that?
..Thats a design decision
One of my friends asked me this and I was caught unawares. Any ideas on what factors could have made this design decision ?
A desire to not have to couple your code to a particular database and JDBC driver. It's a classic example of the abstract factory pattern -
Creating Enhancement Implementation for the Enhancement spot in ECC 6.0
Hi All,
I have an urgent requirement of creating an Enhancement implementation for the existing Enhancement Spot in ECC 6.0 ..
I never worked on enhancement in ECC 6.0.
There is an existing enhancement spot called "ES_SAPLIQS0" in the package " IWOC". which has got three existing implementations
1. DI_ROT_SAPLIQS0
2. ISU_SAPLIQS0
3. DIMP_GENERAL_SAPLIQS0
I need to create another implementation for the same enhancement spot.. Please let me know the detailed procedure to create the enhancement implementation for the same spot..
Thanks-
Shrikant
useful answers will be rewarded.First of all find out the include program where you want to write the logic.. Click the spiral button to go to enhancement mode.. then click on Edit > Enhancement operations> Show implicit enhancement points.
This will hightlight all the enhancement points in your include program. Right click on exact enhancement point and select Enhancement Implementations --> Create,, It should give you the same Enhancement spot you are talking about. select that and write the code.. This code will be automatically appear in the same enhancement spot. You can see one more Enhancement implementation in the same Enhancement spot from the transaction code se19.
Hope my explanation is clear, if you have any doubts, send me a mail at [email protected]
All the best.
Shrikant -
CUA : To implement or not to Implement for Production
Hi all,
We have CUA implemented for our non production systems. The Basis team wants to implement CUA for our 5 production environments (R3, BW, CRM, SEM and APO). What are the pros and cons of implementing CUA in production? An opinion of someone who has CUA implemented at their company would be most helpful.
Thanks.
SashankHi Sashank!
We had a central user administration for a small 3-system landscape (from the beginning on).
Advantage: the central handling. Inconsistencies between the systems won't be a topic.
Disadvantage: Without experience it's possible to create quite a mess (once the user for distribution lost the authority to change profiles: nearly killed our system in this situation).
Also having different users and authorities in different systems is nothing which will be easier with a central maintenance - on the other hand it's not more difficult either.
Since your basis team has already experience with this tool, you can give it a go. We had no technical issues, only handling and organizational problems occured. Even workload was for a test system once a topic.
Regards,
Christian -
Implementation for CRM_MKTPL_OL_OBJ not trigerring
Hi,
I have Created an Implementation for the BAdi CRM_MKTPL_OL_OBJ with Filter Value 'TPM' . I have Implemented the Method 'CHECK_ATTRIBUTES' to check the Data on the Trade Promotion Header and raise Error Messages for some Missing Data. But my Custom Implementation is not trigerring and only the Standard Implementation for this BAdi (CRM_MKTPL_OL_OBJ_TPM) with the Same Filter Value 'TPM' is trigerring. Can someone let me know if there is something I am missing.
Thanks and Regards,
H.KrishnanHi,
I'm not sure about this. But, the BADI/ES "CRM_MKTPL" does not have the "Multiple Use" set. It depends on filter values and only one implementation per filter value is used.
Regards,
Arun Prakash -
SD and FICO (in BW) Implementation for a Chemical Industry
Hi All,
I Need help for implementing SD and FICO in BW. This is the first end to end implementation for me. So you guys can help me out HOW and Where to start the things?
Any document will be helpful and will be rewarded.
Regards,
BW IGAHi bw_I.G.A.,
the standard documentation of <a href="http://help.sap.com/saphelp_bw30b/helpdata/en/61/7beb3cad744026e10000000a11405a/frameset.htm">FI-CO and others FI</a>
the standard documentation of <a href="http://help.sap.com/saphelp_bw30b/helpdata/en/90/d4f33b949b6b31e10000000a11402f/frameset.htm">SD by R/3 and others</a>
Here you can try all Cubes, ODS, Infosources..... of this Area.
If it is useful, don't forget points!
Claudio
Maybe you are looking for
-
Hi! I'm trying to communicate with some hardware via OPC and datasocket. The problem is the great and variing number of the channels for the data acquisition (400-1500 channels!). So I decided to automatize the "Browse to OPC item.vi" via ActiveX wit
-
When I am going for new entries in node 'Set Work Schedule Rules and Work Schedules' I am getting the wrong default value for DWS grouping. The value is greyd out and I can't change that. Can someone please suggest why its happening and how can I co
-
Hi there, I would just like to know if it would be possible to pass a Select statement to forms_ddl? Since I need to use a variable in the 'From' clause, I was wondering if forms_ddl could be used? thnx
-
Update either html site or another flex component with Data from ESRI Flexviewer
Hello all, What I have is a basic flex mapping application that enables a user to update a feature (that is referenced to a ArcGIS server SDE database) by clicking on a the map. Once the feature is added to database it updates a total feature count
-
My bluetooth keyboard was randomly typing letters by itself and now won't pair with anything.
My bluetooth keyboard was acting normally for ages, connected to my Macbook laptop. Then, out of the blue, it started typing random letters constantly and became unsable. I unpaired the keyboard with my laptop, but now it doesn't seem to pair with an