Generic Attribute in MXBean
Hi,
I'm trying to register an MXBean (using Java 1.6) that has a get attribute that returns a generic class with the type specified in the interface. I get a non-compliant mbean exception thrown indicating that the method in question returns a type that cannot be translated into an open type.
Here is some code that illustrates what I am trying to do:
public static class GenericValue<E>
private final E val;
GenericValue(E val) {
this.val = val;
public E getVal() {
return val;
public interface GenericHolderMXBean {
public GenericValue<Float> getVal();
public static class GenericHolder
implements GenericHolderMXBean {
@Override
public GenericValue<Float> getVal() {
return new GenericValue<Float>(1.0f);
TestMbeanStuff.GenericHolder genericHolder = new GenericHolder();
MBeanServer m = ManagementFactory.getPlatformMBeanServer();
ObjectName name = new ObjectName("com.test:type=GenericHolder");
m.registerMBean( genericHolder, name )Is there a way to make this work? It seems analogous to List working as an attribute in an MXBean, but perhaps support for collections is a special case made by JMX and it is not possible to use one's own generic types?
Thanks,
Ryan
Thanks for your response Éamonn,
I do have a bit of a follow-up question. My original question was a simplification of what I would like to do. What I'm really after is having my MXBean interface return a type that has a generic type nested as an attribute. eg:
public static class GenericHolder {
public GenericValue<Float> getVal() {
return new GenericValue<Float>(1.0f);
public interface NestedGenericHolderMXBean {
public GenericHolder getVal();
public static class NestedGenericHolder
implements NestedGenericHolderMXBean {
public GenericHolder getVal() {
return new GenericHolder();
}I would still like to make this work and can see a way to make it work. But, there are a couple of ugly things about my solution. I can probably live with them, but would like to verify that they're unavoidable before I do.
NestedGenericHolder, as above, cannot be registered any more than my original example (for the same reason). My first thought is to make GenericHolder implement CompositeDataView and define how it should be converted to CompositeData. The modified GenericHolder looks something like:
public static class GenericHolder implements CompositeDataView {
public GenericValue<Float> getGenericVal() {
return new GenericValue<Float>(1.0f);
@Override
public CompositeData toCompositeData(CompositeType ct) {
try {
List<String> itemNames = new ArrayList<String>();
List<String> itemDescriptions = new ArrayList<String>();
List<OpenType<?>> itemTypes = new ArrayList<OpenType<?>>();
itemNames.add("genericVal");
itemTypes.add(SimpleType.FLOAT);
itemDescriptions.add("generic value");
CompositeType xct =
new CompositeType(
ct.getTypeName(),
ct.getDescription(),
itemNames.toArray(new String[0]),
itemDescriptions.toArray(new String[0]),
itemTypes.toArray(new OpenType<?>[0]));
CompositeData cd = new CompositeDataSupport(
xct,
new String[] { "genericVal" },
new Object[] {
getGenericVal().getVal()
assert ct.isValue(cd); // check we've done it right
return cd;
} catch (Exception e) {
throw new RuntimeException(e);
}This doesn't help anything though because introspection still seems to inspect this class' attributes. ie: Even though I've manually defined how to convert to CompositeData, it still seems to want to verify that it could do it automatically if it had to. Anyway, my next fix, is to change the name of the "getGenericValue" method to "genericValue" so that JMX doesn't expect that "genericVal" should be an attribute of my type. (And then I will add it to the CompositeData as an extra item - as described in the CompositeDataView JavaDoc).
Registration now because (I believe) JMX refuses to convert an object to a CompositeData that contains no attributes. As a result, I attempt to fix this by adding another getter to my class:
public static class GenericHolder implements CompositeDataView {
// MXBean introspection rejects classes with no attributes.
public Integer getOtherVal() {
return 17;
public GenericValue<Float> genericVal() {
return new GenericValue<Float>(1.0f);
@Override
public CompositeData toCompositeData(CompositeType ct) {
try {
List<String> itemNames = new ArrayList<String>(ct.keySet());
List<String> itemDescriptions = new ArrayList<String>();
List<OpenType<?>> itemTypes = new ArrayList<OpenType<?>>();
for (String item : itemNames) {
itemDescriptions.add(ct.getDescription(item));
itemTypes.add(ct.getType(item));
itemNames.add("genericVal");
itemTypes.add(SimpleType.FLOAT);
itemDescriptions.add("generic value");
CompositeType xct =
new CompositeType(
ct.getTypeName(),
ct.getDescription(),
itemNames.toArray(new String[0]),
itemDescriptions.toArray(new String[0]),
itemTypes.toArray(new OpenType<?>[0]));
CompositeData cd = new CompositeDataSupport(
xct,
new String[] { "otherVal", "genericVal" },
new Object[] {
getOtherVal(),
genericVal().getVal()
assert ct.isValue(cd); // check we've done it right
return cd;
} catch (Exception e) {
throw new RuntimeException(e);
}It now works, but not without a few compromises:
1. I have to implement toCompositeData(). This one isn't too big of a problem. I can certainly live with this.
2. I have to avoid method names that JMX will interpret as attributes when the return type are ones that it doesn't know how to convert to an OpenType. (I then add them into my MXBean, by adding them into the CompositeDataView I build.)
3. Such classes (GenericHolder) must contain at least one attribute with a type that can automatically be converted to an Open type.
I'd just like to make sure there aren't better solutions to the problems I described above.
Thanks and sorry for the overly long post,
Ryan
Similar Messages
-
Generic attributes with NavigationMenuItem class
hi,
Im building a dynamic navigation using a List<NavigationMenuItem>.
The menu is generated from a database.
I add a ActioListener to the NavigationMenuItem which resolves its value, depending on it the next page is displayed.
But id rather save the primary keys corresponding to the values into the NavigationMenuItems.
Is there a way i can add generic attributes dynamically to a NavigationMenuItem object?
Or do i have to extend NavigationMenuItem and a new property (i that possible at all?)
besides id like some general iformation about generic attributes, i cant find much.
thx in advance!no pointers? :(
-
Generic Attribute Access Pattern
Hi all,
I'd like to implement my BMP Beans with the Generic Attribute Access Pattern. So instead of using get/set methods I simply do get/put of the HashMap stored in the EJB.
Now my question is: how to I implement persitance of data on the DB with this pattern ?
Do I have to move the content of ejbStore into the method setAttributes(Map map) ? this way after calling setAttributes data is persited on the DB. But then what should I do with ejbStore? should I leave it empty?
thanks a lot
FrancescoThe setAttributes method should set the attributes of the bean from the hashmap, not do
anything in the database itself. Your ejbStore method will take the attributes of the bean
and put them in the database. This is since you say you are using BMP. If you were using CMP
the case would be different. -
Dynamic attribute in a custom component
has anybody tried generating an attribute dynamically in a custom component
e.g
<cx:inputText value="" foo="footest"/>
where foo is not defined in the custom inputtexttag.java
can we have a hashmap which stores all the unknown attributes into the hashmap upon loading and then handle it in the setpropertiescan we have a hashmap which stores all the unknown
attributes into the hashmap upon loading and then
handle it in the setpropertiesJSF's UIComponent has a function of generic attributes.
Use <f:attribute>.
<cx:inputText value="" foo="footest"/> Anyway, if you want to use the syntax like this, you should provide a custom
tag handler which has a setFoo() method and whose setProperties() method
copys the value to the corresponding (generic) attribute of the component. -
Using XQuery I'm trying to dynamically create attributes as the result of a complex for statement.
This works fine:
<tag
attributeName="{ for ...}"
/>
and I could just repeat this for every attribute. However the "for/where" statements are complex and I would like to avoid the overhead of having to repeat them for every attribute. What I would like is something like
<tag
"{ for ...
where ...
return attribute foo result1
return attribute bar result2
return attribute fubar result3
Any ideas how I could do this?
=Paul=
Also, as an aside, where is this putting the attribute setting code inside quotes documented?
-pdg-can we have a hashmap which stores all the unknown
attributes into the hashmap upon loading and then
handle it in the setpropertiesJSF's UIComponent has a function of generic attributes.
Use <f:attribute>.
<cx:inputText value="" foo="footest"/> Anyway, if you want to use the syntax like this, you should provide a custom
tag handler which has a setFoo() method and whose setProperties() method
copys the value to the corresponding (generic) attribute of the component. -
Dynamic attribute in CRM Loyalty
Hi,
I am creating a new dynamic attribute for Year to Date total amount spent by a customer when a member activity gets created. I created the dynamic attribute in SPRO under the Marketing->loyaltyPrograms->dynamic attribute. The attribute is added under loyalty program and also created a new reward rule to update the attribute specifically.
I want to update the total spending from Jan1st to Dec31st in this dynamic attribute. I don't see the activity date in the formula, so i can write a rule that if the activity date is between 01.01 to 12.31. add the spending to the attribute and reset it if the date is 01.01.can we have a hashmap which stores all the unknown
attributes into the hashmap upon loading and then
handle it in the setpropertiesJSF's UIComponent has a function of generic attributes.
Use <f:attribute>.
<cx:inputText value="" foo="footest"/> Anyway, if you want to use the syntax like this, you should provide a custom
tag handler which has a setFoo() method and whose setProperties() method
copys the value to the corresponding (generic) attribute of the component. -
Performance ... soft attributes hurt a lot
After writing a rather extensive application using a modified version of jsf (that works very well) I did some profiling. Boy was I surprised.
When you get into an application which contains views (trees) that are somewhat complex, such as a tabset component with some nested panesl, toolbars, buttons, and a large data grid (say 50 to 100 rows with 7 columns) where each cell may contain a command or some other custom component the performance gets a little bit ugly.
I was very surprised to uncover the primary culprit of the poorformance bottleneck. Using the Optimizeit profiler that ships with JBuilder, a beautiful tool by the way, I came to the realization that the utilization of soft attributes is a tremendously bad design decision. In fact, in the view which is described above, accessing the soft attributes actually took more time than acquiring the data for the view which required 12 calls to different databases, almost 5 seconds ... obviously the profiler adds some overhead.
I hope the use of soft attributes is just for the early access release ... and not part and parcel to the spec.
Soft attributes are okay, but only for optional attributes. The key attributes associated with each component should be hard attributes, actual instance variables of the component. I am talking about things like parent, componentId, rendererType, modelReference, value .... Particularly parent, and componentId are called thousdands of times for the sort of view I described above and that take seconds to execute when they are stored in a hashmap. I would not have believed it but, I have gone through our implementation of jsf and turned all of these soft attributes into hard attributes and hot damn, these seconds are now 20 , 30, 40 miliseconds.
This is even more pronounced if the component set used contains attributes like 'visible' or 'enabled' which require a traveral up the tree of components. In fact, for these type of attributes to really improve the performance we had to add the additional attribute 'parentVisible' that would be set on children once when a parents state was changed in order to avoid having to do the traversals over and over again.
I can understand if people are skeptical about this, I would have been as well ... we are only taking about hash lookups. But in production scale applications hash lookups are a hell of a lot more expensive than direct access to an instance variable and jsf does a lot of traversing ... during decode process ... during request event handling ... during validating ... during model updating ... during application event handling ... and then during rendering.
For simple 10 component web pages the soft attributes work fine, but to produce truly rich client html apps they simply do not scale.
The good news is with proper profiling and some tweaks to our base component class the performance now almost rocks...
JUST FYI ... we are running on Weblogic 6.1 and using a beefy solaris box.
Side Notes .....
We have created our a component set from scratch because as anyone using the ea release has obviously found the components included are simply unusable for anything serious. We started with an implementation of UIComponent - we could not use UIComponentBase because its setParent method is package scope and we wanted, no, we needed to make parent a hard attribute.
We have been able to create very complex components including grids that support sorting, filtering, paging, tab components, collapsible panels, hierarchical trees, a light XForm rendering component, buttons, toolbars, etc.... A very rich set of components.
We have not used the tag libraries for our application because they just are not ready ... instead we do most of our component rendering using Apache ECS in custom renderers. In fact we did not use JSP's to define most of our trees, instead we added the concept of TreeBuilders... no time to discuss this now.
I promised a while ago to post a coherent set of findings based on our work and still intend to do so, just trying to find the time ... sorry if this is a little bit all over the place. I felt compelled though to sound the warning about relying exclusively on soft attributes.(Member of JSF EG here...)
Thanks for your comments and feedback; it's being discussed
right now. The issue can be attacked on a couple of fronts.
First, some of the attributes currently being stored as
generic attributes should not be ("parent" comes to mind). Second,
there are significant optimizations possible to the generic
attribute mechanism used today. (A HashMap is not the best
data structure for this case, nor are Strings the best choice
as keys.)
We've also got an open issue to re-evaluate UIComponent vs.
UIComponentBase, and will specifically address the problem
you mention.
Thanks again. -
RADIUS and Vendor-Specific attributes
Hi,
I'm trying to add a vendor specific attribute (Cisco AV Pair) to BMAS
(NMAS 3.1.2 on NetWare 6.5 SP6). I can add any generic attribute I
want, but any of the vendor-specific attributes are not sent back in the
radius access-accept packet. Is there some configuration change I need
to make to support vendor specific attributes? They all show up in
ConsoleOne, I can add them, and they are saved when I hit OK.
Thanks for any suggestions!
GregIn article <UG2Jm.1195$[email protected]>, Greg Palumbo
wrote:
> I read the other two recent threads on this, it does sort of sound like
> a snapin issue, but those are usually under the 1.2\snapins directory I
> thought. what about installing a fresh copy of C1 on the C:\ drive from
> the BMAS CD or from NW65SP7? Also, wouldn't all the replaced sys/public
> files be in SYS/SYSTEM:\BACKSP7? Maybe something like Beyond Compare or
> WinMerge could flag all the changed files easily...
>
My latest thinking is that this is related to security. The failing
attribute contains an encryption of the DAS client password. I'm assuming
that ConsoleOne relies on some background process to do the encryption, and
that between SP7 and SP8, it changed. The new attributes are longer than
the old ones, so the snapin-related issue may simply be that it cannot read
what was stored.
I don't know if there is a particular security-related component that can
be reversed to allow changes to the DAS object, then updated again to put
things back to SP8.
Craig Johnson
Novell Support Connection SysOp
*** For a current patch list, tips, handy files and books on
BorderManager, go to http://www.craigjconsulting.com *** -
How to add a table (dynamic created) into a model attribute
i have dynamically created an internal table. Generally i use model-binding in a stateful MVC-Application.
Is there a possibiltity to transfer the dynamic table to a model. As far as i know generic attributes are not allowed in the modell class.
Every hint welcome
thx in advanceBy some miracle I do have this finally working. I will warn you up front that the code is not the cleanest (I have stuff copied in from all over the place. I probably have lots of unused variable references - but I am running out of time to clean it up further). Also I don't have all the logic to support all your different possible dynamic structure types. I always use SFLIGHT as my dyanmic structure. Therefore you will have to adapt the coding to lookup the actual structure type in use.
So I have a model that has an structure ITAB type ref to data. In my Model initialization I go ahead and dynamically redfine this to my specific type:
METHOD init.
SELECT SINGLE * FROM sflight INTO CORRESPONDING FIELDS OF isflight.
DATA: struct_type TYPE REF TO cl_abap_structdescr,
tabletype TYPE REF TO cl_abap_tabledescr.
struct_type ?= cl_abap_structdescr=>describe_by_name( 'SFLIGHT' ).
CREATE DATA me->itab TYPE HANDLE struct_type.
ENDMETHOD.
Then in my View I have the following:
<%@page language="abap" %>
<%@extension name="htmlb" prefix="htmlb" %>
<%@extension name="phtmlb" prefix="phtmlb" %>
<%@extension name="bsp" prefix="bsp" %>
<htmlb:content design="design2003" >
<htmlb:page title=" " >
<htmlb:form>
<phtmlb:matrix width="100%" >
<%
field-symbols: <wa> type any.
assign model->itab->* to <wa>.
* append initial line to <wa_itab> assigning <Wa>.
data: descriptor type ref to CL_ABAP_STRUCTDESCR.
descriptor ?= CL_ABAP_STRUCTDESCR=>describe_by_data( <wa> ).
data: flddescr type DDFIELDS.
flddescr = descriptor->GET_DDIC_FIELD_LIST( ).
field-symbols: <wa_field> like line of flddescr.
data: label type ref to cl_htmlb_label.
data: input type ref to CL_HTMLB_INPUTFIELD.
data: binding_string type string.
"Loop through each field in the structure Definition
loop at flddescr assigning <Wa_field>.
clear label.
clear input.
concatenate '//model/itab.'
<wa_field>-FIELDNAME
into binding_string.
label ?= cl_htmlb_label=>factory( _for = binding_string ).
input ?= cl_htmlb_inputfield=>factory( _value = binding_string ).
%>
<phtmlb:matrixCell row = "+1"
vAlign = "TOP" />
<bsp:bee bee="<%= label %>" />
<phtmlb:matrixCell col = "+1"
vAlign = "TOP" />
<bsp:bee bee="<%= input %>" />
<%
endloop.
%>
</phtmlb:matrix>
<htmlb:button id="Test" onClick="Test" text="Submit"/>
</htmlb:form>
</htmlb:page>
The key to making this work are custom getter/setters. In your model class, you can copy from the template methods (Like GETM_S_XYZ for the metadata structure method). Copy them and remove the _ on the front of the name. Then change XYZ to the name of the attribute you are binding for. The following are my custom methods.
method get_m_s_itab .
* uses ****************************************************************
* data ****************************************************************
* code ****************************************************************
* method is supposed to return either info about a specific component
* of a structure (component is not initial -> return ref to
* if_bsp_metadata_simple) or the complete structure
* (component is initial -> return ref to if_bsp_metadata_struct)
data: l_attribute_ref type ref to data,
l_attr_ref type ref to data,
l_exception type ref to cx_root,
l_ex type ref to cx_sy_conversion_error,
l_ex_bsp type ref to cx_bsp_conversion_exception,
l_ex2 type ref to cx_bsp_t100_exception,
l_type type i,
l_index type i,
l_name type string,
l_component type string,
l_getter type string.
data: l_field_ref type ref to data,
l_dfies_wa type dfies,
rtti type ref to cl_abap_elemdescr.
data: crap type string,
rest type string,
t_index(10) type c.
split attribute_path at '[' into crap rest.
split rest at ']' into t_index crap.
****Dummy Object to avoid dumps
create object metadata type cl_bsp_metadata_simple
exporting info = l_dfies_wa.
call method if_bsp_model_util~disassemble_path
exporting
path = attribute_path
importing
name = l_name
index = l_index
component = l_component
type = l_type.
data: l_dataref type string.
****Dynamically determine your actual structure - for this demo
****I just hardcode SFLIGHT
concatenate 'SFLIGHT-' l_component into l_dataref.
data: field type ref to data.
****Create a data object of the specified type
try.
create data field type (l_dataref).
catch cx_sy_create_data_error.
exit.
endtry.
rtti ?= cl_abap_typedescr=>describe_by_data_ref( field ).
l_dfies_wa = rtti->get_ddic_field( ).
clear metadata.
create object metadata type cl_bsp_metadata_simple
exporting info = l_dfies_wa.
endmethod.
method get_s_itab .
* uses ****************************************************************
* data ****************************************************************
* code ****************************************************************
* get the given value of the component of the struct, e.g.
* field-symbols: <l_comp> type any.
* assign component component of structure XYZ to <l_comp>.
* value = <l_comp>.
data: l_attr_ref type ref to data,
l_field_ref type ref to data.
data: l_attribute_ref type ref to data,
l_exception type ref to cx_root,
l_ex type ref to cx_sy_conversion_error,
l_ex2 type ref to cx_bsp_t100_exception,
l_type type i,
l_index type i,
l_name type string,
l_component type string,
l_getter type string,
rtti type ref to cl_abap_elemdescr.
field-symbols: <o_data> type any,
<n_data> type any.
*Test
call method if_bsp_model_util~disassemble_path
exporting
path = attribute_path
importing
name = l_name
index = l_index
component = l_component
type = l_type.
* get a field reference for the assignment
field-symbols: <wa> type any,
<l_comp> type any.
assign me->itab->* to <wa>.
assign component l_component of structure <wa> to <l_comp>.
get reference of <l_comp> into l_field_ref.
****Dynamically determine your actual structure - for this demo
****I just hardcode SFLIGHT
data: l_dataref type string.
concatenate 'SFLIGHT-' l_component into l_dataref.
data: field type ref to data.
****Create a data object of the specified type
try.
create data field type (l_dataref).
catch cx_sy_create_data_error.
exit.
endtry.
assign l_field_ref->* to <o_data>.
assign field->* to <n_data>.
move <o_data> to <n_data>.
* call conversion routine
try.
value = if_bsp_model_util~convert_to_string(
data_ref = field
attribute_path = attribute_path
no_conversion_exit = 0 ).
catch cx_sy_conversion_error into l_ex.
me->errors->add_message_from_exception(
condition = attribute_path
exception = l_ex
dummy = value ).
catch cx_bsp_t100_exception into l_ex2.
me->errors->add_message_from_t100(
condition = attribute_path
msgid = l_ex2->msgid
msgno = l_ex2->msgno
msgty = l_ex2->msgty
p1 = l_ex2->msgv1
p2 = l_ex2->msgv2
p3 = l_ex2->msgv3
p4 = l_ex2->msgv4
dummy = value ).
endtry.
endmethod.
method set_s_itab .
* uses ****************************************************************
* data ****************************************************************
* code ****************************************************************
* assign the given value to the component of the struct, e.g.
* field-symbols: <l_comp> type any.
* assign component component of structure XYZ to <l_comp>.
* <l_comp> = value.
data: l_attr_ref type ref to data,
l_field_ref type ref to data.
data: l_attribute_ref type ref to data,
l_exception type ref to cx_root,
l_ex type ref to cx_sy_conversion_error,
l_ex_bsp type ref to cx_bsp_conversion_exception,
l_ex2 type ref to cx_bsp_t100_exception,
l_type type i,
l_index type i,
l_name type string,
l_component type string,
l_getter type string,
rtti type ref to cl_abap_elemdescr.
field-symbols: <o_data> type any,
<n_data> type any.
*Test
call method if_bsp_model_util~disassemble_path
exporting
path = attribute_path
importing
name = l_name
index = l_index
component = l_component
type = l_type.
* get a field reference for the assignment
field-symbols: <wa> type any,
<l_comp> type any.
assign me->itab->* to <wa>.
assign component l_component of structure <wa> to <l_comp>.
get reference of <l_comp> into l_field_ref.
****Dynamically determine your actual structure - for this demo
****I just hardcode SFLIGHT
data: l_dataref type string.
concatenate 'SFLIGHT-' l_component into l_dataref.
data: field type ref to data.
****Create a data object of the specified type
try.
create data field type (l_dataref).
catch cx_sy_create_data_error.
exit.
endtry.
assign field->* to <n_data>.
move <l_comp> to <n_data>.
* call conversion routine
try.
if_bsp_model_util~convert_from_string(
data_ref = field
value = value
attribute_path = attribute_path
use_bsp_exceptions = abap_true
no_conversion_exit = 0 ).
catch cx_sy_conversion_error into l_ex.
me->errors->add_message_from_exception(
condition = attribute_path
exception = l_ex
dummy = value ).
catch cx_bsp_conversion_exception into l_ex_bsp.
me->errors->add_message_from_exception(
condition = attribute_path
exception = l_ex_bsp
dummy = value ).
catch cx_bsp_t100_exception into l_ex2.
me->errors->add_message_from_t100(
condition = attribute_path
msgid = l_ex2->msgid
msgno = l_ex2->msgno
msgty = l_ex2->msgty
p1 = l_ex2->msgv1
p2 = l_ex2->msgv2
p3 = l_ex2->msgv3
p4 = l_ex2->msgv4
dummy = value ).
endtry.
if <n_data> is initial.
clear <l_comp>.
else.
move <n_data> to <l_comp>.
endif.
endmethod.
I know that is a LOT of nasty code without too much explanation. I'm afriad there isn't time right now to expand on how it works too much. Between my day job and trying to finish the BSP book, there just isn't much time left. Like I said before there is a very large section in the book on this topic that hopefully explains it. The book will be out in December or early January - but perhaps I will get some time before then to write up something on SDN about this. -
[Q] htmlKona - adding attributes not specified in object model
How do I go about adding attributes to a htmlKona object that exist in
proprietary HTML versions, or versions beyond what is supported in Kona, if
those add methods do not exist in the current object model?
Most htmlKona elements extend weblogic.html.ElementWithAttributes, but the
addAttribute(String, String) method is inexcessable.
Any help appreciated. If this is posted to the wrong group, please point me
in the right direction.
Lukas
I guess you need to get htmlkonapatch403Patch.jar. ElementsWithAttributes
supports it then.
Madhavi
Lukas Bradley <[email protected]> wrote in message
news:[email protected]...
> import weblogic.html.TableElement ;
>
> class TableTest
> {
> public static void main(String args[])
> {
> TableElement lTable = new TableElement() ;
> lTable.addAttribute("height", "100%") ;
> }
> }
>
> Yields:
>
> TableTest.java:8: Method addAttribute(java.lang.String, java.lang.String)
> not found in class weblogic.html.TableElement.
> lTable.addAttribute("height", "100%") ;
> ^
> 1 error
>
> While the documentation states:
>
> java.lang.Object
> |
> +----weblogic.html.HtmlElement
> |
> +----weblogic.html.ElementWithAttributes
> |
> +----weblogic.html.MultiPartElement
> |
> +----weblogic.html.TableElement
>
>
> And ElementWithAttributes has:
>
> addAttribute(String, String)
>
> And yes, many browsers will allow you to set the height on a table. =)
> Thanks for any help.
>
> Lukas
>
>
>
> John Greene wrote in message <[email protected]>...
> >
> >Hi --
> >
> >A method was added to allow generic attributes. I thought it was this
> method
> >you speak of. How do you mean it's inaccessible? Newsdude, can you
> clarify?
> >
> >
> >Lukas Bradley wrote:
> >>
> >> How do I go about adding attributes to a htmlKona object that exist in
> >> proprietary HTML versions, or versions beyond what is supported in
Kona,
> if
> >> those add methods do not exist in the current object model?
> >>
> >> Most htmlKona elements extend weblogic.html.ElementWithAttributes, but
> the
> >> addAttribute(String, String) method is inexcessable.
> >>
> >> Any help appreciated. If this is posted to the wrong group, please
point
> me
> >> in the right direction.
> >>
> >> Lukas
> >
> >--
> >
> >Take care,
> >
> >-jg
> >
> >John Greene E-Commerce Server Division, BEA Systems,
> Inc.
> >Developer Relations Engineer 550 California Street, 10th floor
> >415.364.4559 San Francisco, CA 94104-1006
> >mailto:[email protected] http://weblogic.beasys.com
>
>
>
>
-
Plant disappears in extended attributes
Hello SRM Experts,
Systems: SRM-Server 550, ERP2005
scenario: classic
After a Upgrade from SRM 3.5 to SRM 5.0 I like to enter a plant in PPOMA_BBP extended Attributes. I can select the backend system and the plant but when I save it, the whole entry will disappear. The message "Data has been saved" 5A 497 appears but the entry is gone.
I have already used the report BBP_LOCATION_GET_ALL.
Has anybody an idea why this problem occurs?
Thank you very much for your answers.
Kind regards
AxelHi
Ensure that you are not making settings from SRM Web user and only using SRM Logon user in GUI.
Please refer to the OSS notes.
<b>Note 110909 - Composite SAP note on generic attributes
Note 512660 - EBP: Defaults for plant and storage location disappear
1012805 - 'Settings' - Input search for Plant / WRK is not working
672275 - EBP4.0: Performance during start of 'Shop' (shopping cart)
Note 864221 - EBP 4.0+: Performance location</b>
Please detail your steps, how to re-produce the error.
Hope this will help.
Please reward suitable points, incase it suits your requirements.
Regards
- Atul -
Hi all. I am well aware that you cannot create an array of generics in java. However, I am being confused by the compiler errors I get for the following code:
import java.util.Queue;
import java.util.LinkedList;
public class TopologicalSorter<E extends Comparable>{
private class TopSortCell{
private int PredecessorCount;
//private E element;
//private LinkedList<E> predecessors;
private TopSortCell[] Elements;
private Queue<E> OutputQueue;
public TopologicalSorter(int[] elements){
this.Elements = new TopSortCell[elements.length]; //It complains here!
}I am not creating an array of generics am I? At first I thought it was complaining because there were some Generic attributes in my inner class so I commented them out but it still complains. Also, initially, the constructor argument int[] elements was E[] elements. I changed it only for experimentation.
I tested creating an array out of an inner class with the following, just to make sure I am not mistaken:
public class InnerClassTest{
private class InnerClass{
int i;
private InnerClass[] TestArray;
public InnerClassTest(char[] foo){
TestArray = new InnerClass[foo.length];
}Compiles smoothly. What might I be missing here?
Thank you very much!If you make TopSortCell static, it compiles fine. I've rarely if ever found a reason for a named nested class not to be static.
As for why it doesn't compile in the non-static case, I don't know really. I guess it has something to do with the inner class only being defined in the context of an instance of the outer class.
TopologicalSorter[] x = new TopologicalSorter[1];
TopologicalSorter<String>[] y = new TopologicalSorter<String>[1];The first line is fine, but the second gives "generic array creation" error. I guess the non-static nested class is viewed as being equivalent to, or implying, the second for some reason. -
[REQUEST] rtl8723au_bt bluetooth driver for lenovo yoga 13
Hello.
I have a lenovo yoga 13 laptop with 8723 wireless card.
Wifi is working bacause of dkms-8723au-git package. As I know, in 3.15 kernel it will work out of the box and lwfinger will no longer maintain this source code.
Bluetooth is not working and there is no bluetooth driver in aur. It is required to install another package from here https://github.com/lwfinger/rtl8723au_bt.
I cannot build this package, because when I run make command it ends with error make[1]: *** /lib/modules/3.14.4-1-ARCH/build: No such file or directory. Also there was written about no dkms support in code. But I cannot fix it, because I am still noob in Archlinux. And for some reason it is written "Support kernel version 2.6.32~3.13.0" in readme.txt. I have already 3.14.4-1-ARCH kernel.
Could anyone help me to fix that and make aur package for other people to get bluetooth work on lenovo yoga 13?I think bluez5 is ok, because when I run bluetoothctl it can detect my cluetooth controller now. However, I cannot start working with it
[ndr@yoga ~]$ sudo bluetoothctl
[sudo] password for ndr:
[NEW] Controller 2C:D0:5A:DF:60:07 yoga [default]
[bluetooth]# help
Available commands:
list List available controllers
show [ctrl] Controller information
select <ctrl> Select default controller
devices List available devices
paired-devices List paired devices
power <on/off> Set controller power
pairable <on/off> Set controller pairable mode
discoverable <on/off> Set controller discoverable mode
agent <on/off/capability> Enable/disable agent with given capability
default-agent Set agent as the default one
scan <on/off> Scan for devices
info <dev> Device information
pair <dev> Pair with device
trust <dev> Trust device
untrust <dev> Untrust device
block <dev> Block device
unblock <dev> Unblock device
remove <dev> Remove device
connect <dev> Connect device
disconnect <dev> Disconnect device
version Display version
quit Quit program
[bluetooth]# version
Version 5.19
[bluetooth]# power on
Failed to set power on: org.bluez.Error.Blocked
[bluetooth]# list
Controller 2C:D0:5A:DF:60:07 yoga [default]
[bluetooth]# devices
[bluetooth]# show
Controller 2C:D0:5A:DF:60:07
Name: yoga
Alias: yoga
Class: 0x000000
Powered: no
Discoverable: no
Pairable: yes
UUID: PnP Information (00001200-0000-1000-8000-00805f9b34fb)
UUID: Generic Access Profile (00001800-0000-1000-8000-00805f9b34fb)
UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
UUID: A/V Remote Control (0000110e-0000-1000-8000-00805f9b34fb)
UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)
Modalias: usb:v1D6Bp0246d0513
Discovering: no
[bluetooth]# select 2C:D0:5A:DF:60:07
[bluetooth]# power on
Failed to set power on: org.bluez.Error.Blocked
[DEL ] Controller 2C:D0:5A:DF:60:07 yoga [default]
[NEW] Controller 2C:D0:5A:DF:60:07 yoga [default]
[bluetooth]#
Ok, it is not powered on. In troubleshooting section in wiki there are some instructions about such situation. I do all as described in wiki:
[ndr@yoga ~]$ hciconfig -a
hci0: Type: BR/EDR Bus: USB
BD Address: 2C:D0:5A:DF:60:07 ACL MTU: 820:8 SCO MTU: 255:16
[b]DOWN[/b]
RX bytes:558 acl:0 sco:0 events:28 errors:0
TX bytes:355 acl:0 sco:0 commands:28 errors:0
Features: 0xff 0xfb 0xff 0xfe 0xdb 0xff 0x7b 0x87
Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
Link policy: RSWITCH HOLD SNIFF PARK
Link mode: SLAVE ACCEPT
[ndr@yoga ~]$ hciconfig -a hci0 up
Can't init device hci0: Operation not permitted (1)
[ndr@yoga ~]$ sudo hciconfig -a hci0 up
[sudo] password for ndr:
Can't init device hci0: Operation not possible due to RF-kill (132)
[ndr@yoga ~]$ rfkill unblock all
bash: rfkill: command not found
Could you please tell me where to dig next. Why there is not rfkill command? -
New Lenovo laptop: Bluetooth enabled but never sees any devices.
Really nasty one this; Bluetooth working fine under Windows (urgh) but never sees any devices under Linux. No errors at all; it just never sees anything. The device is of this type:
Bus 001 Device 004: ID 0bda:b728 Realtek Semiconductor Corp.
It looks like I'm not the only person with this problem:
http://ubuntuforums.org/showthread.php?t=2242379
http://www.linuxforums.org/forum/hardwa … icate.html
I have tried the LTS kernel and get the same problem. I'm not sure what to try to debug it, TBH I can't find out what kernel module is driving it. The radio is definitely detected, powered on and unblocked:
[root@Lenovo-Z50 ~]# hciconfig
hci0: Type: BR/EDR Bus: USB
BD Address: 00:71:CC:19:58:EE ACL MTU: 820:8 SCO MTU: 255:16
UP RUNNING PSCAN ISCAN INQUIRY
RX bytes:1614 acl:0 sco:0 events:145 errors:0
TX bytes:1583 acl:0 sco:0 commands:133 errors:0
[bluetooth]# show
Controller 00:71:CC:19:58:EE
Name: Lenovo-Z50
Alias: Lenovo-Z50
Class: 0x0c010c
Powered: yes
Discoverable: yes
Pairable: yes
UUID: PnP Information (00001200-0000-1000-8000-00805f9b34fb)
UUID: Generic Access Profile (00001800-0000-1000-8000-00805f9b34fb)
UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
UUID: A/V Remote Control (0000110e-0000-1000-8000-00805f9b34fb)
UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)
UUID: Audio Source (0000110a-0000-1000-8000-00805f9b34fb)
UUID: Audio Sink (0000110b-0000-1000-8000-00805f9b34fb)
Modalias: usb:v1D6Bp0246d0517
Discovering: yes
[root@Lenovo-Z50 ~]# rfkill list
0: hci0: Bluetooth
Soft blocked: no
Hard blocked: no
1: phy0: Wireless LAN
Soft blocked: no
Hard blocked: no
2: ideapad_wlan: Wireless LAN
Soft blocked: no
Hard blocked: no
3: ideapad_bluetooth: Bluetooth
Soft blocked: no
Hard blocked: no
I have another Lenovo laptop running a very similar install of Arch and this works fine. This has a different Bluetooth adaptor though, made by Intel with USB ID 8087:07da. If they're side-by-side I can pair a mouse and a phone to the other one, but nothing at all shows up on the one with the Realtek adaptor. Any help would be very much appreciated!
EDIT: Just tried this laptop with Ubuntu 14.04 and 12.04.5, didn't work with either. Same problem. Bearing in mind the two threads linked above are unanswered and this clearly hasn't broken recently, I guess this adaptor just doesn't work in Linux (yet). Looks like I'll be returning this one to the store, which is a shame as it took me months to find a 1080p laptop for a reasonable price.
EDIT: Unnecessary test but Fedora 20 behaves exactly the same. I'm not sure how many current laptops on the market use this chipset, but it looks like a lot of Lenovos do. I have a netbook with a Realtek SD card reader that stopped working in Linux due to some kernel modules being amalgamated, but it works again with the current kernel. I may just sit tight on this one.
Last edited by Modeler (2014-09-12 08:45:58)I had similar issues, downgrading to bluez4 might help, but I found it was much more of a hassle.
I had the most success using vanilla bluetoothctl commands to pair with the device, then using dbus commands to register the bluetooth device as a network access point or see device capabilities.
Are you using a network manager? I found NetworkManager was unable to set up the access point due to an error with its dhcp client setup, but connman was able to do it. Or by issuing the right dbus command, I created the network device manually and then ran dhcpcd on it directly. -
Multiple obSSOCookies in a single user session
Hi ,
I have written a web service to update my users in ADAM directory. The web method creates IDXML requests and sends it to the Identity Server.
My web method looks like this
[WebMethod]
public void UpdateUserProfile(string userGuid, UserProfile profile, string obSsoCookie) where userGUID is the CN attribute.
I do call this webmethod from a web application to update multiple users. Since my web method supports only one update at a time, I have to call this method in a loop and pass on the user details. I wont be able to add a bulk update web method due to other constraints.
Now every time, when I call this web method from my client ASP.NET application (Updating users from my client application) , I also pass on a new obSSOCookie, in the same session.
The client method signature which I use to call the web method is
utils.UpdateUserProfile(foundProfile[iProfile].Guid, profile, CommonFunctions.GetOIMSSOCookie());
The GetOIMSSOCookie method generates a new cookie on every call by posting my account credentials to webgate.
However, the update fails sporadically after updating few users. The error logs which I see is (logs have been masked)
2011-03-09 04:59:24,458|756|DEBUG|53275e69|XXX|UpdateUserProfile > SearchUser SearchActiveUser > SearchActiveUser > SearchActiveUsers > GetUserAttributeValues >|OIM.CommonSearchHelper|cn Attribute value: CN=2bb8f5f6-49b0-4d86-a58a-bad9a087b25c,OU=XXX,OU=Applications,OU=subscriber,DC=ext,DC=adam
2011-03-09 04:59:24,458|756|DEBUG|53275e69|XXX|UpdateUserProfile > SearchUser SearchActiveUser > SearchActiveUser > SearchActiveUsers >|OIM.CommonSearchHelper|User DN: CN=2bb8f5f6-49b0-4d86-a58a-bad9a087b25c,OU=XXX,OU=Applications,OU=subscriber,DC=ext,DC=adam
2011-03-09 04:59:24,458|756|DEBUG|53275e69|XXX|UpdateUserProfile > SearchUser SearchActiveUser > SearchActiveUser >|OIM.CommonSearchHelper|userDN: CN=2bb8f5f6-49b0-4d86-a58a-bad9a087b25c,OU=XXX,OU=Applications,OU=subscriber,DC=ext,DC=adam
2011-03-09 04:59:24,458|756|DEBUG|53275e69|XXX|UpdateUserProfile > CreateGenericAttribute|OIM.ModifyUserHelper| Generic Attribute: Setting;oper:REPLACE_ALL
2011-03-09 04:59:24,458|756|DEBUG|53275e69|XXX|UpdateUserProfile > CreateGenericAttribute|OIM.ModifyUserHelper|Attribute Values : OptOut;
2011-03-09 04:59:24,458|756|DEBUG|53275e69|XXX|UpdateUserProfile > CreateGenericAttribute|OIM.ModifyUserHelper| Generic Attribute: setting;oper:REPLACE_ALL
2011-03-09 04:59:24,458|756|DEBUG|53275e69|XXX|UpdateUserProfile > CreateGenericAttribute|OIM.ModifyUserHelper|Attribute Values : ;
2011-03-09 04:59:24,458|756|DEBUG|53275e69|XXX|UpdateUserProfile > CreateRequestParams|OIM.ModifyUserHelper|Creating Request params for dn:CN=2bb8f5f6-49b0-4d86-a58a-bad9a087b25c,OU=XXX,OU=Applications,OU=subscriber,DC=ext,DC=adam
2011-03-09 04:59:24,458|756|DEBUG|53275e69|XXX|UpdateUserProfile > CreateRequest|OIM.ModifyUserHelper|Creating Modify User Request:
2011-03-09 04:59:24,458|756|DEBUG|53275e69|XXX|UpdateUserProfile > CreateCookie|OIM.Utility|Creating Cookie - ObSSOCookie : vh1YQIlJEn4m4PA6uWYQlB1VJp%2Bl1OL7Got2aL1GTwBj1dCF4r4gdoiwXaCbwKmqqX0KWQGp5n0KzaLhDsKqscGNT%2FsxLdSdmoiBMIqR2tBMxIGO4EIIO8FZ%2FnOUVIrElqjyZMK7FpKJ7cGOvezFBLbl1WqcOxiDz2M2lYgoRFJX94uhaB2av3FoFxMQU0wgNHOJJsT4oAaUW2B6DxHg9nzITZvanmzYrDG7xK8p6TNTilhD9hygvcUKyriaAnIYJRxgpSmdgppznPD27KoQvLmjw2jjIHxujaWXPiMko0QgFpIwMK02SrgOWLlB3n6334n4f86TJqi%2Bj78hJ3HRpW%2FjNfAYBbr%2FN1D0r6%2BZt3U%3D; domain=.xxx.com;isSecure: False
2011-03-09 04:59:24,646|756|DEBUG|53275e69|XXX|UpdateUserProfile >|OIM.OimUtils|Status: 0
2011-03-09 04:59:24,646|756|DEBUG|53275e69|XXX|UpdateUserProfile >|OIM.OimUtils|Updated User Profile
2011-03-09 04:59:24,646|756|DEBUG|(null)|XXX|(null)|OIM.Global|Request Completed for /oimapi/20070306/oimapi.asmx
2011-03-09 04:59:24,739|756|DEBUG|(null)|XXX|(null)|OIM.Global|Begin Request - 9046bf89
2011-03-09 04:59:24,739|756|DEBUG|9046bf89|XXX|(null)|OIM.Global|Beginning Request for /OIMAPI/20070306/OimAPI.asmx
2011-03-09 04:59:24,739|756|DEBUG|9046bf89|XXX|GetUserProfileForToken >|OIM.OimUtils|Starting GetUserProfileForToken
2011-03-09 04:59:24,739|756|DEBUG|9046bf89|XXX|GetUserProfileForToken >|OIM.OimUtils|Parameters: obssocookie: ngzOfBfpHTxumbRfYHbaHXMR%2B3oDuxKmIUzS4hqFtGfGQ8QyLSQ7n%2BiLLbEBJMLXJlq5mF1u1ngR8z8Xs9n5T5JBZyK7eVhlitAELEU2SrPxlCkenz6WdbtM%2FsbpJKTZ3kQ25%2Fy3lZ8gVHXLeMzjNQitlXdmpnA%2BTPRu%2FwPAIojDmojbdHWiO3eJI61lvffrsMFANz5ZtVRd4AKmbFFWXI4DytAIdKwSDfDZ1h6LsVAsYaZ4vXM1%2B7qJ7qw80%2F7PO8CKer%2F4wbTNAzgSHH%2BNA7Zd2TgzzYjPAyiPDIbQb4viB%2BAdohKW6IScot9ekWzCtm0gzA1H4fJTSGmXEDuLrux7wxDsNpeL4HfvMq5AvTM%3D
2011-03-09 04:59:24,755|756|DEBUG|9046bf89|XXX|GetUserProfileForToken > GetUserAttributeValues CreateRequestParams|OIM.ViewHelper|Creating View Request params for dn:
2011-03-09 04:59:24,755|756|DEBUG|9046bf89|XXX|GetUserProfileForToken > GetUserAttributeValues CreateRequest|OIM.ViewHelper|Creating View Request
2011-03-09 04:59:24,755|756|DEBUG|9046bf89|XXX|GetUserProfileForToken > GetUserAttributeValues CreateCookie|OIM.Utility|Creating Cookie - ObSSOCookie : ngzOfBfpHTxumbRfYHbaHXMR%2B3oDuxKmIUzS4hqFtGfGQ8QyLSQ7n%2BiLLbEBJMLXJlq5mF1u1ngR8z8Xs9n5T5JBZyK7eVhlitAELEU2SrPxlCkenz6WdbtM%2FsbpJKTZ3kQ25%2Fy3lZ8gVHXLeMzjNQitlXdmpnA%2BTPRu%2FwPAIojDmojbdHWiO3eJI61lvffrsMFANz5ZtVRd4AKmbFFWXI4DytAIdKwSDfDZ1h6LsVAsYaZ4vXM1%2B7qJ7qw80%2F7PO8CKer%2F4wbTNAzgSHH%2BNA7Zd2TgzzYjPAyiPDIbQb4viB%2BAdohKW6IScot9ekWzCtm0gzA1H4fJTSGmXEDuLrux7wxDsNpeL4HfvMq5AvTM%3D; domain=.xxx.com;isSecure: False
2011-03-09 04:59:24,896|1356|DEBUG|(null)|(null)|(null)|OIM.Global|Begin Request - 29bf4f98
2011-03-09 04:59:24,896|1356|DEBUG|29bf4f98|XXX|(null)|OIM.Global|Beginning Request for /oimapi/20070306/oimapi.asmx
2011-03-09 04:59:24,896|1356|DEBUG|29bf4f98|XXX|UpdateUserProfile >|OIM.OimUtils|Starting UpdateUserProfile
2011-03-09 04:59:24,896|1356|DEBUG|29bf4f98|XXX|UpdateUserProfile >|OIM.OimUtils|Parameters: userGuid: 36ce5679-5f52-4b6c-a2f5-a9d48162abac; obSsoCookie: loggedoutcontinue
2011-03-09 04:59:24,896|1356|DEBUG|29bf4f98|XXX|UpdateUserProfile > SearchUser SearchActiveUser > CreateSearchParamCondition|OIM.CommonSearchHelper|Creating Search Param Conditions - attrName:cn;attrValue:36ce5679-5f52-4b6c-a2f5-a9d48162abac;oper:OEM
2011-03-09 04:59:24,896|1356|DEBUG|29bf4f98|XXX|UpdateUserProfile > SearchUser SearchActiveUser >|OIM.CommonSearchHelper|Search Condition 1: cn OEM 36ce5679-5f52-4b6c-a2f5-a9d48162abac
2011-03-09 04:59:24,896|1356|DEBUG|29bf4f98|XXX|UpdateUserProfile > SearchUser SearchActiveUser > SearchActiveUser > SearchActiveUsers > CreateSearchParams|OIM.CommonSearchHelper|Creating Search Params with 1 condition(s)
2011-03-09 04:59:24,896|1356|DEBUG|29bf4f98|XXX|UpdateUserProfile > SearchUser SearchActiveUser > SearchActiveUser > SearchActiveUsers > CreateRequestParams|OIM.CommonSearchHelper|Creating Request params - number of fields: 1; tabId: Employees
2011-03-09 04:59:24,896|1356|DEBUG|29bf4f98|XXX|UpdateUserProfile > SearchUser SearchActiveUser > SearchActiveUser > SearchActiveUsers > CreateRequest|OIM.CommonSearchHelper|Creating Request:
2011-03-09 04:59:24,896|1356|DEBUG|29bf4f98|XXX|UpdateUserProfile > SearchUser SearchActiveUser > SearchActiveUser > SearchActiveUsers > CreateCookie|OIM.Utility|Creating Cookie - ObSSOCookie : loggedoutcontinue; domain=.xxx.com;isSecure: False
2011-03-09 04:59:24,896|1356|ERROR|29bf4f98|XXX|UpdateUserProfile > SearchUser SearchActiveUser > SearchActiveUser > SearchActiveUsers >|OIM.CommonSearchHelper|2 - Error Searching User: cn OEM 36ce5679-5f52-4b6c-a2f5-a9d48162abac; - The request failed with an empty response.(51-99-01)
System.Net.WebException: The request failed with an empty response.
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at OIM.common_search.OblixIDXML_common_search_Service.OblixIDXML_common_search(authentication authentication, request request) in c:\Projects\OIM\Source\OIMAPI\Web References\common_search\Reference.cs:line 79
at OIM.CommonSearchHelper.GetSearchActiveUsersResponse(String[] attributeNames, SearchParamsCondition[] conditions, Int32 numOfRecords, String obSsoCookie) in c:\Projects\OIM\Source\OIMAPI\CommonSearchHelper.cs:line 493
2011-03-09 04:59:24,896|1356|DEBUG|(null)|XXX|(null)|OIM.Global|Request Completed for /oimapi/20070306/oimapi.asmx
The update fails because in between, the obssocookie sets to LoggedOut Continue.
Should I be using a single obSSOCookie for the entire update operation, by getting a cookie and storing it in a temp string variable? If not, then what could be reason the cookie getting timed-out?
Any suggestions?
Thank you,
VibhutiHi Sudhakar,
try some thing like this.Here I have enclosed the code snippet.
String query = USER_ID + "=" + user.getUserId()+ "," + people;
// add the user to the LDAP directory
// ctx.createSubcontext( query, attrNew );
Attribute att1 = new BasicAttribute(MEMBEROF);
String roleName=user.getUserRoleList().get(0);
String role1 = COMMONNAME + "="+roleName+"," + group;
att1.add(role1);
attrNew.put(att1);
DirContext dirContext =ctx.createSubcontext( query, attrNew );
for (int i = 1; i < user.getUserRoleList().size(); i++) {
Attributes att2 = new BasicAttributes();
String roleNameStr=user.getUserRoleList().get(i);
log.debug("roleNameStr--->"+roleNameStr);
String role2 = COMMONNAME + "="+roleNameStr+"," + group;
log.debug("role2-->"+role2);
att2.put(MEMBEROF,role2);
dirContext.modifyAttributes("", DirContext.ADD_ATTRIBUTE, att2);
}
Maybe you are looking for
-
Delegating Calendar Invites to iCloud
I have an iCloud account, but it is not the email address I declare to the outside world. I also have a Fastmail email, but again I don't declare this email address to the outside world. They are for function only. The email address that I do send
-
NOOB needs help please....
I am using Dreamweaver to build my website (www.actitudm.com if anyone wants to check it out) and I am having issues with the content loading correctly. It looks like I have the code right, but it isn't finding my CSS or my Images, so the page is all
-
Hi, i have a PO with a fixed exchange rate, so i want to change it as modifiable rate. i can do that with Tcode : ME22N but when i want to post invoice upon this PO, i can't change the exchange rate ???!!! please how to change this exchange rate ?? R
-
I am fed up with the upload times from my Nikon D4 and Nikon D800E cameras to Lightroom, they have the latest firware....yet it is taking 15 hours sometimes much longer to upload 10 Gig of images it is time i can ill afford....im tempted to dump my L
-
HT4792 How to transfer video files from my ipad to mac?
I recorded a video of my daughters ballet recital on my company's ipad. I would like to transfer it to my mac or pc and delete it from ipad? Can I do this?