Get the jndi names
i have the next code for conect to one weblogic server.
Properties p = new Properties();
p.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.T3InitialContextFactory");
p.put(Context.PROVIDER_URL, url);
using the jndi name i can load the ejb but how can i list the jndi names?
thanks
I am using ejb 2, jdk 1.4.2 and weblogic 8.1 and for listing i haven't list() into the context.
can you help me please?
thanks
Similar Messages
-
How to get the JNDI name of an EJB from within itself
Hello,
I'm trying to find a way to get the JNDI name of a session bean from
within itself.
In the application I'm working on we need to support multiple
customers. In order to do that, each EJB has a normal home and remote
interface, a base class bean implementation and different children
bean implemetations for each customer (when the logic for the
customers is different). JNDI is used to get the proper implementation
based on the customer.
I've got an EJB that provides some services that are the same for all
customers, except for the fact that it contains one variable that
should have a different value depending on the customer. I don't want
to creat subclasses just for that. What I want is to be able to get
the JNDI name and set the variable based on the it.
Is there a way to get the JNDI name for the EJB from within itself?
TIA
MJHi Pradeep,
Please try referring to this post which is discussed earliar and seems its also answered.
http://forums.adobe.com/thread/504861
Thanks,
Bhasker Chari -
The DataSource with the JNDI name: MyDataSource could not be located.
hi,
I created a connection pool myconnectionpool and i create a data source MyDataSource with jndi name as mydsn.
in my weblogic-cmp-rdbms-jar.xml i gave
<data-source-name>MyDataSource</data-source-name> and
When i deploy the bean i am getting following exception.
Unable to deploy EJB: containerManaged from cmp7.jar:
weblogic.ejb20.WLDeploymentException: The DataSource with the JNDI name: MyDataSource could not be located. Please ensure that the DataSource has been deployed successfully and that the JNDI name in your EJB Deployment descriptor is correct.
at weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.setup(RDBMSPersistenceManager.java:128)
at weblogic.ejb20.manager.BaseEntityManager.setupPM(BaseEntityManager.java:213)
at weblogic.ejb20.manager.BaseEntityManager.setup(BaseEntityManager.java:185)
at weblogic.ejb20.manager.DBManager.setup(DBManager.java:160)
at weblogic.ejb20.deployer.ClientDrivenBeanInfoImpl.deploy(ClientDrivenBeanInfoImpl.java:928)
at weblogic.ejb20.deployer.EJBDeployer.activate(EJBDeployer.java:1216)
at weblogic.ejb20.deployer.Deployer.deploy(Deployer.java:850)
at weblogic.j2ee.EJBComponent.deploy(EJBComponent.java:70)
at weblogic.j2ee.Application.addComponent(Application.java:253)
at weblogic.j2ee.J2EEService.addDeployment(J2EEService.java:144)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:364)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(DeploymentTarget.java:301)
at weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeployments(DeploymentTarget.java:255)
at weblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(DeploymentTarget.java:206)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:716)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:698)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:380)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
at weblogic.management.internal.RemoteMBeanServerImpl.invoke(RemoteMBeanServerImpl.java:902)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:480)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:208)
at $Proxy34.updateDeployments(Unknown Source)
at weblogic.management.configuration.ServerMBean_CachingStub.updateDeployments(ServerMBean_CachingStub.java:3724)
at weblogic.management.deploy.slave.SlaveDeployer.updateServerDeployments(SlaveDeployer.java:1584)
at weblogic.management.deploy.slave.SlaveDeployer.resume(SlaveDeployer.java:337)
at weblogic.management.deploy.DeploymentManagerServerLifeCycleImpl.resume(DeploymentManagerServerLifeCycleImpl.java:233)
at weblogic.t3.srvr.ServerLifeCycleList.resume(ServerLifeCycleList.java:61)
at weblogic.t3.srvr.T3Srvr.resume(T3Srvr.java:852)
at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:273)
at weblogic.Server.main(Server.java:33)
Where i went wrong?
Thanks in advance
phaniHi ,
I have the same problem .when i look into JNDI tree view the jndi name is listed. but it saying error below listed.
my
ejb-name:=containerManaged
datasourcename=EX_DataSource
jndi-name=EX_JNDI
<Feb 14, 2005 3:10:08 PM IST> <Error> <Deployer> <149231> <The slave deployer was unable to set the activatio
true for the application EX_Container
weblogic.management.ApplicationException: activate failed forEX_Container
Module Name: EX_Container, Error: Exception activating module: EJBModule(EX_Container,status=PREPARED)
Unable to deploy EJB: containerManaged from EX_Container.jar:
The DataSource with the JNDI name: EX_DataSource could not be located. Please ensure that the DataSource has
ed successfully and that the JNDI name in your EJB Deployment descriptor is correct.
TargetException:
Unable to deploy EJB: containerManaged from EX_Container.jar:
The DataSource with the JNDI name: EX_DataSource could not be located. Please ensure that the DataSource has
ed successfully and that the JNDI name in your EJB Deployment descriptor is correct.
at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:1093)
at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:1022)
at weblogic.management.deploy.slave.SlaveDeployer.setActivationStateForAllApplications(SlaveDeployer.
at weblogic.management.deploy.slave.SlaveDeployer.resume(SlaveDeployer.java:376)
at weblogic.management.deploy.DeploymentManagerServerLifeCycleImpl.resume(DeploymentManagerServerLife
ava:235)
at weblogic.t3.srvr.ServerLifeCycleList.resume(ServerLifeCycleList.java:65)
at weblogic.t3.srvr.T3Srvr.resume(T3Srvr.java:832)
at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:300)
at weblogic.Server.main(Server.java:32)
my weblogic-ejb-jar.xml
<?xml version="1.0"?>
<!DOCTYPE weblogic-ejb-jar PUBLIC
'-//BEA Systems, Inc.//DTD WebLogic 7.0.0 EJB//EN'
'http://www.bea.com/servers/wls700/dtd/weblogic-ejb-jar.dtd'>
<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>containerManaged</ejb-name>
<entity-descriptor>
<persistence>
<persistence-use>
<type-identifier>WebLogic_CMP_RDBMS</type-identifier>
<type-version>7.0</type-version>
<type-storage>META-INF/weblogic-cmp-rdbms-jar.xml</type-storage>
</persistence-use>
</persistence>
</entity-descriptor>
<jndi-name>EX_JNDI</jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
<?xml version="1.0"?>
<!DOCTYPE weblogic-rdbms-jar PUBLIC
'-//BEA Systems, Inc.//DTD WebLogic 7.0.0 EJB RDBMS Persistence//EN'
'http://www.bea.com/servers/wls700/dtd/weblogic-rdbms20-persistence-700.dtd'>
weblogic-cmp-rdbms-jar.xml file
<weblogic-rdbms-jar>
<weblogic-rdbms-bean>
<ejb-name>containerManaged</ejb-name>
<data-source-name>EX_DataSource</data-source-name>
<table-map>
<table-name>ejbAccounts</table-name>
<field-map>
<cmp-field>accountId</cmp-field>
<dbms-column>id</dbms-column>
</field-map>
<field-map>
<cmp-field>balance</cmp-field>
<dbms-column>bal</dbms-column>
</field-map>
<field-map>
<cmp-field>accountType</cmp-field>
<dbms-column>type</dbms-column>
</field-map>
</table-map>
</weblogic-rdbms-bean>
<create-default-dbms-tables>DropAndCreateAlways</create-default-dbms-tables>
</weblogic-rdbms-jar>
ejb-jar.xml
<?xml version="1.0"?>
<!DOCTYPE ejb-jar PUBLIC
"-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN"
"http://java.sun.com/dtd/ejb-jar_2_0.dtd">
<ejb-jar>
<enterprise-beans>
<entity>
<ejb-name>containerManaged</ejb-name>
<home>containerBN.EX.AccountHome</home>
<remote>containerBN.EX.Account</remote>
<ejb-class>containerBN.EX.AccountBean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>java.lang.String</prim-key-class>
<reentrant>False</reentrant>
<cmp-version>2.x</cmp-version>
<abstract-schema-name>AccountBean</abstract-schema-name>
<cmp-field>
<field-name>accountId</field-name>
</cmp-field>
<cmp-field>
<field-name>balance</field-name>
</cmp-field>
<cmp-field>
<field-name>accountType</field-name>
</cmp-field>
<primkey-field>accountId</primkey-field>
<query>
<query-method>
<method-name>findBigAccounts</method-name>
<method-params>
<method-param>double</method-param>
</method-params>
</query-method>
<ejb-ql>
<![CDATA[SELECT OBJECT(a) FROM AccountBean AS a WHERE a.balance > ?1]]>
</ejb-ql>
</query>
<query>
<query-method>
<method-name>findAccount</method-name>
<method-params>
<method-param>double</method-param>
</method-params>
</query-method>
<ejb-ql>
<![CDATA[SELECT OBJECT(a) FROM AccountBean AS a WHERE a.balance = ?1]]>
</ejb-ql>
</query>
<query>
<query-method>
<method-name>findNullAccounts</method-name>
<method-params>
</method-params>
</query-method>
<ejb-ql>
<![CDATA[SELECT OBJECT(a) FROM AccountBean AS a WHERE a.accountType IS NULL]]>
</ejb-ql>
</query>
</entity>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>containerManaged</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
<ejb-client-jar>EX_Container.jar</ejb-client-jar>
</ejb-jar>
pls lhelp me .
my email id: [email protected]
thanks in advance.
Sudhakar.M -
Unable to bind EJB Home Interface to the JNDI name
Why do I get this error?? What is the jndi-name in weblogic-ejb-jar.xml
Unable to deploy EJB: OrganizationEJB from sempire_bc.jar:
Unable to bind EJB Home Interface to the JNDI name:
com.sempire.builder.business
_component.Organization. The error was:
javax.naming.NameAlreadyBoundException: Organization is already bound;
remaining
name 'com.sempire.builder.business_component'
<<no stack trace available>>Slava,
In case I change the name of the jndi name to a unique name. I still get the same
problem. I checked for multiple occurences, but there aren't any.
My web.xml file is:
<ejb-local-ref>
<description>
Reference EJB resources in Weblogic Resources
</description>
<ejb-ref-name>GangsterEJB</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<local-home>com.sempire.builder.business_component.GangsterHome</local-home>
<local>com.sempire.builder.business_component.Gangster</local>
</ejb-local-ref>
My weblogic-ejb-jar.xml file is:
<weblogic-enterprise-bean>
<ejb-name>GangsterEJB</ejb-name>
<entity-descriptor>
<persistence>
<persistence-type>
<type-identifier>WebLogic_CMP_RDBMS</type-identifier>
<type-version>6.0</type-version>
<type-storage>META-INF/weblogic-cmp-rdbms-jar.xml</type-storage>
</persistence-type>
<persistence-use>
<type-identifier>WebLogic_CMP_RDBMS</type-identifier>
<type-version>6.0</type-version>
</persistence-use>
</persistence>
</entity-descriptor>
<reference-descriptor>
<resource-description>
<res-ref-name>jdbc/GangsterDB</res-ref-name>
<jndi-name>oraclePool</jndi-name>
</resource-description>
</reference-descriptor>
<local-jndi-name>Gangster_test</local-jndi-name>
</weblogic-enterprise-bean>
I do not get the problem.
Thank you
Ronak Parekh
"Slava Imeshev" <[email protected]> wrote:
Hi Ronak,
This exception means that you already have a bean
with the same JNDI name. Search your weblogic-ejb-jar.xml files
for multiple occurrences of the name and fix the problem.
Regards,
Slava Imeshev
"Ronak Parekh" <[email protected]> wrote in message
news:[email protected]...
Why do I get this error?? What is the jndi-name in weblogic-ejb-jar.xml
Unable to deploy EJB: OrganizationEJB from sempire_bc.jar:
Unable to bind EJB Home Interface to the JNDI name:
com.sempire.builder.business
_component.Organization. The error was:
javax.naming.NameAlreadyBoundException: Organization is already bound;
remaining
name 'com.sempire.builder.business_component'
<<no stack trace available>> -
Need the JNDI name for Destinations present in JMS Modules
Hi all,
I need JNDI`s of all the Destinations present in JMS Modules. With this code i am able to get all info about the JMS Modules, Destinations and as well as information about messages, but still not able to extract JNDI of Destination. Can some one give me pointer on this ?
try {
JMXServiceURL serviceUrl =
new JMXServiceURL(
"service:jmx:t3://localhost:7001/jndi/weblogic.management.mbeanservers.runtime");
System.out.println("Connecting to: " + serviceUrl);
Hashtable env = new Hashtable();
env.put(JMXConnectorFactory.PROTOCOL_PROVIDER_PACKAGES,
"weblogic.management.remote");
env.put(javax.naming.Context.SECURITY_PRINCIPAL, "weblogic");
env.put(javax.naming.Context.SECURITY_CREDENTIALS, "welcome1");
jmxCon = JMXConnectorFactory.newJMXConnector(serviceUrl, env);
jmxCon.connect();
MBeanServerConnection con = jmxCon.getMBeanServerConnection();
Set<ObjectName> mbeans = con.queryNames(queryObjectName, null);
for (ObjectName mbeanName : mbeans) {
String temp = mbeanName.toString();
System.out.println(temp);
String[] mBeanAttributes = {"Name", "DestinationType", "MessagesCurrentCount",
"MessagesPendingCount", "MessagesReceivedCount", "MessagesHighCount" };
queryObjectName = new ObjectName("*:*,Type=JMSDestinationRuntime");
mbeans = con.queryNames(queryObjectName, null);
for (ObjectName mbeanName : mbeans) {
AttributeList attributes = con.getAttributes(mbeanName, mBeanAttributes);
System.out.println((Attribute) attributes.get(0)+ "" +
(Attribute) attributes.get(1)+
(Attribute) attributes.get(2)+
(Attribute) attributes.get(3)+
(Attribute) attributes.get(4)+
(Attribute) attributes.get(5));
String temp = mbeanName.toString();
ObjectInstance inst = con.getObjectInstance(mbeanName);
System.out.println(temp);
finally {
if (jmxCon != null)
jmxCon.close();
But Nowhere i am getting the JNDI of destination Queues or Topics.
Edited by: mdev on Feb 21, 2012 5:21 PMYou are accessing the runtime mbean of a JMS destination. The JNID name of a destination is not available on the runtime destination MBean.
If you are using jms-system-resource to deploy your JMS module, you should be able to access the deployment mbean of the destination. The starting MBean for JMS is JMSSystemResourceMBean in this case. -
Get all JNDI names - EJBLocalHome
Hello,
I've tried to get all JNDI names that are deployed on the J2EE Server RI Version 1.3.1. It worked fine with the JNDI names of the EJBs with Remote Client view (EJBHome), but did not work with EJBs with local Client View (EJBLocalHome).
Does anyone knows how could work? Or wether it isn't possible.
Thanks
Here's my code:
InitialContext ct = new InitialContext();
NamingEnumeration bindings = ct.listBindings("");
while (bindings.hasMore() ) {
Binding b = (Binding) bindings.next() ;
Object object = b.getObject();
if(object instanceof Context) {
Context aCon = (Context)object;
NamingEnumeration n = aCon.listBindings("");
while (n.hasMore()) {
Binding b2 = (Binding) n.next() ;
if (b2.getClassName().equals("javax.naming.Reference")) {
Object objRef = ct.lookup("ejb/"+ b2.getName());
if (objRef instanceof EJBLocalHome) {
System.out.println("localHome");
//here I want to access the EJBLocalHome Interface
else if (objRef instanceof EJBHome) {
System.out.println("Home");
else System.out.println("nothing");
I use the listBindings() method in order to get all References to a JNDI name. I do not know how to get all JNDI names that are local. How can I check them?
-
How to get the table name in the trigger definition without hard coding.
CREATE TRIGGER db.mytablename
AFTER UPDATE,INSERT
AS
INSERT INTO table1(col1)
SELECT InsRec.col1
FROM
INSERTED Ins
--Below i am calling one sp for which i have to pass the table name
EXEC myspname 'tablename'
In the above trigger,presently i am hard coding the tablename
but is it possible to get the table name dynamically on which the trigger is defined in order to avoid hard coding the table nameI really liked your audit table concept. You inspired me to modify it so that, the entire recordset gets captured and added a couple of other fields. Wanted to share my end result.
USE [YourDB]
GO
/****** Object: Trigger [dbo].[iudt_AutoAuditChanges] Script Date: 10/18/2013 12:49:55 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER TRIGGER [dbo].[iudt_AutoAuditChanges]
ON [dbo].[YourTable]
AFTER INSERT,DELETE,UPDATE
AS
BEGIN
SET NOCOUNT ON;
Declare @v_AuditID bigint
IF OBJECT_ID('dbo.AutoAudit','U') IS NULL BEGIN
CREATE TABLE [dbo].[AutoAudit]
( [AuditID] bigint identity,
[AuditDate] DateTime,
[AuditUserName] varchar(128),
[TableName] varchar(128) NULL,
[OldContent] XML NULL,
[NewContent] XML NULL
ALTER TABLE dbo.AutoAudit ADD CONSTRAINT
PK_AutoAudit PRIMARY KEY CLUSTERED
[AuditID]
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
CREATE NONCLUSTERED INDEX [idx_AutoAudit_TableName_AuditDate] ON [dbo].[AutoAudit]
( [TableName] ASC,
[AuditDate] ASC
)WITH (STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
END
Select * Into #AuditDeleted from deleted
Select * Into #AuditInserted from inserted
While (Select COUNT(*) from #AuditDeleted) > 0 OR (Select COUNT(*) from #AuditInserted) > 0
Begin
INSERT INTO [dbo].[AutoAudit]
( [AuditDate], [AuditUserName], [TableName], [OldContent], [NewContent])
SELECT
GETDATE(),
SUSER_NAME(),
[TableName]=object_name([parent_obj]),
[OldContent]=CAST((SELECT TOP 1 * FROM #AuditDeleted D FOR XML RAW) AS XML),
[NewContent]=CAST((SELECT TOP 1 * FROM #AuditInserted I FOR XML RAW) AS XML)
FROM sysobjects
WHERE
[xtype] = 'tr'
and [name] = OBJECT_NAME(@@PROCID)
Set @v_AuditID = SCOPE_IDENTITY()
Delete from AutoAudit
Where AuditID = @v_AuditID
AND Convert(varchar(max),oldContent) = Convert(varchar(max),NewContent)
Delete top(1) from #AuditDeleted
Delete top(1) from #AuditInserted
End
END -
How can I get the host name from Email address?
hi
When I using socket to develope an email-sending servlet,I don't know how to get the host name from emial address.can you help me,thanksStripping off the user name will give you the domain of from field in the message. This is not the same as the host. Take a look at:
http://www.stopspam.org/email/headers/headers.html
Theres a pretty good discussion about email headers and how to use the information. You probably want to check the information here against the RFC.
Sean -
How to get the query name from portal report name
Hi Experts ,
I am given a portal report Name and asked to do changes to the queries of that ,so how do i get the query name ,
Thanks in Advance
NityaHi Nithya,
You can get the technical name by selecting the role in the portal where the report is enclosed you will generally find the report in description then identify the report you are looking then double click on that you will get a window pop-up in that you will have details tab there click on the details the your Query technical name will be displayed.
EX : zqry_w001 Then replace W with Q and seach in analyser or Designer.
Regards
Amar. -
Getting the variant name when the report program is run in background
Hi All,
How to get the variant name for the report program when run in background? My requirement is to create an email attachement with the name 'variant.XLS', where variant = selection screen variant, when the report program is run in background. The system field SY-SLSET holds the variant name only when run online.
Any pointers to this will be highly appreciated.
Thanks and regards,
Nilesh.Hello Nilesh,
Please find the algo:
1. Call the FM: GET_JOB_RUNTIME_INFO to get the background job details.
2. Select data from TBTCP using these details:
DATA:
FP_EVENTID TYPE BTCEVENTID
FP_EVTPARM TYPE BTCEVTPARM
FP_ACTIVE TYPE BTCXPGFLAG
FP_JOBCNT TYPE BTCJOBCNT
FP_JOBNM TYPE BTCJOB
FP_STEPCNT TYPE BTCSTEPCNT.
CALL FUNCTION 'GET_JOB_RUNTIME_INFO'
IMPORTING
EVENTID = FP_EVENTID
EVENTPARM = FP_EVTPARM
EXTERNAL_PROGRAM_ACTIVE = FP_ACTIVE
JOBCOUNT = FP_JOBCNT
JOBNAME = FP_JOBNM
STEPCOUNT = FP_STEPCNT
EXCEPTIONS
NO_RUNTIME_INFO = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
* Error calling FM: GET_JOB_RUNTIME_INFO
ENDIF.
DATA: FP_VARIANT TYPE BTCVARIANT.
SELECT JOBNAME JOBCOUNT STEPCOUNT VARIANT
FROM TBTCP
INTO TABLE L_IT_TBTCP
WHERE JOBNAME = FP_JOBNM
AND JOBCOUNT = FP_JOBCNT
AND STEPCOUNT = FP_STEPCNT.
IF SY-SUBRC = 0.
SORT L_IT_TBTCP BY JOBNM JOBCNT STEPCNT.
READ TABLE L_IT_TBTCP INTO L_WA_TBTCP INDEX 1.
IF SY-SUBRC = 0.
FP_VARIANT = L_WA_TBTCP-VARIANT.
ENDIF.
ENDIF.
Hope this helps.
BR,
Suhas -
How can I get the path name and rename it?
I Hope someone who knows more about automator than I can help me out here. What I'm trying to do is get the path file name, while also changing part of it. Here is my example:
I can get the path name with this "Get Path" script I found http://automatorworld.com/archives/get-path/all-comments/
It does half the job so I just need to tweak it but know how. When I get the path this is what I'll get: /Volumes/Public/Creative Services/Campaigns/2010/NCDDiv-32CDV Upgrade/NCDDIV-32Versions.xls
I need to remove the beginning part"/volumes" to "file://///nhmanmkt01"
This is so I can send the path from our sever where we keep our files to my windows friends so they can open it.
Thanks for any help you can provide!ok, make the following workflow.
1. get selected finder items.
2. run shell script
<pre style="
font-family: Monaco, 'Courier New', Courier, monospace;
font-size: 10px;
margin: 0px;
padding: 5px;
border: 1px solid #000000;
width: 720px;
color: #000000;
background-color: #ADD8E6;
overflow: auto;"
title="this text can be pasted into the Script Editor">
for f in "$@"
do
echo "$f"|sed 's%/Volumes%file://///nhmanmkt01%'
done</pre>
set the script to accept input as arguments
3. copy to clipboard
save it as a finder plugin. -
How do I get the file names on a customized proof sheet?
How do I get the file names on a customized proof sheet?
Actually, I really don't know what you say.
But when you see the properties of a file in Windows, you can see there are two file size. One is called "SIze" and the other one is called "Size on disk".
Therefore, I would like to know the size on disk but not just the size. -
How to get the table name and bind columns names in an INSERT statement ?
I have an INSERT statement with input parameters (for example
INSERT INTO my_table VALUES (:a, :a, :a)) and I want to know
without parsing the statement which is the name of table to
insert to and the corresponding columns.
This is needed to generate the SELECT FOR UPDATE statement to
refetch a BLOB before actually writing to it. The code does not
know in advance the schema (generic code).
Thanks in advance,
Joseph CanedoOnce you have prepared your statement, you can execute the
statement with the OCI_DESCRIBE_ONLY mode before binding any
columns. Then you can use OCIParamGet to find out about each
column (column index is 1-based). You should get OCI_NO_DATA or
ORA-24334 if there are no more columns in the statement. Note
that the parameter descriptor from OCIParamGet is
allocated/freed internally by OCI; you do not need to manage it
explicitly. The parameter descriptor is passed to OCIAttrGet in
order to obtain for instance the maximum size of data in the
column OCI_ATTR_DATA_SIZE. You can also get the column name in
this way, although I do not remember the #define off the top of
my head. Getting the table name appears to be much more
difficult; I have never had to do that yet. Good luck. -Ralph -
How to get the folder name of selected subitem in tree structure?
Hi All,
I created a tree structure like below.
->Folder1-- 1
2
3
->Folder2-----1
2
3
i.e i have two folders & each folder having the values like above.Now i want to perform some action by clicking on the any of the values.Suppose if i click value 2,i want to do some action.the actions need to perform is varies from floder to to folder.
So How can i get the folder name of clicked Value?
Regards,
RaviHi Kumar ,
the below code should help you.
Register the below action for the leaf node for which u need the subfolder's name above it.
Worked fine in my system ...hope it does in ur scenario too
method ONACTIONGET_PATH .
data : lr_element TYPE REF TO if_wd_context_element,
lr_node TYPE REF TO if_wd_context_node,
ls_path type string,
ls_path_node TYPE string,
lt_string type TABLE OF string,
l_lines type i,
l_lines_1 TYPE i.
lr_element = wdevent->get_context_element( 'CONTEXT_ELEMENT' ).
**-> getting the path of the node/leaf
*which u had clicked and from that getting the node above it
ls_path = lr_element->get_path( ).
SPLIT ls_path at '.' into table lt_string.
-> remove the first 2 entries as they will contain the view name
DELETE lt_string FROM 1 to 2.
l_lines = LINES( lt_String ).
l_lines_1 = l_lines - 1.
-> remove the last 2 entries as they will contain the element in the path
DELETE lt_string from l_lines_1 to l_lines.
LOOP AT lt_string into ls_path.
CONCATENATE LINES OF LT_STRING into ls_path_node SEPARATED BY '.'.
ENDLOOP.
**-> getting access to the node above the leaf element
LR_NODE = WD_CONTEXT->PATH_GET_NODE( path = ls_path_node ).
lr_element = lr_node->get_element( ).
**-> Getting the name of the folder...
*here path is the attribute in my context which stores the name of the folder
lr_element->get_attribute( EXPORTING name = 'PATH' IMPORTING value = ls_path ).
endmethod. -
How to get the shared name of a folder in my PC through java code.
Hi,
I have a shared folder in my PC adn its shared name is different. Is there any way to get the shared name of that folder from java code. I have the absolute path of that dir. Can I get the shared name from that path in java or is there any other method.
Thanks.
Edited by: pavanspecial on Nov 28, 2007 11:34 PMHi, Thanks for your reply. I have even tried through 'net share' , but i could not the share name from the path i have. For the 'net share' i need to give the share name itself.
Maybe you are looking for
-
I was in the middle of composing or replying to an important email,gmail, battery shut down and now I cannot retreive the very lengthy important email. I have tried contacting google and troubleshooting by looking in archives, deleted spam, all mail
-
Playing the entire list in my library
hello all i have a question about playing the songs in my music library list. I dont sync all the songs in my list with my ipod, i just dont have enough room. However when i want to play the songs in the list it only plays the mp3s that are checked t
-
JVM 1.5.0_15 crash on RHEL 5 with JBoss 4.3.0
Hello, we had a JVM crash on our new production architecture. Here are the specifics : OS : Red Hat Enterprise Linux Server release 5.2 (Tikanga) Kernel : 2.6.18-92.el5 CPU : 2x Dual Core Xeon 5160 @ 3.00GHz MemTotal: 8046252 kB JVM : java version "1
-
I would like for my actions palette and my layers palette to be visible when editing. I had it like that before and my computer got a little screwy and now I can't get it to do it again. Please help!
-
How can I activate the Adobe reader plugins
HHow can I activate the Adobe reader plugins